chocomb
|
| Posted: 03/23/2005, 11:43 AM |
|
I am trying to hide rows in a grid. I can not generate in one step the sql to display the proper records, so i have some custom php code in the before show row event, to determine if the row should be shown.
I can get the row to now show but setting a label to "style='display:none'".
But the problem is when there are multiple pages if some rows are hidden the page does not display 10 rows, because some are hidden.
So i am looking for what variable controls how many records Codecharge thinks are on the page, so I can decrement that number when i hide a row so it adds another record to that page.
I also might need to decrement the total number of records so I don’t get a bunch of "blank" pages for the last pages.
Any help would be greatly appreciated. Or if any one knows of an easer way of hiding rows I am open to other methods.
I looked at the examples and the only ones I could find only hide part of a row, I want to hide the entire row.
|
|
|
 |
peterr
Posts: 5971
|
| Posted: 03/23/2005, 12:33 PM |
|
If you cannot generate in one step the sql to display the proper records, then you should be able to modify the SQL dynamically, or build whole WHERE statement.
So in the "Before Execute Select" event you can create your "WHERE" logic, then use the code like:
$form_name->ds->Where = (some WHERE statement that you created dynamically);
Hope this helps, because hiding grid rows and recalculating the record count for the navigator can be messy.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
thinwolfster
Posts: 3
|
| Posted: 03/23/2005, 12:52 PM |
|
I should be able to use the dynamic modificaiton of the where statement.
It is a pretty complicated what I am tring to select and I could not figure out how to do it with one slelct statemnt. But i thihk i have an idea how do some prelookup and caculations then use the
$form_name->ds->Where =
|
 |
 |
Damian Hupfeld
|
| Posted: 03/24/2005, 4:06 AM |
|
You need to nest your sql statement so that you do an initial serach, and
the search these results all in your one statement.
"thinwolfster" <thinwolfster@forum.codecharge> wrote in message
news:54241d6fd7f8bd@news.codecharge.com...
>I should be able to use the dynamic modificaiton of the where statement.
>
> It is a pretty complicated what I am tring to select and I could not
> figure out
> how to do it with one slelct statemnt. But i thihk i have an idea how do
> some
> prelookup and caculations then use the
> $form_name->ds->Where =
>
>
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
|