Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CellData.SelectedStyle is gone?

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support
View previous topic :: View next topic  
Author Message
Harri



Joined: 21 Nov 2005
Posts: 13

PostPosted: Wed Nov 30, 2005 7:54 am    Post subject: CellData.SelectedStyle is gone? Reply with quote

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
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Wed Nov 30, 2005 10:26 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Harri



Joined: 21 Nov 2005
Posts: 13

PostPosted: Thu Dec 01, 2005 6:22 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group