Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
JohnCHill #1
Align data across columns when using CFIF
Hello,
I am unable to align data in a row, across columns when I use CFIF in one of
the columns.
All of the data must align across the rows. When the CFIF is used, sometimes
data will appear and sometimes it won't. But, this then creates a problem with
the alignment of the data in the next column.
Any help is appreciated as I have now spent a whole day looking at this.
John
<cfoutput query="NeedtoTake" group="RESPONSIBILITY_NAME">
<tr align="left" valign="top">
<td height="28"><font size="2" face="Arial, Helvetica,
sans-serif">#RESPONSIBILITY_NAME#</font></td>
<td><cfoutput><font size="2" face="Arial, Helvetica, sans-serif">
<a
href="http://www.web.virginia.edu/DOTWeb/inventorybyempl2sched.cfm?AbstractName=
#REQUIRED_COURSE_ALT_1_ID#">#CURRENT_VALID_REQUIRE D_COURSE#</a>
<cfif #COURSE_VALIDITY_EXPIR_DATE# NEQ''><font size="2" face="Arial,
Helvetica, sans-serif">*Course taken on
#DateFormat(COURSE_START_DATE,"mm/dd/yyyy")# but it expired on
#DateFormat(COURSE_VALIDITY_EXPIR_DATE,"mm/dd/yyyy")#. This course must be
retaken.<cfelse></cfif>
<p></cfoutput>
</td>
<td><cfoutput><cfif COURSE_START_DATE GTE #DateFormat(Now(),'mm/dd/yyyy')#>
<cfif COURSE_VALIDITY_EXPIR_DATE NEQ''><font size="2" face="Arial, Helvetica,
sans-serif">#DateFormat(COURSE_START_DATE,"mm/dd/yyyy")# <cfelse><font size="2"
face="Arial, Helvetica,
sans-serif">#DateFormat(COURSE_START_DATE,"mm/dd/yyyy")#</cfif></cfif><br>
<br> <p></cfoutput>
</td>
</tr>
</cfoutput>
JohnCHill Guest
-
DataGrid columns from data
I posted this under the FlexBuilder topic then realized it is more appropriate here. I noticed in the database sample program, the results of the... -
align data column from codebehind
Hello. I've started a datagrid in codebehind and need to have the numeric columns right aligned. here's the code: ----- Select Case arThis1(1)... -
how to Align text left & vertical align middle
Hello, I have a asp lable control, which I use to display text in, I would like to have the text display aligned in the center and vertical... -
can't get data to show with bound columns
I'm trying to create a DataGrid filled with values from a DataSet and I want the user to be able to show and hide whichever columns they choose. I... -
Pad strings/concatenate columns to simulate data columns in ASP select box with SQL Server 2K
Dale, Cast all the data to fixed character data type in your select statement. For example: select cast(au_id as char(12)) +... -
kenji776 #2
Re: Align data across columns when using CFIF
Although I havn't looked at your code thoughily you may want to concider the
isdefined() function. That way you can see if a value does exsist, and if it
does, create the table column or whatever, and if it doesn't then just move on
the next one. Sorry if im way off base here, just a quick idea. Good luck.
kenji776 Guest
-
The ScareCrow #3
Re: Align data across columns when using CFIF
I'm a bit confused at why it is creating a problem with the alignment ??
I understand that if the first "RESPONSIBILITY_NAME" has 3 records associated
with it and the next only has 2 that there will be a column missing from the
end.
So, can you give a visual demo of what your require and what the code is
producing ?
In the mean time I've got some suggestions for you code, I assume the date
columns are date/time data types ?
Then
<cfif #COURSE_VALIDITY_EXPIR_DATE# NEQ''>
would be better as
<cfif IsDate(COURSE_VALIDITY_EXPIR_DATE)>
<cfif COURSE_START_DATE GTE #DateFormat(Now(),'mm/dd/yyyy')#>
would be better as
<cfif DateCompare(COURSE_START_DATE, Now()) Is 1>
<cfif COURSE_VALIDITY_EXPIR_DATE NEQ''>
would be better as
<cfif IsDate(COURSE_VALIDITY_EXPIR_DATE)>
Also in this cfif you are outputting the ssame value in both the if and the
else
Ken
The ScareCrow Guest



Reply With Quote

