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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Excel Like Copypaste to clipboard in Gridgroupingcontrol

Thread ID:





75900 Aug 14,2008 06:26 AM UTC Aug 14,2008 10:40 AM UTC WinForms 1
Tags: GridControl
Sumit Jha
Asked On August 14, 2008 06:26 AM UTC

I am using Gridgroupingcontrol. I want to implement excel type cut-copy feature in the control.
When I am using this.m_adminDataGridViewControl.TableOptions.AllowSelection = GridSelectionFlags.None;
It doesn't allow to select individual cells .
When I am using

this.m_adminDataGridViewControl.TableOptions.AllowSelection = GridSelectionFlags.Any I am not able to get selected records.

Jisha Joy [Syncfusion]
Replied On August 14, 2008 10:40 AM UTC


We appreciate your interest in Syncfusion Products.

If you have the inherited GridControlBase selection(GridSelectionFlags.Any), by setting the ListBoxSelectionMode to none. Then, you could use the code below to get the selected rows and the number of selected rows. The grid.TableControl.Model.SelectionChanging/SelectionChanged are the events that get triggered when doing selections.

this.gridGroupingControl1.TableOptions.AllowSelection = GridSelectionFlags.Any;
this.gridGroupingControl1.TableOptions.ListBoxSelectionMode = SelectionMode.None;

GridTableControl tc = this.gridGroupingControl1.TableControl;
if (tc.Selections.Ranges.ActiveRange.IsRows)
Console.WriteLine("No of rows selected: {0}", tc.Selections.Ranges.ActiveRange.Height);

GridRangeInfoList rangeList = tc.Selections.GetSelectedRows(true, false);
if (rangeList.Count > 0)
foreach (GridRangeInfo range in rangeList)
for (int row = range.Top; row <= range.Bottom; ++row)

Cut-copy feature in the control

Please refer the following browser sample:


This sample allows you to perform cut, copy and paste operations with an hierarchical GridGroupingControl. In this sample, the gridgroupingcontrol is bound to an hierarchical dataset comprising of two tables. A Context Menu is associated with the grouping grid to enable the required clipboard operations.



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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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