View previous topic :: View next topic |
Author |
Message |
Harri
Joined: 21 Nov 2005 Posts: 13
|
Posted: Wed Nov 30, 2005 7:54 am Post subject: CellData.SelectedStyle is gone? |
|
|
Using the 'GetCellData' I manage to set the style for the celldata as described in the different forum-topics:
if (cellNeedsToHaveDisabledColor)
cellData.EvenStyle = _disabledColorEvenStyle;
cellData.OddStyle = _disabledColorOddStyle;
However it seems that curretly de cellData.SelectedStyle is missing???
So now, when I select a row, the Style goes back to the 'normal' style.
Is this correct?
Thnx in advance |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Wed Nov 30, 2005 10:26 pm Post subject: |
|
|
This change was made in version 2.1 (see the release notes). The selected style (RowSelectedStyle or RowSelectedUnfocusedStyle) is now applied after any other styles. This means that any properties set in these styles will override those set in RowBindings or CellBindings. The individual SelectedStyle properties were removed from RowData, CellData, Columns, RowBindings and CellBindings.
This change was made to simplify the number of styles that have to be managed at an individual Row or Cell level. Also generally for a selection to have any meaning to the end user it's appearance must be consistent across rows. If one selected row is blue and another red this user will not know which color indicates selection.
If you just want to prevent selection of certain rows (ie disabled rows) you can achieve this using a different mechanism by handling the SelectionChanging event (or overriding the AllowSelectionChange method) and cancelling selection changes that involve disabled rows. _________________ Infralution Support |
|
Back to top |
|
|
Harri
Joined: 21 Nov 2005 Posts: 13
|
Posted: Thu Dec 01, 2005 6:22 am Post subject: |
|
|
Thnx for your reply,
Our disabled-style indicates an enabled-property of a 'command' respresented by this row. Our virtual-tree represents a list/sequence of commands that will be executed later on. A user can 'disable' some commands in this sequence, so it will be excluded from the execution. We show this by changing the forecolor of this particular row/command. The user is still able to select the row/command and enable the command again.
I think its no problem using the new mechanism to achieve my goal.
Harri |
|
Back to top |
|
|
|