Karl A. Homburg
|
| Posted: 08/30/2004, 10:27 AM |
|
I am looking for a way to hide columns of a grid that contain a NULL if all that value for all the rows is NULL. Is there a simple way to do this? I am using ASP.
|
|
|
 |
Nicole
Posts: 586
|
| Posted: 08/31/2004, 3:47 AM |
|
To hide a Tabular type grid’s row please use this code in Before Show Row event:
if condition_to_hide then
form_name.RowControls.Visible = false
else
form_name.RowControls.Visible = true
end if
_________________
Regards,
Nicole |
 |
 |
Karl Homburg
|
| Posted: 08/31/2004, 5:59 AM |
|
I was looking for a way to hide the columns not the rows. I don't see anything similar for columns.
|
|
|
 |
Facundo Nunes - IBISOFT
|
| Posted: 08/31/2004, 6:37 AM |
|
Hi!
You can define a column as a block and then make it invisible.
--
Dott. Facundo Nunes
FacundoNunes@ibisoft.it
IBISOFT srl
Parma - Italia
<KarlHomburg@forum.codecharge (Karl Homburg)> ha scritto nel messaggio
news:64134761fa6ec4@news.codecharge.com...
> I was looking for a way to hide the columns not the rows. I don't see
anything
> similar for columns.
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
kahombur
Posts: 2
|
| Posted: 08/31/2004, 10:23 AM |
|
Is there somewhere I can see an example of this? I have tired looking i the help under "Working with Custom Template Blocks" but I'm a bit confused how to adapt that to my specific application.
|
 |
 |
Facundo Nunes - IBISOFT
|
| Posted: 09/01/2004, 1:00 AM |
|
Hi!
You could see the topic Simple Report with Group into the CodeChargeStudio
Help file
--
Dott. Facundo Nunes
FacundoNunes@ibisoft.it
IBISOFT srl
Parma - Italia
"kahombur" <kahombur@forum.codecharge> ha scritto nel messaggio
news:64134b3f66ec4d@news.codecharge.com...
> Is there somewhere I can see an example of this? I have tired looking i
the
> help under "Working with Custom Template Blocks" but I'm a bit confused
how to
> adapt that to my specific application.
>
>
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
kahombur
Posts: 2
|
| Posted: 09/01/2004, 8:03 AM |
|
Ok I think I am almost there but I have one more question. How do I determine if a value is NULL? Here is the code that I have so far. The If statement always gets evaluated to false. Is this how you can check for a NULL or do I have to do something else?
HTML
<!-- BEGIN Row -->
<tr>
<td class="BlueNoteDataTD">{BidID} </td>
<td class="BlueNoteDataTD">{ContractorID} </td>
<td class="BlueNoteDataTD">{Bid} </td>
<td class="BlueNoteDataTD">{JobNumber} </td>
<!-- BEGIN Label Alt1 -->
<td class="BlueNoteDataTD">{Alt1} </td>
<!-- END Label Alt1 -->
<td class="BlueNoteDataTD">{Alt2} </td>
<td class="BlueNoteDataTD">{Alt3} </td>
</tr>
<!-- END Row -->
ASP
Function Bid_BeforeShow() 'Bid_BeforeShow @53-93C5BF00
'Custom Code @69-73254650
If Bid.Alt1.Value <> NULL Then
Bid.Alt1.Visible = True
Bid.Sorter_Alt1.Visible = True
Else
Bid.Alt1.Visible=False
Bid.Sorter_Alt1.Visible = False
End If
'End Custom Code
End Function 'Close Bid_BeforeShow @53-54C34B28
|
 |
 |
donsafar
Posts: 90
|
| Posted: 09/01/2004, 9:17 AM |
|
I have never had much luck determining if a variable is NULL (BTW you would use something like this
If NOT IsNULL(Bid.Alt1.Value) Then
instead of
If Bid.Alt1.Value <> NULL Then
- see the following for issues regarding NULL, empty, etc- http://www.evolt.org/article/Empty_Nothing_and_Null_How...6/?format=print).
I usually do my compare this way
If len(Bid.Alt1.Value > 0) Then.
Hope this helps.
_________________
Don Safar
|
 |
 |