This is a migrated thread and some comments may be shown as answers.

[Solved] Maintain State for grid inside tabpage

6 Answers 79 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ruckumane
Top achievements
Rank 1
Ruckumane asked on 26 Mar 2012, 08:57 AM
Can anyone tell me how to maintain state of grid inside tab control when navigating to next tab page.

6 Answers, 1 is accepted

Sort by
0
Dadv
Top achievements
Rank 1
answered on 26 Mar 2012, 09:14 AM
MVC is not like WebForm, you have no in built save states.

You need to add your own (session, postback, etc..).
In the case of telerik you can do in to way :
Server binding => use Session and modify the datasource on the fly before send it to the view
Ajax binding => use Session like before or use client local data (javascript array?) and bind to the ondatabinding event

(i assume you want to say "tab" as paging mechanism ?)
0
Ruckumane
Top achievements
Rank 1
answered on 26 Mar 2012, 09:57 AM
No. I've three tab pages with grid control inside each tab page. If i modify grid inside first tab and navigate to next tag page it should maintain the modified values in the grid inside first tab.
0
Dadv
Top achievements
Rank 1
answered on 26 Mar 2012, 10:48 AM
You mean maintain in a database? I don't figure what exactly is the use for the tabs.

Do you want a batch editing like's mechanism when you change tab?
Or do you want that each change to be save in your database ?
0
Ruckumane
Top achievements
Rank 1
answered on 26 Mar 2012, 11:35 AM
i want to save each changes to be maintain in datatable when i navigate to naxt tab pages.
0
Dadv
Top achievements
Rank 1
answered on 26 Mar 2012, 01:18 PM
Ok so a batch editing like's mechanism when you change tab.

So try to do the same of this and add the custom function to your tab onselect event (look here if you use telerik tabstrip)

function onSelect(e)
{
	var grid = $("#Grid").data("tGrid");

	grid.submitChanges();
}
0
Ruckumane
Top achievements
Rank 1
answered on 26 Mar 2012, 01:41 PM
i ll try the solution.

thank you for your reply.
Tags
Grid
Asked by
Ruckumane
Top achievements
Rank 1
Answers by
Dadv
Top achievements
Rank 1
Ruckumane
Top achievements
Rank 1
Share this question
or