The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hi. Nice site :)
As the topic says. When i click on a colum header, i want to sort the data in the datagrid..
The datagrid is using an arraylist as source..
So question 1:
How do I "catch" the click on certain column header
question 2:
How do I sort the data when clicking on the column header.
Thank you,
ARAnupama Roy Syncfusion Team November 2, 2005 07:48 AM UTC
Hi Lasse,
Do you have many columns in your ArrayList? You can write code on the DataGrid''s MouseDown event to catch the click on Colum header.
And for sorting the data,save your data in arrary list and bind your dataview and set the Sort property of DataView .After that call DataGrid''s Refresh method.
If you are populating from a database,you can use the SQL statement Select...from...OrderBy ,but you need to load data from database every time you want to sort the data, which makes application slower.
Regards,
Anu.
ADAdministrator Syncfusion Team December 16, 2005 12:54 PM UTC
Hi
How do i know which coloumn is selected in the mousedown event?
thanks in advance
ADAdministrator Syncfusion Team December 16, 2005 12:59 PM UTC
Hai
I think thr is no need of any code.Just keep the AllowSorting=true. Am i right?