How to hold and pass a value bet webgrid events across grid refresh

1 reply. Last post: October 2, 2011 6:18 AM by Yudi
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
Madhavan GMember

Hi,

 

I want to load the same no. of records, which are already loaded into the grid across grid refresh.

Scenario:

The default "VirtualPageSize" is 50 records, first time 50 records will be loaded bydefault, then as user click on "Load More Date" from webgrid taskbar, the no. of sets of 50 records will be added to the grid, if available.

Suppose I click 3 times on "Load More Data" them 3 sets of 50 records will be loaded to grid apart from the default 50 records, that is total 200 records are loaded.

Now if I select 110th record and perform some operation, the do the grid refresh, it should retain 200 records and it should retain the item selection.

To achieve this I want to store WebGrid1.VirtualLoadArgs.RequestedRows in WebGrid1_InitializeDataSource event when "Load More Data" icon is clicked from the grid taskbar, so next time when grid is refreshed, the same value I want to set the same value to e.Layout.VirtualPageSize in WebGrid1_InitializeLayout event.

I have tried using page local variable, hiddenfield, context, cookies etc, but nothing seems to working.

I am not able to hold the value and pass it across the WebGrid1_InitializeDataSource and WebGrid1_InitializeLayout events.

Please suggest as soon as possible.

 

Thanks and Regards

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