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
4970
How to know when user is clicking on ColumnHeader?
posted

When clicking on XamGrid, it could be on Cell, Header, RowSelector. How to know when user is clicking on ColumnHeader in code behind?

Parents
  • 35319
    posted

    Hello,

     

    I have been looking into your question and you can set ‘ColumnSelection’ to “Single” like :

     

                <ig:XamGrid.SelectionSettings>

                    <ig:SelectionSettings  ColumnSelection="Single"/>

                </ig:XamGrid.SelectionSettings>

     

    and can handle the ‘SelectedColumnsCollectionChanged’ event like :

     

    private void xamGrid1_SelectedColumnsCollectionChanged(object sender, SelectionCollectionChangedEventArgs<SelectedColumnsCollection> e)

            {

                string selectedColumnName = e.NewSelectedItems[0].Key;

            }

     

    This event is fired only if you click on header cell.

     

    Let me know, if you need any further assistance on this matter.

Reply Children
No Data