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

Reasonable setting of CurrentRow after delete of selected rows

3 Answers 98 Views
GridView
This is a migrated thread and some comments may be shown as answers.
erwin
Top achievements
Rank 1
Veteran
Iron
erwin asked on 04 Sep 2009, 12:49 PM

What's a good strategy to make the grid more user friendly in the following situation:

The grid allows for multiple selection of rows and the user can delete selected rows.
Per default, if the selection includes the current row, and the data is reloaded, the current row is reset to the first row of the datasource.
This can be a bit confusing, especially if the user has set custom sorting differently from the orignial sort order of the dataset.

I would like to have the current row after the reload set to either the row immediately preceeding or following the previously selected (and now deleted) rows. That is, the grid should not, or only minimally scroll the contents.

A proposed solution should work regardless of the data that is loaded into the datasource. The code should not have to know the logical ID column of the rows.

Any suggestions?

Regards
erwin

3 Answers, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 07 Sep 2009, 02:12 PM
Hello erwin,

Thank you for this suggestion. We have it in mind and we will change the grid behavior in our future versions accordingly. Unfortunately, there is no work around for this issue. If you have more questions, don't hesitate to ask.

Best wishes,
Jack
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
erwin
Top achievements
Rank 1
Veteran
Iron
answered on 07 Sep 2009, 03:36 PM
Jack, thanks for the response.
I was not necessarily suggesting that the grid would implement this but was asking about how to implement it myself.

I currently have a workaround, but that relies on knowledge of the data source. (I store the value of an ID Column of the row that I would like to be current after the reload).

I would like to make that more general, but have to find a way to locate a logical row in the grid after a reload of the data source.

Regards
Erwin

0
Jack
Telerik team
answered on 08 Sep 2009, 08:42 AM
Hello erwin,

I understand. Nevertheless, we think that the behavior is wrong and we will correct it. However, I was not able to find a general solution. This is the reason why I said that there is no work around. We will appreciate if you share your solution with the community.

Regards,
Jack
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
GridView
Asked by
erwin
Top achievements
Rank 1
Veteran
Iron
Answers by
Jack
Telerik team
erwin
Top achievements
Rank 1
Veteran
Iron
Share this question
or