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 

Hiding Columns that don't belong with a DataRow

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





PostPosted: Wed Feb 01, 2006 11:24 pm    Post subject: Hiding Columns that don't belong with a DataRow Reply with quote

I saw in the DataSetBrowser sample that columns appear and disappear as you click on the appropriate row.

In my app, I get every column for every row type. What am I missing? Is there a special setting?
Back to top
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Thu Feb 02, 2006 1:51 am    Post subject: Reply with quote

You need to set the Column.ContextSensitive property to true if you want the column to dissappear when the focus row does not have information for that column.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
sprugh



Joined: 02 Feb 2006
Posts: 4
Location: Chicago, IL

PostPosted: Thu Feb 02, 2006 4:55 pm    Post subject: Hiding Editor that doesn't belong with a row Reply with quote

Ok. The ContextSensitive works by turing off the columns until you click on the correct DataRow. But, I still see the sub row editor in parent rows, once I click on the child. In this case, I have a group and an item and the item has a checkbox:

The columns are
Group Name
Item Name
Active

The tree looks like(where 1 is checked, 0 is unchecked:
Group Name, Item Name, Active
Account
-Account Item Name, 1


In this case, when I click on the Account row, I do not see the check box. But, when I click on the Account Item the check box appears but in all rows. Since the check box does not make sense for Account I would like it not to show on that row.

How can this be done?
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Thu Feb 02, 2006 9:26 pm    Post subject: Reply with quote

In this case don't set the CellEditor for the Column (as this applies to all rows in the column). Instead set the CellEditor in the CellBindings for the RowBindings that you want the editor displayed for.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
sprugh



Joined: 02 Feb 2006
Posts: 4
Location: Chicago, IL

PostPosted: Thu Feb 02, 2006 11:04 pm    Post subject: Reply with quote

Do you mean that I should do this programatically in the code instead of the designer?

Also, could I just implement GetCellData and set the editor to NULL for all the other rows?
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Fri Feb 03, 2006 6:33 am    Post subject: Reply with quote

You can do this in the designer if you are using Object Bindings or DataSet Bindings. Select the Bindings tab find the binding for the row, expand it and select the cell binding for the column. Set the CellEditor.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
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