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

Fixed row possible?

3 Answers 49 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jay
Top achievements
Rank 2
Iron
Iron
Veteran
Jay asked on 11 Sep 2012, 04:16 PM
Is it possible to have a fixed row in the radgrid? That is, I'd liked a particular row to always be the first row in the grid, regardless of sorting criteria, etc.

3 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 14 Sep 2012, 04:18 PM
Hello,

To achieve the desired result you should access the row which you want to be fixed and persist its index on sorting.

All the best,
Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Jay
Top achievements
Rank 2
Iron
Iron
Veteran
answered on 14 Sep 2012, 06:18 PM
Uh, could you explain that a bit more? I'm not sure what you mean by persist its index. I haven't tried this yet but I was going to try something in the grid's prerender event like removing the row from the items collection and reinserting it at the beginning. Is that what you're suggesting?
0
Jay
Top achievements
Rank 2
Iron
Iron
Veteran
answered on 20 Sep 2012, 03:56 PM
I ended up implementing this by setting AllowCustomSorting="true" on the grid's MasterTableView, performing sorting myself, and then moving the row I wanted fixed around in the sorted list as necessary before setting the list as the grid's datasource.
Tags
Grid
Asked by
Jay
Top achievements
Rank 2
Iron
Iron
Veteran
Answers by
Pavlina
Telerik team
Jay
Top achievements
Rank 2
Iron
Iron
Veteran
Share this question
or