View previous topic :: View next topic |
Author |
Message |
MikeR
Joined: 25 Jun 2016 Posts: 29
|
Posted: Tue Feb 27, 2018 7:57 pm Post subject: Different Child Datasets depending on parent column value |
|
|
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 |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Tue Feb 27, 2018 10:05 pm Post subject: |
|
|
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 |
|
|
MikeR
Joined: 25 Jun 2016 Posts: 29
|
Posted: Tue Feb 27, 2018 10:29 pm Post subject: |
|
|
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 |
|
|
MikeR
Joined: 25 Jun 2016 Posts: 29
|
Posted: Wed Feb 28, 2018 3:16 am Post subject: More to the point... |
|
|
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 |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Fri Mar 02, 2018 6:55 am Post subject: |
|
|
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 |
|
|
MikeR
Joined: 25 Jun 2016 Posts: 29
|
Posted: Fri Mar 02, 2018 4:56 pm Post subject: Figured it out myself |
|
|
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 |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Sat Mar 03, 2018 11:11 pm Post subject: |
|
|
Thanks. Glad you managed to get it doing what you want. _________________ Infralution Support |
|
Back to top |
|
|
|