質問


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.

役に立ちましたか?

解決

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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top