Rosario
Posts: 54
|
| Posted: 02/03/2005, 5:52 AM |
|
I have a record set set up to display labels in the maint section of a display page that has possiblty 100 differnt rows. Not all of the rows always contain information in them and I hate to display nothing, I would just rather hide the whole row just like in access when you use the "can shrink" . Can anyone help?
|
 |
 |
mrachow
Posts: 509
|
| Posted: 02/04/2005, 12:12 AM |
|
Can't you sort them out by SQL (e.g. IS NULL, LENGTH(..) = 0 aso)?
_________________
Best regards,
Michael |
 |
 |
Rosario
Posts: 54
|
| Posted: 02/04/2005, 8:22 AM |
|
I don't think so, I am using ASP with MS access database
|
 |
 |
Benjamin Krajmalnik
|
| Posted: 02/04/2005, 10:12 AM |
|
There is a "Before show row" event at the grid level.
You can probably latch into it.
Set it to return a value of False if you want the row suppressed and True if
you want it shown..
Next, go to the .asp file (not the _events.asp file) and search for
BeforeShowRow.
YOu will find something as below
While NOT Recordset.EOF AND ShownRecords < PageSize
If RenderAltRow Then
Alt_Edit.Value = "View"
Alt_Edit.Parameters = CCGetQueryString("QueryString",
Array("ccsForm"))
Alt_Edit.Parameters = CCAddParam(Alt_Edit.Parameters,
"ScheduledActivitiesKeyID", Recordset.Fields("Alt_Edit_param1"))
Alt_Edit.Page = "ActivityView.asp"
Alt_Activity.Value = Recordset.Fields("Alt_Activity")
Alt_ActPath.Value = Recordset.Fields("Alt_ActPath")
Alt_ActStep.Value = Recordset.Fields("Alt_ActStep")
Alt_DateDue.Value = Recordset.Fields("Alt_DateDue")
Alt_Accountname.Value =
Recordset.Fields("Alt_Accountname")
Alt_Contact.Value = Recordset.Fields("Alt_Contact")
Alt_SchedBy.Value = Recordset.Fields("Alt_SchedBy")
Alt_SchedOn.Value = Recordset.Fields("Alt_SchedOn")
CCSEventResult = CCRaiseEvent(CCSEvents,
"BeforeShowRow", Me)
AltRowControls.Show
Else
Edit.Value = "View"
Edit.Parameters = CCGetQueryString("QueryString",
Array("ccsForm"))
Edit.Parameters = CCAddParam(Edit.Parameters,
"ScheduledActivitiesKeyID", Recordset.Fields("Edit_param1"))
Edit.Page = "ActivityView.asp"
Activity.Value = Recordset.Fields("Activity")
ActPath.Value = Recordset.Fields("ActPath")
ActStep.Value = Recordset.Fields("ActStep")
DateDue.Value = Recordset.Fields("DateDue")
Accountname.Value = Recordset.Fields("Accountname")
Contact.Value = Recordset.Fields("Contact")
SchedBy.Value = Recordset.Fields("SchedBy")
SchedOn.Value = Recordset.Fields("SchedOn")
CCSEventResult = CCRaiseEvent(CCSEvents,
"BeforeShowRow", Me)
RowControls.Show
End If
RenderAltRow = NOT RenderAltRow
Recordset.MoveNext
ShownRecords = ShownRecords + 1
Surroung the AltRowControls.Show and the RowCOntrolsShow with logic based on
the CCSEventResult. Do the same for the "RenderAltRow = NOT RenderAltRow
That should do it. I have not tried it, however.
The methodology I use is simple. Look for an embed. See if what you want
to accomplish can be dones dtrictly in embed code. If it cannot, go to the
asp file and look for the embed. See how it interacts with the application
and modify the generated code.
|
|
|
 |
Rosario
Posts: 54
|
| Posted: 02/04/2005, 10:26 AM |
|
Before Show Row Event
Applies to
Editable Grid, Grid not a record, and thats where i need to hide rows that contain null
|
 |
 |
peterr
Posts: 5971
|
| Posted: 02/04/2005, 12:08 PM |
|
This could involve some work, and but probably could be achieved using this method: http://docs.codecharge.com/studio/html/ProgrammingTechn...ormControl.html
So you would need to embed your <tr> & <td> tags plus the TextBox within a block that has the same name as the TextBox. Then you can hide the TextBox and the whole block (therefore row) will be hidden.
(I haven't tried this, but I think that I've seen this method being used somewhere)
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
Rosario
Posts: 54
|
| Posted: 02/04/2005, 1:17 PM |
|
That dose not help. Hide Rows that contain null values is what I am trying to do.
|
 |
 |
peterr
Posts: 5971
|
| Posted: 02/04/2005, 1:22 PM |
|
Why wouldn't this work for null values? I thought that this was exactly what you asked about. (?)
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
Benjamin Krajmalnik
|
| Posted: 02/04/2005, 9:39 PM |
|
Sorry for the confusion. You mentioned a recordset so I immediately thought
it was a grid.
For a record, you can enclose the <tr> </tr> inside a <!-- BEGIN
ComponentType ComponentLabel --> <!--END ComponentType ComponentLabel -->.
If you set the visible property of the component to false, it will supress
the entire row achieveing what you desire.
|
|
|
 |
|