GridView Hierarchical Child Rows and Cells Customizing
When we bind the GridView component to hierarchical data, we may customize the child rows and cells. The Kettic GridView control allows users customize the child rows of hierarchical data. In this article, we are going to talk about how to access the child templates, how to expand all rows including parent and child rows, how to iterate the child rows collection of a chosen parent row in hierarchy GridView and how to create formatting cells in a child template.
How to Access Child Templates in C#.NET
The Kettic GridView provides the GridView.MasterTemplate.ChildTemplates templates collection for users to access to the child templates. The following C# code demonstrates how to customize the AutoSizeColumnsMode property to Fill in the first child template to GridView.
How to Expand Hierarchical Rows in C#.NET
The Kettic GridView allows users to expand all hierarchical rows including parent and child rows, and then iterate through the rows and change the value of the IsExpanded property to true. The following are the C# code that shows how to expand all child rows of Kettic GridView.
How to Iterate Child Rows in C#.NET
The Kettic GridView provides the support of iterating the child rows collections. This is achieved by using the grid template GetChildRows metod. The following are the C# code that shows how to iterate the child rows collection of a chosen parent row in hierarchy GridView.
How to Create Formatting Cells in C#.NET
The Kettic GridView allows users to create formatting cells in GridView. The following are the C# code that shows how to change the back color of the grid cells in the child.
One more example is to change the header row height of the child template. The C# code below demonstrates how to change the header height of the first level child template.
|
UI Controlsfor Windows Forms .NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI DesignWinForms UI Controls WinForms Buttons UI Control WinForms Calendar UI ControlWinForms Carousel UI ControlWinForms Chart UI ControlWinForms Clock UI ControlCommandBar UI ControlWinForms Dock UI ControlDesktop Alert UI ControlDropDown List UI ControlWinForms Editor UI ControlForms and Dialogs UI ControlWinForms GridView UI ControlGridView - Get Started in C#GridView - PropertiesGridView - ColumnGridView - RowGridView - CellsGridView - EditorsGridView - Context MenuGridView - Populating with DataGridView - Hierarchical GridData Binding AutomaticallyData Binding ProgrammaticallyXML Data SourceResize Child GridVieInfoOne to Many RelationsExpand RowsGridView - SelectionBasic SelectionMultiple SelectionProgrammatical Rows & Cells Selection GridView - ScrollingGridView - SortingSet ProgrammaticallySorting ExpressionsGridView - GroupingGridView - FilteringGridView - Expression EditorInsert/ Update/ Delete RecordsGridView - View DefinitionGridView - Exporting DataStyling and AppearanceGridView - LocalizationSave and Load LayoutGridView - Print SupportWinForms ListView UI ControlWinForms Menu UI ControlWinForms ComboBox UI ControlWinForms PageView UI ControlPanels and Labels UI ControlWinForms Panorama UI ControlWinForms PDFViewer UI ControlWinForms Property Grid UI ControlWinForms Ribbon UI ControlWinForms PivotGrid UI ControlWinForms RichTextBox UI ControlWinForms Rotator UI ControlWinForms Scheduler UI ControlWinForms Shortcuts UI ControlWinForms SpellChecker UI ControlWinForms Track & Status UI ControlWinForms TreeView UI ControlWinForms Wizard UI ControlWinForms Test UI ControlWinForms Theme UI Control |