Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

LMDGrid: sorting issue

I fill a LMDGrid table using a method that first deletes all data rows and then adds a new datarow for each data record to be shown. This works fine.

Then I sort the table in an ascending order by clicking on a column header. When I modify a data record in a separate window (not in the LMDGrid) and call my method to show the modified data, most of the rows are empty, only the last data row contains data.

When I sort the table in an descending order all data rows are shown, but the columns with higher column idx than the sorted column are not filled with data completely.

The reason for that behavior might be the activated sorting. Therefore I tried to deactivate the sorting by setting sort kind to Lmdgrid::skNone for each column before adding data. But this does not have an effect.

How can I solve this issue?   

Code snippet of my method:



 //deactivae sorting (does not help...)

 try {
  for (int i=tbRegistrations->DataRowCount-1; i>=0; i--) {

  for (int i=0; i<FRegistrationList->Count; i++) {
   TFBVRegistrationObject *obj=(TFBVRegistrationObject*)FRegistrationList->Items[i];
   TFBVRegistrationData data=obj->getData();
   //get data from object
   //write data to grid
   int rowidx=tbRegistrations->DataRowCount-1;
 __finally {


Sign In or Register to comment.