Justman
|
| Posted: 12/31/2004, 1:16 AM |
|
Hi Fellows,
I am loking for a way to fill a listbox in an editable grid using two different sql statement depending on the state of the Editable grid.
Example:
if ($editable_grid_form->EditMode)
|
|
|
 |
Martin K.
|
| Posted: 12/31/2004, 4:03 AM |
|
Hello.
Take a look in the Help (F1) from CCS:
Keyword : EditMode
There are some examles for cecking is EditMode or AddMode or not.
greets martin
|
|
|
 |
Justman
|
| Posted: 12/31/2004, 5:54 AM |
|
Hi MArtin,
Thanks for your suggestion. The helpfile dosen't have an example for editable grid modes.
(Part 1)
The situation is that I have an editable grid with a listbox. When the form is accessed, the lisbox will populate each row with data from the database table Control Source.
(Part 2)
But I have chosen to have 3 empty rows in the same editable grid and would like to fill the three listboxes with records from sql statement that doesn't contain records that have been listed already in part (1)
In the before_show event of the lisbox, I have tried something like:
if(editable->Editmode)
{
$db->Query(".............");
}
else if(!editable->EditMode)
{
$db->query("....");
}
but it didn't work.
Cheers,
Justman
Quote Martin K.:
Hello.
Take a look in the Help (F1) from CCS:
Keyword : EditMode
There are some examles for cecking is EditMode or AddMode or not.
greets martin
|
|
|
 |
peterr
Posts: 5971
|
| Posted: 12/31/2004, 12:46 PM |
|
The editable grid is always in dual edit/add mode because some records will be added and other updated.
I'm not sure yet what you can do (would need to test some ideas) and for now I'm just pointing this fact. Maybe you should just check if the value of some field is empty, assuming that it will be always non-empty for existing records.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
|