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.

Multi-Line Edit in a GDBG

Thread ID:

Created:

Updated:

Platform:

Replies:

13845 May 12,2004 06:56 AM May 12,2004 02:02 PM Windows Forms 3
loading
Tags: GridControl
Kenneth Johnson
Asked On May 12, 2004 06:56 AM

I posted this to Direct-Trac (11075) at noon yesterday and haven't received a reply yet. Has anyone else needed this functionality? How did you do it? What I am trying to do is allow the user to select mulitple rows in the grid and then click into one cell and then have the code loop through the range info and update all the selected rows. The problem I am running into is that unless the cell has a control in it, clicking on a cell unselects the rows and then selects the single row. Is there a property that I am missing that allows this functionality? I have ListBoxSelectionModeset to SelectionMode.MultiExtended.

Administrator [Syncfusion]
Replied On May 12, 2004 07:19 AM

If you do not want to lose the selections when you click into a selected cell, then you can subscribe to teh grid.Model.SelectionsChanging event and cancel it when this is the case.
//subscribe to the event somewhere
this.gridDataBoundGrid1.Model.SelectionChanging += new GridSelectionChangingEventHandler(Model_SelectionChanging);

//the handler
private void Model_SelectionChanging(object sender, GridSelectionChangingEventArgs e)
{
	if(e.Range.IsEmpty)
	{
		if(this.gridDataBoundGrid1.Selections.Ranges.AnyRangeIntersects(e.ClickRange))
			e.Cancel = true;
	}
}

Kenneth Johnson
Replied On May 12, 2004 07:37 AM

Thanks for the speedy reply Clay. Whoever gets the Direct-Trac requests should take some notes. There is still no response there.

Kenneth Johnson
Replied On May 12, 2004 02:02 PM

Your solution does exactly what I need. Thanks.

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.

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.

;