che
|
Posted: 09/10/2003, 4:50 PM |
|
From CCS Help...
...After the database operation has been performed (for example in the After Execute Select event), the property's value can be modified to limit the number of records displayed on the page....
My code which does nothing but should in theory limit the editable grid data_received to just displaying empty 'insert' rows.
Function data_received_DataSource_AfterExecuteSelect() 'data_received_DataSource_AfterExecuteSelect @18-B3053649
'Custom Code @48-73254650
' -------------------------
print data_received.datasource.recordset.recordcount '<<<<This works
data_received.datasource.recordset.recordcount = 0 '<<<<This don't
' -------------------------
'End Custom Code
End Function 'Close data_received_DataSource_AfterExecuteSelect @18-54C34B28
Any help as to why this doesn't work or how I can make and editable grid only display empty rows for inserting would greatly be appreciated.
thanks, che
|
|
|
RonB
|
Posted: 09/11/2003, 12:36 AM |
|
If you just want empty rows set a parameter in the query using the query builder and give it a default value that will never exist in the table. -1 for example for an int field that auto increments. This value will never be present in the table so it will always come up with just the amount of empty rows you desire. No need for complicated programming.
Ron
|
|
|
che
|
Posted: 09/11/2003, 8:59 AM |
|
Thanks, that makes sense. I love simple solutions. Sometimes they are the hardest to see unless you stumble upon them. Will give it a try.
che
|
|
|
|