Select Multiple Items from Data Grid in C#.NET
The Kettic DataGridView provides the support of multiple selection for end users to select more than one items at a time from the data that are shown in grid. However, the functionality doesnât enable by default setting. To enable this feature, GridView UI designers need to change the value of the MultipleSelect property to true for their C# Windows Forms application.
How to Select Multiple Rows in C#
To perform the multiple rows selection, we need enable the MultipleSelect property first, and then set the SelectMode to GridViewSelectMode.SelectFullRows. The C# code below shows how to achieve this.
After enabling the multiple rows selection functionality to GridView, we can perform the multiple rows selection through different approaches as following,
How to Select Multiple Cells in C#
To select multiple cells from data grid, we need enable the MultipleSelect property to DataGrid. And then set the SelectMode to GridViewSelectMode.SelectCells. The C# code below shows how to achieve the setting.
After enabling the multiple cells selection functionality to GridView, we can perform the multiple cells selection through different approaches as following,
How to Perform Rectangle Selection in C#
The Kettic DataGridView allows users easily make a rectangle rows or cells selection. To achieve this, we need enable the MultipleSelect property, then hold the left mouse button, and finally move the mouse to select rows and cells in a rectangle.
When we do not need display the TranslucentRectangle in the process of performing multiple selection, we need disable the DisplayTranslucentSelectRectangle property. The C# code below shows how to achieve this.
|
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 |