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

Textbox value persistance in Radgrid.

2 Answers 135 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Swapna M
Top achievements
Rank 1
Swapna M asked on 08 Apr 2010, 07:57 AM
Hi,
    I have textbox(GridTemplateColumn) in Radgrid.
Textbox values are not persisting when i switch through pages in grid.
Please let me know how to persist the textbox values?
    And how to access all the rows in the grid.

radGrid.MasterTableView.Items gives rows of the current page only.
I want to access all the rows across pages.

Thank You.


2 Answers, 1 is accepted

Sort by
0
Accepted
Radoslav
Telerik team
answered on 13 Apr 2010, 10:26 AM
Hi Swapna,

One possible solution is to keep all new values which is added into the textboxes, for every page, into the Session or ViewState or white them to the XML file. However this approach could lead to performance problems, because the ViewState or Session will grow up and also reading/writing to the files is time consuming operation.

Another solution is to save the value from each textbox in database, when the users switch through pages in RadGrid. I suggest you to use this approach.

To access all items in all pages into the radGrid you could try following approach:
Disable the grid paging, temporarily, retrieve all the rows and then enable paging back again. This approach could be achieved by setting the AllowPaging property of the grid to false at a certain stage of the lifecycle and rebind the control invoking its Rebind() method, then traverse all items in it. However this could lead to performance issues too.

I hope this helps.

All the best,
Radoslav
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Swapna M
Top achievements
Rank 1
answered on 13 Apr 2010, 03:22 PM
Thanks Radoslav.
Tags
Grid
Asked by
Swapna M
Top achievements
Rank 1
Answers by
Radoslav
Telerik team
Swapna M
Top achievements
Rank 1
Share this question
or