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
305
How to make ultragrid always in groupby mode
posted

I want my grid on the form to display always in groupby mode. how can i do that?

 

Thank you

  • 37774
    Verified Answer
    posted

    I'm not sure that I understand the question.  Do you want there to always be a column that is grouped and prevent the user from changing it?  If so, you could add the grouping programmatically (grid.DisplayLayout.Bands[0].SortedColumns.Add(key, descending, true) and then set the grid.DisplayLayout.GroupByBox.Hidden property to true so that they can't alter the grouping, or you could handle the BeforeSortChange event and cancel it if they are removing a grouped column, but this might be unintuitive to the users since they'll be able to drag the column into/out of the GroupBy area but it won't do anything.

    -Matt