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

Allow only single row selection on GridDataBoundGrid?

Thread ID:

Created:

Updated:

Platform:

Replies:

11724 Mar 15,2004 12:42 AM UTC Mar 15,2004 06:10 AM UTC WinForms 1
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On March 15, 2004 12:42 AM UTC

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

Administrator [Syncfusion]
Replied On March 15, 2004 06:10 AM UTC

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.

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

;