I downloaded the latest hotfix for 2.0 as I needeed it to get some of my issues resolved. All my existing problems have been resolved by the hotfix,
however it created a new problem. The grid header is not displayed right anymore. There is a grey area surrounding the header, looks very bad.
All my grids' headers in my app dont look good. Is there going to be another hotfix soon for it.....
Thanks.
I am attaching the screen shot. I didn't have this problem prior to downloading the hotfix and nothing changed as far as code is concerned.
Here is my code: it is pretty straight forward......
<igDP:XamDataGrid x:Name="diagnosisGrid" GroupByAreaLocation="None" Background="WhiteSmoke">
<igDP:XamDataGrid.FieldLayoutSettings>
<igDP:FieldLayoutSettings AddNewRecordLocation="OnTopFixed" AllowAddNew="True" />
</igDP:XamDataGrid.FieldLayoutSettings>
<igDP:XamDataGrid.FieldLayouts>
<igDP:FieldLayout>
<igDP:FieldLayout.Fields>
<igDP:Field Name="ID" Visibility="Collapsed" />
<igDP:Field Name="Description" Visibility="Collapsed" />
<igDP:Field Name="Rank" Label="#">
<igDP:Field.Settings>
<igDP:FieldSettings LabelClickAction="Nothing" CellWidth="25" LabelWidth="25" AllowEdit="False"/>
</igDP:Field.Settings>
</igDP:Field>
<igDP:Field Name="Name" Label="Impression">
<igDP:FieldSettings LabelClickAction="Nothing" CellWidth="180" EditorStyle="{StaticResource diagnosisComboBoxEditor}"/>
<igDP:Field Name="Comments" Label="Plan">
<igDP:FieldSettings LabelClickAction="Nothing" CellWidth="470" />
</igDP:FieldLayout.Fields>
</igDP:FieldLayout>
</igDP:XamDataGrid.FieldLayouts>
Sorry - but I don't see the screenshot attachment.
Joe
I've attached a screenshot taken on my system - is this the gray area you are talking about (pointed to by the red arrow)?
It took me a while to duplicate this - it only happens in 1 sample application on my system. It appears to be some sort of timing issue - after manually resizing any column in the UI the problem goes away. If this sounds like the same problem you are seeing, please submit this as a bug here http://devcenter.infragistics.com/Protected/SubmitSupportIssue.aspx
In the meantime, here is a workaround that solved the problem on my system. It temporarily resizes a column asynchronously after the Window and the XamDataGrid are loaded:
private void Window_Initialized(object sender, EventArgs e) { // Make sure the XamDataGrid is hooked up to the DataSource and all other initialization is done. Then... this.Dispatcher.BeginInvoke(DispatcherPriority.Loaded, new DeferredInitialization(this.OnDeferredInitialization)); } delegate void DeferredInitialization(); private void OnDeferredInitialization() { this.xamDataGrid1.DefaultFieldLayout.Fields[0].Settings.LabelWidth = this.xamDataGrid1.DefaultFieldLayout.Fields[0].LabelWidthResolved; this.xamDataGrid1.DefaultFieldLayout.Fields[0].Settings.LabelWidth++; this.xamDataGrid1.DefaultFieldLayout.Fields[0].Settings.LabelWidth--; }
private void Window_Initialized(object sender, EventArgs e)
{
// Make sure the XamDataGrid is hooked up to the DataSource and all other initialization is done. Then... this.Dispatcher.BeginInvoke(DispatcherPriority.Loaded, new DeferredInitialization(this.OnDeferredInitialization));
// Make sure the XamDataGrid is hooked up to the DataSource and all other initialization is done. Then...
this.Dispatcher.BeginInvoke(DispatcherPriority.Loaded, new DeferredInitialization(this.OnDeferredInitialization));
}
delegate void DeferredInitialization();
private void OnDeferredInitialization()
this.xamDataGrid1.DefaultFieldLayout.Fields[0].Settings.LabelWidth = this.xamDataGrid1.DefaultFieldLayout.Fields[0].LabelWidthResolved; this.xamDataGrid1.DefaultFieldLayout.Fields[0].Settings.LabelWidth++; this.xamDataGrid1.DefaultFieldLayout.Fields[0].Settings.LabelWidth--;
this.xamDataGrid1.DefaultFieldLayout.Fields[0].Settings.LabelWidth = this.xamDataGrid1.DefaultFieldLayout.Fields[0].LabelWidthResolved;
this.xamDataGrid1.DefaultFieldLayout.Fields[0].Settings.LabelWidth++;
this.xamDataGrid1.DefaultFieldLayout.Fields[0].Settings.LabelWidth--;
Hi Joe,
Your work around worked for me for now. I had opened a bug on your side so hopefully it will be taken care of.
Hi, I was in same problem like u guy few houres ago and, i run on yours post which halped me. I sove problem with wpf trick, it work fine. Here is the solution.
<igDP:FieldSettings.LabelPresenterStyle> <Style TargetType="{x:Type igDP:LabelPresenter}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type igDP:LabelPresenter}"> <Grid> <Border Name="Border" Margin="0,0,-4,0" Background="Black" TextBlock.Foreground="White" BorderBrush="Black" BorderThickness="2,2,2,2" Height="Auto" Width="Auto" CornerRadius="5,5,5,5" > <ContentPresenter RecognizesAccessKey="True"/> </Border> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style> </igDP:FieldSettings.LabelPresenterStyle>