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.

delete entire row, undo

Thread ID:





103301 Apr 19,2012 06:52 PM Apr 24,2012 06:30 AM Windows Forms 1
Tags: GridControl
Asked On April 19, 2012 06:52 PM

While trying to delete cells, rows in the syncfusion grid control for windows forms,
here is a part of my code
if (list.Count > 0)
int selectedRowTop = list.ActiveRange.Top;
int selectedRowBottom = list.ActiveRange.Bottom;
int selectedColumnLeft = list.ActiveRange.Left;
int selectedColumnRight = list.ActiveRange.Right;

This works well for the user selcts a range of cell.
Suppose the user selects an entire row, then selectedColumnLeft , selectedColumnRight are coming to be 0
How should I delete an entire row?

2) Please send me some sample code for undo functionality

Jeya Preetha M [Syncfusion]
Replied On April 24, 2012 06:30 AM

Hi Smitha,

Thank You for your interest in Syncfusion Products.

To delete an entire row in the Grid Control, please set "selectedColumnLeft=0" and "selectedColumnRight=e.colcount".

GridRangeInfo range = GridRangeInfo.Cells(top, 0, bottom, e.colcount);

To enable Undo/Redo for the current cell in the Grid Control , please try the following code snippet.

this.gridControl1.CommandStack.Enabled = true;

private void gridControl1_CurrentCellKeyDown(object sender, KeyEventArgs e)
if (e.KeyCode == Keys.Z && e.Control))
if (this.gridControl1.CurrentCell.IsEditing)

Please let me know if you have any concerns.

Jeya Preetha M


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.

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.