Hi guys, I need a "code behind" sample of how to create a hiarchical grid 3 layers and the third layer binds to one of those bindable thingies EntityQuery<sometable>
So I have the first layer bound to a single row, that drives a datarequest for the next row when expanded, which drives 1 more datarequest for a table.
I can send my whole project if you want, but it's using sql 2012 for the db backend.
Joe
Hello Joe,
I have been looking into your question and I can suggest you initially crate an empty model of data tables and assign them to the XamDataGrid. This way you can initially populate only the data from the first layout. The you can set the ExpansionIndicatorDisplayMode="Always" in the FieldLayoutSettings, so the expansion indicator will be visible all the time and you can handle the RecordExpanding event of XamDataGrid. In the handler of this event you can manually add the data for the second level by populating the child table.
If you need any additional assistance with this matter please feel free to ask.
I am on my grid object and type . and I don't see the ExpansionIndicatorDisplayMode
This is XamGrid (silverlight). I can't find fieldlayoutsettings either.
Where are these?
Hello foxjazz,
Thank you for providing the application and the database. I succeeded in running them and on my side the hierarchy gets populated for all of the 3 levels, therefore I am not sure that I understand your requirements. Would you please provide me with some details what is the expected behavior that you are trying to achieve and some steps to reproduce the issue.
Thanks in advance.
That's GREAT you have it working.
On the left side please select acura 2012, light car, then TL or something and then:
on the right hand side you will see the applications. Selectec the hiarachical dropdown for one of those, and it will give childitems, select that and it will give more items. The child items shouldn't appear. You can debug the grid with the event on expanding. And eventually we want to see all the applicaitons (at the third level in the grid) that belong to the vehicle selected on the left. The hiarchical grid is where I am having problems, not the Tree. The tree works great as you have provided very good instructions on how to make that work.
Let me know if you need more info.
Thank you for the details. You can see that xamGrid shows all of the public properties in the data objects, and that it automatically figured out that there is data in related collections and added child column layouts. By default, xamGrid treats any property that exposes a type that implements IEnumerable as a child ColumnLayout object, so I believe that this cause the extra layout that you are getting. In order to disable this behavior you can set AutoGenerateColumns property of the XamGrid to false. For additional reference about this you can check:
http://help.infragistics.com/Help/NetAdvantage/Silverlight/2011.2/CLR4.0/html/xamGrid_Auto_Generate_Columns.html
Furthermore if you define a ColumnLayout that contains a key that does not exist in the data source, xamGrid will simply ignore it. Therefore please make sure that the Keys that you have set for the ColumnLayouts can be properly mapped to properties from type IEnumerable.
http://help.infragistics.com/NetAdvantage/Silverlight/2012.1/CLR4.0/?page=xamGrid_Columns.html
http://help.infragistics.com/NetAdvantage/Silverlight/2012.1/CLR4.0/?page=xamGrid_Defining_Hierarchical_Layouts.html
If you need any additional assistance with this please feel free to let me know.
OK editing this because I got further in my adventure. Now all I need is to figure out how to change an ObservableCollection to IEnumerable.
Ok even though I got a lot further, I am struggling with setting the last layer into the grid Observable<AppAll>
My current modifications have been updated. Any ideas why it isn't working as expected?
https://bwstage.gates.com/goodreasons/pslite.7z
And one more question. If I have a table IEnumerable and the first two columns are ordered. Shouldn't the grid have an option to automatically make like a hiarchical grid distincting the first colum, then the second?
So I got further along, but I can't get the grid to display the LoadOperation<AppAll> where I set LeafData.
So I couldn't get an expansion box because I can't instatiate an empty LoadOperation due to no constructor.
However I am setting LeafData to the LoadOperation and I am calling the loadoperation which should be getting some data.
I made the call on the Cell_Clicked as there was no expansion indicator available.
Any ideas on what to do to get this to show up?
Latest of my code is posted: https://bwstage.gates.com/goodreasons/pslite.7z
Hello,
I am glad that you have solved your issue.
If you need any further assistance, feel free to ask