Hi ,
I am binding list to XamlWeb Grid . I have to set with of 1 st and 2st Column and other should resize as per grid size equally (auto/*) .
How can I do that at code behind .
Thanks ,
Nandkishor.
Hi Nandkishor,
I believe you are referring to star columns.
To create one in the code behind, use the following:
TextColumn tc = new TextColumn();
tc.Width = new ColumnWidth(1, true);
Thanks Steve ,
It work nice on loading , but how can i update width of columns on resize ?
AgGridCommonHeader.Columns[0].ColumnLayout.ColumnWidth =
This Doesn't work .
- Nandkishor .
Once you set the width on a specific column, you can not override it by setting it on it's ColumnLayout. That property is for setting the width on all Columns in that ColumnLayout.
If you meant to set the width on a specific column, you should use the Width property on the column.
((Column)AgGridCommonHeader.Columns[0]).Width
Or
AgGridCommonHeader.Columns.DataColumns[0].Width
-SteveZ