How to style and filter the content of the expanded class? How to hide the expanded object's column headers?
Hello,
It sounds like you have not defined the field layouts correctly. You can look at an example in the XamFeatureBorwser how to define hierarchial data fieldlayouts under the XamDataGrid->Layout and Behavior->FieldSettings Overrides.
Hope this helps.
Correction...
In my XamDataGrid, I have set AutoGeneratedFields = false. I do not see the expanded child nodes. If I set AutoGeneratedFields = true, I see all the sub child nodes. I have to set AutoGeneratedFields = false and still see only a particular child node. Will appreciate if you can give me some sample.
In my XamDataGrid, I have set AutoGeneratedFields = false. I do not see the expanded child nodes. If I set AutoGeneratedFields = false, I see all the sub child nodes. I have to set AutoGeneratedFields = false and still see only a particular child node. Will appreciate if you can give me some sample.
Create a Field layout for the parent and another field layout for the children. Name them uniquely. In the child field layout use:
>
In the xamDataGrid definition add this event:
AssigningFieldLayoutToItem="LaborHoursGrid_AssigningFieldLayoutToItem" >
Here is the method in the code behind that assigns the correct field layout.
private void LaborHoursGrid_AssigningFieldLayoutToItem(object sender, AssigningFieldLayoutToItemEventArgs e)
{
System.Data.
DataRowView dRow = e.Item as System.Data.DataRowView;
if (dRow.DataView.Table.TableName == "laborHoursTable")
e.FieldLayout =
this.LaborHoursGrid.FieldLayouts["LaborHoursLayout"];
if (dRow.DataView.Table.TableName == "laborResTable")
this.LaborHoursGrid.FieldLayouts["LaborResourceLayout"];
}