Hi,
I have a hierarchical set of datas like this :
public class RadiosGenre{ public List<Radio> Radios;} and I would like to put them in the xamDataGrid... and if possibe with "lazy loading"Is it possible and how ?
I have try with the following code but it do not work :
<igDP:XamDataGrid x:Name="xdgGenres"> <igDP:XamDataGrid.FieldLayoutSettings> <igDP:FieldLayoutSettings AutoGenerateFields="False" /> </igDP:XamDataGrid.FieldLayoutSettings> <igDP:XamDataGrid.FieldLayouts> <igDP:FieldLayout> <igDP:FieldLayout.Fields> <igDP:Field Name="Title" Label="Title"/> <igDP:Field Name="Radios"/> </igDP:FieldLayout.Fields> </igDP:FieldLayout> </igDP:XamDataGrid.FieldLayouts> </igDP:XamDataGrid>
Thanks a lot,
Also, is it possible to :
- Have only one header (and not a header for each level) ?- Have the last column to use the full width ... to force last column use the maximum of space ?
Thanks
VO01
<igDP:XamDataGrid >
<igDP:XamDataGrid.FieldLayoutSettings> <igDP:FieldLayoutSettings AutoGenerateFields="False" /> </igDP:XamDataGrid.FieldLayoutSettings> <igDP:XamDataGrid.FieldLayouts> <!-- FieldLayout for Table 1 --> <igDP:FieldLayout> <igDP:FieldLayout.Fields> <igDP:Field Name="ParentID" Visibility="Collapsed"/> <igDP:Field Name="Name"/> <igDP:Field Name="Type"/> </igDP:FieldLayout.Fields> </igDP:FieldLayout> <!-- FieldLayout for Table 2 --> <igDP:FieldLayout> <igDP:FieldLayout.Fields> <igDP:Field Name="FKReferenceID" Visibility="Collapsed"/> <igDP:Field Name="AccountName"/> <igDP:Field Name="AccountNumber"/> </igDP:FieldLayout.Fields> </igDP:FieldLayout> </igDP:XamDataGrid.FieldLayouts>
<igDP:XamDataGrid.FieldLayoutSettings>
<igDP:FieldLayoutSettings AutoGenerateFields="False" />
</igDP:XamDataGrid.FieldLayoutSettings>
<igDP:XamDataGrid.FieldLayouts>
<!-- FieldLayout for Table 1 --> <igDP:FieldLayout> <igDP:FieldLayout.Fields> <igDP:Field Name="ParentID" Visibility="Collapsed"/> <igDP:Field Name="Name"/> <igDP:Field Name="Type"/> </igDP:FieldLayout.Fields> </igDP:FieldLayout> <!-- FieldLayout for Table 2 --> <igDP:FieldLayout> <igDP:FieldLayout.Fields> <igDP:Field Name="FKReferenceID" Visibility="Collapsed"/> <igDP:Field Name="AccountName"/> <igDP:Field Name="AccountNumber"/> </igDP:FieldLayout.Fields> </igDP:FieldLayout>
<!-- FieldLayout for Table 1 -->
<igDP:FieldLayout>
<igDP:FieldLayout.Fields> <igDP:Field Name="ParentID" Visibility="Collapsed"/> <igDP:Field Name="Name"/> <igDP:Field Name="Type"/> </igDP:FieldLayout.Fields>
<igDP:FieldLayout.Fields>
<igDP:Field Name="ParentID" Visibility="Collapsed"/> <igDP:Field Name="Name"/> <igDP:Field Name="Type"/>
<igDP:Field Name="ParentID" Visibility="Collapsed"/>
<igDP:Field Name="Name"/>
<igDP:Field Name="Type"/>
</igDP:FieldLayout.Fields>
</igDP:FieldLayout>
<!-- FieldLayout for Table 2 -->
<igDP:FieldLayout.Fields> <igDP:Field Name="FKReferenceID" Visibility="Collapsed"/> <igDP:Field Name="AccountName"/> <igDP:Field Name="AccountNumber"/> </igDP:FieldLayout.Fields>
<igDP:Field Name="FKReferenceID" Visibility="Collapsed"/> <igDP:Field Name="AccountName"/> <igDP:Field Name="AccountNumber"/>
<igDP:Field Name="FKReferenceID" Visibility="Collapsed"/>
<igDP:Field Name="AccountName"/>
<igDP:Field Name="AccountNumber"/>
</igDP:XamDataGrid.FieldLayouts>
</igDP:XamDataGrid>
thanks a lot, it worked..
Regards
manand
If I bind to a DataView with relationships and leave the AutoGenerateFields setting to True, I get multiple levels as expected. If, however, I turn that setting off and define two FieldLayout blocks, as shown above, only the first block is shown. I get no "+" sign to drill down.
Am I missing something?
I'm sorry... I still can't get this silly thing working. I really want to fix it the right way - by predefining my field layouts in xaml.
>>Are you including a Field definition in the parent FieldLayout for the IEnumerable Field that represents the child data?
I'm wondering if I misunderstood what you meant by that. I thought you meant to include the primary key in the first group, so that the foreign key in the second group could relate to it. But now, I'm not so sure that's what you meant. I don't know what I could include in the first layout group that's ienumerable, since I'm simply referencing columns in the DataView.
Is the follownig fictitious example correct xaml, assuming a DataView on table "customers", with relationships from orders.customer_id -> customers.customer_id and order_items.order_id -> orders.order_id? Should this generate a 3-tiered grid, similar to what I'd get if I let it auto generate the field layouts?
<!-- From customer Table --> <igDP:FieldLayout>
<igDP:FieldLayout.Fields> <igDP:Field Name="customer_id" /> <igDP:Field Name="customer_name" /> </igDP:FieldLayout.Fields>
<!-- From order Table --> <igDP:FieldLayout>
<igDP:FieldLayout.Fields> <igDP:Field Name="order_id" /> <igDP:Field Name="order_date" /> </igDP:FieldLayout.Fields>
<!-- From order_items Table --> <igDP:FieldLayout>
<igDP:FieldLayout.Fields> <igDP:Field Name="line_id" /> <igDP:Field Name="item_number" /> <igDP:Field Name="item_description" /> <igDP:Field Name="item_price" /> </igDP:FieldLayout.Fields>
Hello Prasanti,
Thank you for your post. I have been looking into it and I created a sample project for you with the functionality you want. Basically I set the second FieldLayout’s Settings’ LabelLocation Property to Hidden. This way the child layout doesn’t have headers. Please let me know if this helps you or you have further questions on this matter.
Looking forward for your reply.
Thanks for taking the time to post your findings. Exactly what I was after and you saved me having to go through the steps, or similar, that you went through.
Cheers
Hello,
I would like to design XamDataGrid in the following way and not sure how can i achieve it. Can someone please help me.I am using MVVM pattern and using binding list to bind data
There will be three levels of drill down. For example Organization, Employee, Project.
Iniitally I want to show list of organizations which are edit only and we cannot add or delete organizations.
In second level, I would like to show list of employees where i can add/edit/delete employees. I this I need to show combo boxes as well.
In third level, I would like to show the project details they are working on. Here also I need to have Add/edit/delete the record option.
Currently I am achieving this using three grids. I would like to know whether we can merge these and show it in single Grid.
Follow this thread for the last question:
http://community.infragistics.com/forums/p/26803/98482.aspx#98482