Hi,
please look at the attached images. Image1 shows how the datagrid looks when my application starts.
I then populate my datagrid on a button click from codebehind. When I do this, Image2 shows how my populated datagrid looks.
However, when I expand my starting datagrid as shown in the following image
and then try to populate my datagrid, I get this...
That is, the hierarchy is not getting bound. What is going on? I have set AutoGenerateFields to false, and have created my own layout.
Also,
I'm assigning a different fieldlayout to each row..i've given it as
private void DataGrid_AssigningFieldLayoutToItem(object sender, Infragistics.Windows.DataPresenter.Events.AssigningFieldLayoutToItemEventArgs e)
{
ExpandableFieldRecord parent = e.ParentExpandableFieldRecord as ExpandableFieldRecord;
if (parent != null)
DataGridItemType dgit = parent.ParentDataRecord.DataItem as DataGridItemType;
if (dgit != null)
if (dgit.Type == "xxxxxxx")
e.FieldLayout = this.DataGrid.FieldLayouts[1];
}
if (dgit.Type == "yyyyyyy")
e.FieldLayout = this.DataGrid.FieldLayouts[2];
Hello,
It has been a while since you have made your post, in case you still need support I will be glad to assist you further. I suppose the other community members can benefit from this answer as well. I have been looking through your post but I wasn’t able to reproduce your behavior, because it seems like I am missing something, so if you could provide me with an isolated sample project, where this is reproduces, I will investigate it further for you.
Feel free to write me if you have further questions.