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.
Syncfusion Feedback

Exclude row from selection in GDBG

Thread ID:

Created:

Updated:

Platform:

Replies:

14870 Jun 7,2004 04:52 PM UTC Jun 7,2004 05:41 PM UTC Windows Forms 1
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On June 7, 2004 04:52 PM UTC

Is there a way to set a row in a state that it can''t be selected in the GDBG? I have some DataRows in the datasource which have a logical state and they should not be selectable in the grid. By default, the ListBoxSelectionMode is set to One, it should also work when it is set to MultiExtended. Which events have to be used to achive this? 1. the row cannot be selected, also when MultiExtended is set 2. The row is visual marked(PrepareViewStyleInfo(?) to changing text color) Regards Thomas

Administrator [Syncfusion]
Replied On June 7, 2004 05:41 PM UTC

To avoid a row, say someRowIndex, being included in a selection, you can handle the grid.Model.SelectionsChanging event. If e.Range.IntersectsWith(GridRangeInfo.Row(someRowIndex)), then you can set e.Cancel to prevent the selection. To color such a row, you would use grid.PrepareViewStyleInfo, setting e.Style.BackColor if e.RowIndex equals someRowIndex.

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

;