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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Current Cell control in GridGroupingControl

Thread ID:

Created:

Updated:

Platform:

Replies:

14276 May 24,2004 11:24 AM UTC May 25,2004 12:51 PM UTC Windows Forms 3
loading
Tags: Grouping
Paul Ankho
Asked On May 24, 2004 11:24 AM UTC

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 !

Administrator [Syncfusion]
Replied On 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?

Administrator [Syncfusion]
Replied On 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

Paul Ankho
Replied On 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 > >

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;