Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
590
how to set the width of the last column so it takes over the left over ...
posted

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.

 

 

Parents
  • 69686
    Verified Answer
    posted

     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>

Reply Children
No Data