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
695
Hide a column when clicked
posted

Is it possible to hide a column when the column in question is clicked?

  • 8576
    Offline posted
    Hi Martin -
     
    Try this:
     
    1. Set the Field.Settings.LabelClickAction for the field in question to SortByOneFieldOnly
    2. Add a listener for the XamDataGrid's Sorting event
    3. When the event is fired, set the Cancel parameter to true (this will stop the sort from taking place).  The SortDescription property of the event's args exposes a FieldSortDecription object that contains a Field property
    4. Set the Field.Visibility property to collapsed
    Joe Modica