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

grid sort after insert (using user control)

4 Answers 81 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Morten
Top achievements
Rank 2
Iron
Iron
Iron
Morten asked on 13 Feb 2010, 09:45 PM
I'm using a user control to insert new records into a grid. How can I control the sorting of the grid after the insert has completed?

4 Answers, 1 is accepted

Sort by
0
Radoslav
Telerik team
answered on 17 Feb 2010, 03:02 PM
Hello Morten,

Could you please elaborate a bit more on your scenario? Are you trying to apply sort criteria after adding a new item into the RadGrid?

By default the RadGrid keeps the sorting criteria after adding a new row. You could check out the following online demo which demonstrates adding the new items, via user control and sorting the RadGrid:
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/usercontroleditform/defaultcs.aspx

Additionally if you want to apply custom sorting criteria after adding the new row, please check out the below demo which demonstrates how to achieve that:
http://www.telerik.com/help/aspnet-ajax/grdsortingexpressions.html

Kind regards,
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
Frank
Top achievements
Rank 2
answered on 01 Feb 2012, 10:46 AM
I have the same problem.
Radgrid moves to the last page, after inserting a new record.
I want the grid to stay on page 1.
- How to do?

Also, there is a dead link the post from Telerik:
http://www.telerik.com/help/aspnet-ajax/grdsortingexpressions.html

Frank
0
Shinu
Top achievements
Rank 2
answered on 01 Feb 2012, 10:58 AM
Hello Frank,

Try setting InsertItemPageIndexAction property as shown below.
aspx:
<MasterTableView InsertItemPageIndexAction="ShowItemOnCurrentPage">
Here is the link.
Sort Expressions

-Shinu.
0
Frank
Top achievements
Rank 2
answered on 01 Feb 2012, 11:25 AM
Yes, perfect. Thanks.
Tags
Grid
Asked by
Morten
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Radoslav
Telerik team
Frank
Top achievements
Rank 2
Shinu
Top achievements
Rank 2
Share this question
or