SmartClient Version: v10.0p_2014-09-30/LGPL Development Only (built 2014-09-30)
Based upon other issues we have been experiencing (see thread http://forums.smartclient.com/showthread.php?p=127059&posted=1#post127059 for an example), it felt like you were really pushing us toward not using a DataSource for our grids where we are not using a remote data set.
I tried this, and have run in to a significant set of issues where it appears to me that the grid functionality is quite different when you do not have a data source. Maybe I am missing something, but here's what I have run into...
1. If I do not have a DataSource associated with the grid, I cannot do updates on the grid by calling ListGrid.updateData() - it exceptions saying this is not supported and I should update the record directly.
2. If I update the record directly (as outlined in item #1), many things behave differently than they do when I have a DataSource and use updateData(). They are:
A. The display does not automatically update. I have dealt with this by getting the record index and then calling ListGrid.refreshRow(). This is unnecessary when using updateData() and a DataSource.
B. If the fields changed include sort fields, the record is not automatically moved to it's correct new position. I have dealt with this by calling ListGrid.resort(). This is unnecessary when using updateData() and a DataSource.
C. The grid does not appear to be paying any attention to filter criteria on the grid at all. It does not appear to apply the filter during the initial setData(), or on any changes to the record. I have not found a way to get the grid to filter records when not using a DataSource. This is automatic when using updateData() and a DataSource.
D. If the fields changed include groupBy fields, the record is not automatically moved to the correct group. I have tried to deal with this by calling ListGrid.setGroupBy(ListGrid.getGroupBy()). This is unnecessary when using updateData() and a DataSource. In addition, regrouping causes expanded groups to be collapsed where updateData() on a DataSource does not. Also, on a large set of data, regrouping the grid seems to take noticeably longer than the automatic repositioning of the modified record when updating on a DataSource.
I've attached sample code that is similar to our application using both techniques.
At this point I don't know if I am doing something wrong when not using a DataSource or not. If I am not, issues C & D above make using the grid without a DataSource unacceptable. But using a DataSource in these scenarios appears to be at odds with what you are recommending we should be doing because of other issues we have been having.
Am I doing something wrong here? If not, please recommend a direction that provides the functionality we need from the grid.
Based upon other issues we have been experiencing (see thread http://forums.smartclient.com/showthread.php?p=127059&posted=1#post127059 for an example), it felt like you were really pushing us toward not using a DataSource for our grids where we are not using a remote data set.
I tried this, and have run in to a significant set of issues where it appears to me that the grid functionality is quite different when you do not have a data source. Maybe I am missing something, but here's what I have run into...
1. If I do not have a DataSource associated with the grid, I cannot do updates on the grid by calling ListGrid.updateData() - it exceptions saying this is not supported and I should update the record directly.
2. If I update the record directly (as outlined in item #1), many things behave differently than they do when I have a DataSource and use updateData(). They are:
A. The display does not automatically update. I have dealt with this by getting the record index and then calling ListGrid.refreshRow(). This is unnecessary when using updateData() and a DataSource.
B. If the fields changed include sort fields, the record is not automatically moved to it's correct new position. I have dealt with this by calling ListGrid.resort(). This is unnecessary when using updateData() and a DataSource.
C. The grid does not appear to be paying any attention to filter criteria on the grid at all. It does not appear to apply the filter during the initial setData(), or on any changes to the record. I have not found a way to get the grid to filter records when not using a DataSource. This is automatic when using updateData() and a DataSource.
D. If the fields changed include groupBy fields, the record is not automatically moved to the correct group. I have tried to deal with this by calling ListGrid.setGroupBy(ListGrid.getGroupBy()). This is unnecessary when using updateData() and a DataSource. In addition, regrouping causes expanded groups to be collapsed where updateData() on a DataSource does not. Also, on a large set of data, regrouping the grid seems to take noticeably longer than the automatic repositioning of the modified record when updating on a DataSource.
I've attached sample code that is similar to our application using both techniques.
At this point I don't know if I am doing something wrong when not using a DataSource or not. If I am not, issues C & D above make using the grid without a DataSource unacceptable. But using a DataSource in these scenarios appears to be at odds with what you are recommending we should be doing because of other issues we have been having.
Am I doing something wrong here? If not, please recommend a direction that provides the functionality we need from the grid.
Comment