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
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?
<igDP:XamDataGrid.FieldLayouts>
<!-- From customer Table --> <igDP:FieldLayout>
<igDP:FieldLayout.Fields> <igDP:Field Name="customer_id" /> <igDP:Field Name="customer_name" /> </igDP:FieldLayout.Fields>
</igDP:FieldLayout>
<!-- 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>
</igDP:XamDataGrid.FieldLayouts>
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.