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 

Different Child Datasets depending on parent column value

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



Joined: 25 Jun 2016
Posts: 28

PostPosted: Tue Feb 27, 2018 7:57 pm    Post subject: Different Child Datasets depending on parent column value Reply with quote

I have a complex data binding application to figure out. I am using strongly typed datasets (IBindingList interface) to do this, which is easier for me since I generate the db interface classes programmatically en masse.

I have a parent dataset, and one of the columns is used for grouping (sorting based on this column), with 2 possible values. If a row has Value1 in this column, then the child rows for that row will have Child1 dataset binding.

If a row has Value2 in this column, then the child rows for that row will have Child2 dataset binding

The two child datasets are completely different, and only share a reference back to the respective parent row.

I'm thinking that Virtual Tree can easily support his scenario, but do you have any existing examples, or do you have anything off the top of your head that might show exactly how to do this to help speed me along?

I won't cry if I cannot manage this in the Designer, but can only manage it at runtime.

Thanks for any wisdom you might impart.
_________________
Thanks,

-- Mike R.
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 4870

PostPosted: Tue Feb 27, 2018 10:05 pm    Post subject: Reply with quote

For more complex binding scenarios it is generally easier to use programmatic binding - or you can use a mixture. You can handle the GetBinding method to programmatically determine the binding (which you could define in the designer) which should be used for a given item.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
MikeR



Joined: 25 Jun 2016
Posts: 28

PostPosted: Tue Feb 27, 2018 10:29 pm    Post subject: Reply with quote

So, is there any example code or project you can point to that demonstrates the particulars of this scenario?

Thanks.
_________________
Thanks,

-- Mike R.
Back to top
View user's profile Send private message
MikeR



Joined: 25 Jun 2016
Posts: 28

PostPosted: Wed Feb 28, 2018 3:16 am    Post subject: More to the point... Reply with quote

Is it possible, and how, to have a different header appear for a group of child rows that is different from the parent row header? That's what I REALLY need.
_________________
Thanks,

-- Mike R.
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 4870

PostPosted: Fri Mar 02, 2018 6:55 am    Post subject: Reply with quote

The DataSetBrowser sample and AdvancedFeatures sample projects have examples of mixing programmatic binding and design time binding.

Virtual Tree does not support displaying nested headers for child rows - what it does support is context sensitive columns which allows the columns you display to depend on the selected row (or you can control this explicitly). The DataSetBrowser sample shows the Context Sensitive feature.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
MikeR



Joined: 25 Jun 2016
Posts: 28

PostPosted: Fri Mar 02, 2018 4:56 pm    Post subject: Figured it out myself Reply with quote

Data binding is not the issue.

I now have "nesting" Virtual Trees that handle multiple child items that are in collections that are disparate from the parent data. This way, child collections have their own column headers. Looks slick.

It was a bit of a hack but not bad.

Your architecture is well-thought-out and quite flexible.

In any event, it beats the tar out of Syncfusion for ease of use.

cheers
_________________
Thanks,

-- Mike R.
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 4870

PostPosted: Sat Mar 03, 2018 11:11 pm    Post subject: Reply with quote

Thanks. Glad you managed to get it doing what you want.
_________________
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