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

gridview insert and select with pager

4 Answers 72 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Gilberto
Top achievements
Rank 1
Gilberto asked on 30 Aug 2010, 07:46 PM
How can i select the row just inserted if the gridview has a pager?

How to know which page the inserted row will be placed?

Thanks

Gilberto

4 Answers, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 31 Aug 2010, 09:05 AM
Hi Gilberto,

Well, that would be difficult to do without writing some code and probably defeating the purpose of paging. Could you please provide us with more information about the functionality that you are trying to implement? 

Kind regards,
Milan
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
ashwin
Top achievements
Rank 1
answered on 01 Sep 2010, 11:53 AM
Hi,
I'm also having the same problem.If You get a solution pls let it me

Thanks & Regards,
ashwin
0
Gilberto
Top achievements
Rank 1
answered on 15 Feb 2011, 05:37 AM
Hello Milan,

I will try to explain a bit more.

I have one form and a grid in same window.

The form for inserts and updates purposes, and one grid which is bound to the same entity with a pager,

When i insert a record and the grid is empty (just one page) everything is ok.

This is the sequence:

context.AddToEntity(object);
context.SaveChanges();
radgridview.rebind();
radgridview.SelectedItem = object; // just added

But if i have several pages, the record just added is not selected and is not shown

The sort in the grid does not allow me to predict which page the record will be inserted, it depends on data entry.

Any way to known which page select to show the inserted record

Thanks
0
Milan
Telerik team
answered on 18 Feb 2011, 03:40 PM

Hi Gilberto,

Well, it is possible to find the page of the newly inserted item but that will require to download all items from the server which defeats the purpose of paging. 


Greetings,
Milan
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
Tags
GridView
Asked by
Gilberto
Top achievements
Rank 1
Answers by
Milan
Telerik team
ashwin
Top achievements
Rank 1
Gilberto
Top achievements
Rank 1
Share this question
or