The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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 !
ADAdministrator 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?
ADAdministrator 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
PAPaul AnkhoMay 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
>
>