We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Current Cell control in GridGroupingControl

I have a GridGroupingControl binded to a multitable dataset and I need to control the selection of the current table /row / cell by code. I have to control the current cell position not only in main datatable but also in all the rest of tables of the dataset. For Example, I would need to move the current selected cell from Any_Table to CLIENTs table in its third row, second cell by code. These are my questions: 1. How can I select the current table? I have ten tables... How can I know which one is the current working table? 2. How can I select the current row / cell for each table? I have tried it with code like this... this.grid.Engine.Table.CurrentRecord = this.grid.Engine.Table.FilteredRecords[this.grid.Engine.Table.FilteredRecords.Count - 1]; this.grid.Engine.TableControl.CurrentCell.MoveTo( this.grid.Engine.Table.FilteredRecords.Count, 4, Syncfusion.Windows.Forms.Grid.GridSetCurrentCellOptions.ScrollInView ); grid.Table.BeginEdit(); But I cannot get the control over current working table / cell... thank you in advance !

3 Replies

AD Administrator Syncfusion Team May 24, 2004 03:38 PM UTC

Here is a KB link that shows how you recusrsively get the nested tables down to the level of the innermost level. http://www.syncfusion.com/Support/article.aspx?id=10466 Is this what you need?


AD Administrator Syncfusion Team May 24, 2004 04:13 PM UTC

Hi Paul, check out the Grid/Samples/Grouping/HierarchySample. In its forms ctor, the grid selects the current element in a nested table (the "Spiegesild" record in the nested products table. If you add the following line before the r.SetCurrent() line, you can also specify the field that should be activated: // Make Spegesild current record if (r != null) { r.ParentTable.CurrentRecordManager.CurrentField = r.ParentTableDescriptor.Fields["CategoryID"]; r.SetCurrent(); Let me know if you have more questions. Thanks, Stefan


PA Paul Ankho May 25, 2004 12:51 PM UTC

Hi, thanks a lot for your responses. I think this code can solve my problems... r.ParentTable.CurrentRecordManager.CurrentField = r.ParentTableDescriptor.Fields[1]; r.SetCurrent(); r.BeginEdit(); I´m going to try it... Thanks a lot again! >Hi Paul, > >check out the Grid/Samples/Grouping/HierarchySample. > >In its forms ctor, the grid selects the current element in a nested table (the "Spiegesild" record in the nested products table. > >If you add the following line before the r.SetCurrent() line, you can also specify the field that should be activated: > > > // Make Spegesild current record > if (r != null) > { > r.ParentTable.CurrentRecordManager.CurrentField = r.ParentTableDescriptor.Fields["CategoryID"]; > r.SetCurrent(); > > >Let me know if you have more questions. > >Thanks, >Stefan > >

Loader.
Live Chat Icon For mobile
Up arrow icon