WebGrid with FullPagePostback and multiple selection enabled

9 replies. Last post: August 3, 2015 1:19 AM by Yudi
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
Bob ElvinMember

I have a webgrid that's trying to use all these features at once:

  • multiple row selection using selected rows (i.e. not the row checker column) with AllowMultipleSelection="Yes"
  • persist selected rows with RestoreRowSelection="All" and PersistRowChecker="false"
  • full page postback on selected row change with RowChangedAction="FullPagePostback"

The scenario is this grids acts as selection criteria for the user. Selecting a row should immediately return the search results for that row (hence the reason for the fullpagepostback) and selecting multiple rows should returns the results for multiple items.

The issue is around selecting multiple items. Selecting one row works great: the post back fires, the server-side code checks the selected items and retrieves data, and the results are displayed. Selecting multiple rows has a problem though, the grid looses track of the first selected row. For example selecting 3 rows with shift+left click causes the grid to only show 2 selected rows after the postback. Selecting individual rows with ctrl+left click causes previously selected rows to disappear.

The grid works fine if FullPagePostback is not turned on, it will select single rows or multiple rows without a problem. However, the users don't like hitting a Search button after making their selections and want it to happen automatically, hence the postback. Multiple row selection doesn't seem to get along with FullPagePostback though.

Is there a way to get this to work? I tried using the IsRowChecker column instead of selected rows but it still has the same issue with loosing track of which rows are selected during the postbacks.

All times are GMT -5. The time now is 4:47 PM.
Previous Next