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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

MultiSelect in GridGroupingControl

Thread ID:

Created:

Updated:

Platform:

Replies:

26699 Mar 30,2005 02:06 PM UTC Mar 30,2005 03:19 PM UTC WinForms 1
loading
Tags: GridControl
Jaco du Preez
Asked On March 30, 2005 02:06 PM UTC

Hi, I m having problems deleting a row when setting the TableOptions.ListBoxSelectionMode property of the GridGroupingControl. If this property is set when I select a row and then Press delete the grid only deletes the first column and not the whole row. The same happens when I try to Copy my selection - only the selected cell is copied. Jdp

Administrator [Syncfusion]
Replied On March 30, 2005 03:19 PM UTC

Try handling the TableControlCurrentCellKeyDown event.
private void gridGroupingControl1_TableControlCurrentCellKeyDown(object sender, GridTableControlKeyEventArgs e)
{
	if(e.Inner.KeyCode == Keys.Delete)
	{
		Record rec = e.TableControl.Table.CurrentRecord;
		if(rec != null)
		{
			int i = e.TableControl.Table.FilteredRecords.IndexOf(rec);
			if(i > 0)
			{
				e.TableControl.Table.CurrentRecord = e.TableControl.Table.FilteredRecords[i-1];
				e.TableControl.Table.CurrentRecord.SetSelected(true);
			}
			rec.Delete();
			e.Inner.Handled = true;
		}
	}
}

CONFIRMATION

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.

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

;