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

Mutliselect datagrid

Thread ID:





58796 Mar 28,2007 03:28 PM UTC Mar 28,2007 07:08 PM UTC WinForms 1
Tags: GridControl
Todd Swygert
Asked On March 28, 2007 03:28 PM UTC

I have a GridDataBoundGrid that I'm trying to use as a multiselect control. Users will select several rows and then perform an action based on the selections. When focus leaves the grid, all the selections are removed and focus is put on the first row. How do I prevent my selections from clearing when leaving the grid?


haneefm [Syncfusion]
Replied On March 28, 2007 07:08 PM UTC

Hi Todd,

One way you can do this by handling the Model.Selectionchanging event of the grid and set e.Cancel to true for keeping the selection in a grid. Here is a code snippet.

this.grid.Model.SelectionChanging += new GridSelectionChangingEventHandler(Model_SelectionChanging);

void Model_SelectionChanging(object sender, GridSelectionChangingEventArgs e)
e.Cancel = !this.grid.Focused;

Best regards,


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