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. Image for the cookie policy date

Allow only single row selection on GridDataBoundGrid?

Is it possible to only allow a single row to be selected at once on a GidDataBoundGrid? Thanks for your help

1 Reply

AD Administrator Syncfusion Team March 15, 2004 01:10 AM

If you want the row selected whereever you click into the row (not only if you click the row header), then you can set this.grid.ListBoxSelectionMode = SelectionMode.One; If you do not want to use ListBoxSelectionMode, then the grid.AllowSelections property controls how selections behave. You can set flags so only rows are allowed. But if you only want a single row without using ListBoxSelection, then you would have to handle grid.Model.SelectionsChanging. In the handler, if e.Range.IsRows is false or if e.Range.Height is not 1, then set e.Cancel = true to cancel the selections.

Loader.
Live Chat Icon For mobile
Up arrow icon