Frage


I am developing a windows application in which i used GridGroupingControl (Syncfusion Control). In the code i used void TableControl_MouseMove(object sender, MouseEventArgs e) event, in the event i was getting "GridTableControl" reference of GGC using : GridTableControl grdControl = sender as GridTableControl; but i also want the reference of GridGroupingControl to which GridTableControl belong, like :

GridTableControl grdControl = sender as GridTableControl;
GridGroupingControl ggc = (grdControl.Parent) as GridGroupingControl;

But here ggc is null.

Thanks in advance.

War es hilfreich?

Lösung

We can access Grid Grouping Control from TableControl by using GridGroupingControl ggc = (grdControl.GroupingControl) as GridGroupingControl instead of GridGroupingControl ggc = (grdControl.Parent) as GridGroupingControl.

Here is the code that you need to handle in MouseMove Event:

GridTableControl grdControl = sender as GridTableControl;
GridGroupingControl ggc = (grdControl.GroupingControl) as GridGroupingControl;

I hope the above code will help you achieve your result.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top