rbaldwin
Posts: 172
|
Posted: 05/22/2007, 12:51 PM |
|
i have a non editable grid.
each row from the database is displayed in 4 html table rows due to the number of variables i need to display for each database table row.
But, depending on the condition found in the database row i would like to be able to suppress rows 2,3 and 4.
in ccs my html looks like this
<!-- BEGIN Row -->
<tr class="Row">
<td style="TEXT-ALIGN: right">{ID} </td>
<td>{vne} </td>
<td>
<p align="center">{vneID} </p>
</td>
<td>{networkName} </td>
<td>{customer} </td>
<td>{active} </td>
<td>{static1} </td>
<td>{deleted} </td>
</tr>
<tr class="Row">
<td style="TEXT-ALIGN: right"> </td>
<td> </td>
<td nowrap>
<p align="right"><strong> IP Inclusions:</strong></p>
</td>
<td colspan="5"><textarea name="{ipInclusions_Name}" rows="5" cols="80">{ipInclusions}</textarea></td>
</tr>
<tr class="Row">
<td style="TEXT-ALIGN: right"> </td>
<td> </td>
<td nowrap>
<p align="right"> <strong>IP Exclusions:</strong></p>
</td>
<td colspan="5"><textarea name="{ipExclusions_Name}" rows="5" cols="80">{ipExclusions}</textarea></td>
</tr>
<tr class="Row">
<td style="TEXT-ALIGN: right"> </td>
<td> </td>
<td>
<p align="right"> <strong>Notes:</strong></p>
</td>
<td colspan="5"><textarea name="{Notes_Name}" rows="5" cols="80">{Notes}</textarea></td>
</tr>
<!-- END Row -->
Basically i'd like to replace class="Row" with style=display:none programatically on rows 2,3,4 of each database row.
I think attribute is the way to go, but i'm not sure.
Support suggested panel for hide/show but i don't think panel can be used in the middle of a grid.
|
|
|
wkempees
|
Posted: 05/23/2007, 2:05 AM |
|
Hi,
Do you know the condition of the rows you do not want to display, before
show of the grid?
I would strongly suggest to write the SQL in such a way that those rows are
not even retreived.
On the one hand your SQL will be "light"on the other you have now worries on
the Grid side.
Walter
BTW it can be done
"rbaldwin" <rbaldwin@forum.codecharge> schreef in bericht
news:8465349bc51f2a@news.codecharge.com...
>i have a non editable grid.
> each row from the database is displayed in 4 html table rows due to the
> number
> of variables i need to display for each database table row.
>
> But, depending on the condition found in the database row i would like to
> be
> able to suppress rows 2,3 and 4.
>
> in ccs my html looks like this
>
> <!-- BEGIN Row -->
> <tr class="Row">
> <td style="TEXT-ALIGN: right">{ID} </td>
> <td>{vne} </td>
> <td>
> <p align="center">{vneID} </p>
> </td>
> <td>{networkName} </td>
> <td>{customer} </td>
> <td>{active} </td>
> <td>{static1} </td>
> <td>{deleted} </td>
> </tr>
>
> <tr class="Row">
> <td style="TEXT-ALIGN: right"> </td>
> <td> </td>
> <td nowrap>
> <p align="right"><strong> IP Inclusions:</strong></p>
> </td>
> <td colspan="5"><textarea name="{ipInclusions_Name}" rows="5"
> cols="80">{ipInclusions}</textarea></td>
> </tr>
>
> <tr class="Row">
> <td style="TEXT-ALIGN: right"> </td>
> <td> </td>
> <td nowrap>
> <p align="right"> <strong>IP Exclusions:</strong></p>
> </td>
> <td colspan="5"><textarea name="{ipExclusions_Name}" rows="5"
> cols="80">{ipExclusions}</textarea></td>
> </tr>
>
> <tr class="Row">
> <td style="TEXT-ALIGN: right"> </td>
> <td> </td>
> <td>
> <p align="right"> <strong>Notes:</strong></p>
> </td>
> <td colspan="5"><textarea name="{Notes_Name}" rows="5"
> cols="80">{Notes}</textarea></td>
> </tr>
> <!-- END Row -->
>
>
> Basically i'd like to replace class="Row" with style=display:none
> programatically on rows 2,3,4 of each database row.
>
> I think attribute is the way to go, but i'm not sure.
>
> Support suggested panel for hide/show but i don't think panel can be used
> in
> the middle of a grid.
>
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
wkempees
|
Posted: 05/23/2007, 2:21 AM |
|
meaning it can be done with attributes and/or panels.
Panels, when on server side (Thanks BK)
Attribute setting to <div id=nnn> </div>, and some fancy JS code
But I would strongly suggest the SQL approach in your specific case.
Walter
|
|
|
rbaldwin
Posts: 172
|
Posted: 05/23/2007, 4:33 AM |
|
can't be done in sql. i want all rows from sql table, however each row retrieved from sql table has too many columns to fit single display row, example retrieved row has 15 fields i display fields 1 - 5 on html table row 1, 6 - 10 on row 2, 11 -15 on row 3. Row 4,5,6 of HTML table are for row 2 of SQL table, etc.
because fields 6 - 10 and 11 to 15 contain trivial data and if they are empty i don't want to show them. so based on test in beforeshowrow if fields are blank then suppress HTML rows 2 and 3
see?
|
|
|
|