Hi,
I m showing parent child realtionship in web grid. I hve set Indentation="0" so that it shows common headers for all parent and child. Now when it tried to expand first column then only root elements column gets resized and child column not changing so its looking odd. I want to change width of all clumns simulteneously on changing common header column.So how can i do that.
Please help.
Thanks,
Mahendra.
Correct there is no supported way to withhold the rendering of the header row on the child bands.
Am I right that it's impossible to hide child rows' column header if the same layout is used for both parent and child rows?
We need to show parent-child orders relationship. Both bound objects are OrderViewModel. So I tried to reuse the same column layout. But we want to have a single column header on the top of the grid which isn't possible I guess.
You shouldn't be writing that code in the CellControlAttached event. as that event will fire a lot.
Like i said in the previous post. if you're setting it in the codebehind, add the ColumnLayout before you set the ItemSource.
-SteveZ
where should i write this code in igList_CellControlAttached event or after igList.Itemsource=lst; statement.
Please tell where to add that code..
Mahendra
Hi Mahendra,
If you're data object is of type MyData, then the TargetTypeName is correct.
However, how you're adding it is incorrect.
If you want to use the event, you'd be using it to replace the ColumnLayout that's being created for the root level and the child band, which would mean setting TargetTypeName isn't neccessary.
My recommendation though, is to instead set it in xaml, or before your ItemSource is set in the code behind, by adding it to the grid's ColumnLayouts collection.
ColumnLayout cl = new ColumnLayout(){TargetTypeName="MyData" ....
grid.ColumnLayouts.Add(cl)
Hope this clear things up.