Control Flexgrid DataTable

645 views Asked by At

Im new in c# and ComponentOne Flexgrid things. Im currently working project on C# visual studio and ms access as database. Can anybody tell me how to show only last added data(record) into flexgrid table or last row (new added)? The default is show all the records on the table. Im sorry if my question is too general or not specific

1

There are 1 answers

0
Nilay Vishwakarma On

The only way to detect if a row in a table has changed is to perform a query against the table or write a trigger that would update this.

For first You can add a column of type DATETIME to the table that indicates the last updated date/time of each row. Make it NOT NULL so that you will have to write an updated DATETIME value to that column for each INSERT or UPDATE. Also, set the column to have a default of DATE() for the current date stamp or NOW() for the current date/time stamp. Then add a Validation Rule or CHECK constraint e.g. CHECK (LastUpdatedDate = NOW()) to ensure the column is actually updated on each UPDATE and INSERT.

Finally, run a MAX(LastUpdatedDate) query and fill your data table which is bound to your grid.