We want to achieve our grid to display all the columns expanded to its column caption width or column data width. I have done this sample xaml to demostrate two of our issues. Please let us know if we need to set different properties to acheive similar goals.
1. When I click sort on Salary icon, Salary column should expand to fit the Ascending/Descending icon.
2. I was not able to replicate with this sample. But it happens on my project. When I have several columns in a grid, when window gets loaded, all the column is not streatched to max with Theme set to Royal Strong. But without theme it streatched properly. Just a note, we have a framework Grid which was inherited from XamDataGrid and style is applied to Framework grid.
<Window x:Class="Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:igDP="http://infragistics.com/DataPresenter" Title="Window1" Height="400" Width="400"> <Grid> <igDP:XamDataGrid BindToSampleData="True" BorderBrush="Black" BorderThickness="0.5" AutoFit="True" Theme="RoyaleStrong" HorizontalAlignment="Stretch"> <igDP:XamDataGrid.FieldSettings> <igDP:FieldSettings Width="Auto" /> </igDP:XamDataGrid.FieldSettings> </igDP:XamDataGrid> </Grid></Window>
Hello,
I was not able to replicate neither of the two issue with the sample code you provided. When I sort the Salary field it expands (resized correctly) when the sorting indicator appears. Regarding the second issue, can you please provide us with a screenshot of this erroneous behavior? Also, any information on he inherited XamdataGrid or styles that you are using will be helpful to us to find the source of this issue.
I will work on getting our framework sample for you, which is quite a task. Just to get to the issue in another way, I have noticed these behavior so far.
Issue with the sample code given was tested under version 2009.2, I still have that issue with that version. If I upgrade to 2010.1 that issue with the test project will be resolved.
In addition to above point following were noticed for our project, version 2009.2 expand column automatically only when both scrollbar appear. But even with 2010.1 version our default column resize issue upon window load with the Royal Stong theme remains same. Please see the screen shots below. Note currenlty we have hard width and height set for the grid. I removed the data from the grid for our privacy issue.