Professional UI Solutions
Site Map   /  Register


Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » Sorting event in a grid Collapse All
Subject Author Date
Nader Mimouni Feb 12, 2009 - 8:52 AM

How can I handle sorting event in one grid?

Nader Mimouni Feb 13, 2009 - 8:58 AM


Technical Support Feb 12, 2009 - 12:03 PM

The CExtGridWnd class implements the CExtGridDataProvider::IDataProviderEvents interface (i.e. the CExtGridWnd class is derived from the CExtGridDataProvider::IDataProviderEvents class). The CExtGridDataProvider::IDataProviderEvents::OnDataProviderSortEnter() virtual method is invoked before grid data sorting. The CExtGridDataProvider::IDataProviderEvents::OnDataProviderSortLeave() virtual method is invoked after grid data sorting. The CExtGridDataProvider::IDataProviderEvents::OnDataProviderSwapSeries() virtual method is invoked during grid data sorting when two rows are columns become swapped. The CExtGridWnd::OnDataProviderSwapSeries() method is overridden implementation of the CExtGridDataProvider::IDataProviderEvents::OnDataProviderSwapSeries() virtual method. The CExtGridWnd::OnDataProviderSwapSeries() method modifies grid selection on the fly during re-sorting of grid rows or columns. As result, all the grid cells which were selected before sorting are staying selected after sorting.