Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
980
Ordering grid data
posted

Hi all,

 

I will present one situation:

1. There is a page with XamGrid with 3 columns and a button

2. The user is clicking on the 2 column header, thus ordering the grid data by that column

3. He clicks the button

 

Q: Inside the button click event, can I get information about which grid column is ordered (if any) and how (asc/des)?

 

Thank you

Parents
No Data
Reply
  • 21382
    Verified Answer
    posted

    Off the grid is a settings object with a sorted columns collection

    this

     

     

    .grid.SortingSettings.SortedColumns

    Each column in that collection has a SortDirection value assigned to it's IsSorted property.

    this

     

     

    .grid.SortingSettings.SortedColumns [0].IsSorted

Children