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

GridButtonColumn sorting on a RadGrid?

5 Answers 164 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Anthony
Top achievements
Rank 1
Anthony asked on 24 Jul 2008, 04:39 PM
I have a RadGrid on a page with two columns, one GridButtonColumn and one GridBoundColumn.

The GridBoundColumn sorts fine, but the GridButtonColumn does not sort.  Does this column type not support sorting without further customization?

5 Answers, 1 is accepted

Sort by
0
Vladimir
Top achievements
Rank 1
answered on 24 Jul 2008, 07:47 PM
Hi Anthony,

By default button columns does not support sorting - you can use template column with a regular button in ItemTemplate instead.

Vlad
0
Anthony
Top achievements
Rank 1
answered on 24 Jul 2008, 07:49 PM
Great!  I'll try it out, thanks for the quick feedback.
0
Shinu
Top achievements
Rank 2
answered on 25 Jul 2008, 06:24 AM
Hi Anthony,

You can also refer the following code library submission which shows how to achieve sorting with GridButtonColumn.
Filtering and sorting for GridButtonColumn

Cheers
Shinu.
0
Anthony
Top achievements
Rank 1
answered on 29 Jul 2008, 03:46 PM
Vlad,

I added a GridTemplateColumn, but it still doesn't seem to support sorting.  Am I missing something?
0
Anthony
Top achievements
Rank 1
answered on 29 Jul 2008, 03:56 PM
I found my own error.

I hadn't set the SortExpression.  All's well.  Thanks for the help.
SSirica
Top achievements
Rank 3
Iron
Iron
Iron
commented on 20 Sep 2023, 06:07 PM

This does not work in a Web Application Project using .Net 4.8.  
Rumen
Telerik team
commented on 25 Sep 2023, 06:17 AM

Hi Steve,

We are not aware of sorting issues related to the .NET framework version.

Note that the proper binding technique is crucial for the proper functioning of RadGrid features. With that in mind please make sure you are either using the NeedDataSource event to bind data to the RadGrid, or you are binding the control to a Declarative DataSource. Check out the How to bind RadGrid properly on server-side article on the matter. Also, make sure you are not calling the DataBind() method anywhere for the RadGrid.

If all with binding data to the RadGrid is fine, I would suggest you try setting the EnableLinqExpressions (if set) to false and see if that would affect the behavior.

If none of the suggestions above is helpful, we will need to learn more about your RadGrid configuration and scenario. It would be very helpful if you manage to isolate the problem in a runnable sample and share it so we can investigate the issue locally, see Isolating a Problem in a Sample Project.

Tags
Grid
Asked by
Anthony
Top achievements
Rank 1
Answers by
Vladimir
Top achievements
Rank 1
Anthony
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Share this question
or