Hi,
I have grid in many parts of my application...
I set the widths for all of the columns in my grids. I would like to know if there is an easy way to make the last column as big as it needs to be so it takes over the left over space in the grid..
Thanks.
Hello,
It would not be possible to make the last column take the remaining space by setting the width of the columns manually. You need to use custom grid as a panel of arranging the cells of the DataRecord. To do this you have to set the AutoFit Property to True and also AllowResize to False and then create a template with a grid, and specify ColumnDefinitions and their width there like this:
<igDP:XamDataGrid BindToSampleData="True" AutoFit="True"> <igDP:XamDataGrid.FieldSettings> <igDP:FieldSettings AllowResize="False" /> </igDP:XamDataGrid.FieldSettings> <igDP:XamDataGrid.FieldLayoutSettings> <igDP:FieldLayoutSettings> <igDP:FieldLayoutSettings.DataRecordCellAreaGridTemplate> <ItemsPanelTemplate> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="120"/> <ColumnDefinition Width="120"/> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> </Grid> </ItemsPanelTemplate> </igDP:FieldLayoutSettings.DataRecordCellAreaGridTemplate> </igDP:FieldLayoutSettings> </igDP:XamDataGrid.FieldLayoutSettings></igDP:XamDataGrid>
Awesome! It used to bug me so much whenever I looked at the grids. Now all my grids look really nice without the small unsed portion left at the end of the grid and they look cool when the window is maximised on bigger monitors....
Greatly apppreciate all your help. Thanks!