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
285
Grouping by column causes SortChange
posted

Hi there,

Is there any way to determine inside BeforeSortChange whether the event is raised because user is sorting by a column or grouping by a column?

The reason I need this distinction is because I need to cancel sorting inside BeforeSortChange when user single-clicks a column header and only allow it when user double-clicks the header. I'm setting a flag inside DoubleClickHeader and manually manipulating e.Header.Band.SortedColumns inside.

Unfortunately, when a user drags a column header into Group By area above, BeforeSortChange is also raised. If I cancel the event, the grouping is also canceled.

Any help is gladly apreciated.

-olf.