RowState issue when Grouping a Column with UseValueListForSorting set to Yes

2 replies. Last post: November 15, 2010 12:08 AM by Glenn Layaar
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
Scott FrenchMember

Hello,

We ran into this issue while trying to track down something else. When you load a set of rows using InitializeDataSource they should each start with a RowState of 'Unchanged'. The RowState should stay this way unless is it deleted or modified. We've found that if you group a grid on a column that is using a WebValueList and the setting UseValueListForSorting is set to 'Yes' that EVERY row in the grid will have a RowState of Modified. That means if you do processing of rows on PostBack as we do that EVERY row will be updated. In our case that means getting row/cell values passed to a stored procedure. We probably wouldn't have noticed this except we were getting an error that was totally unrelated to the row we were updating.

I've put together an example that should work if you drop it in the WebGridSamples project.

  1. Load the page in a browser.
  2. I've added a new column that displays the RowState on the far right.
  3. Group by CustomerID which is setup with a ValueList and UseValueListForSorting="Yes".
  4. Open some of the groups and you will see every row has a RowState of "Modified". These should have remained "Unchanged" until the row is updated or deleted.
  5. If you need confirmation this is wrong reload the page and try grouping by Contact Title. The RowStates will remain "Unchanged". Remove UseValueListForSorting="Yes" from the CustomerID column and reload again. The RowStates will not change after grouping by CustomerID.

I did an update today and am running version 7.0.7200.403 but the issue is still there.

Any help would be much appreciated as this is a current issue in our live application. Customers are experiencing adverse results due to this error.

Thanks,
Scott French

 

All times are GMT -5. The time now is 5:53 AM.
Previous Next