HelloI am getting another business-critical and rather annoying error from the Infragistics XamDataGrid.I use NetAdvantage for Win Client 2010 Volume 2.
The error occurs a little randomly, but I think I have isolated two scenarios:
1)When the grid is within a TabControl and tab selection is changed
2)When the DataSource bound collection is cleared or modified.
The error occurrs, but within the XamDataGrid control, so I have no possibility to make a breakpoint or pause VS2008 so I can change the code. Because error does not reflect any file and line number in the code.
Here is my XAML code for the grid. - The "DataSource" is bound to an ObservableCollection<Shipment> - The "ActiveDataItem is bound to a single Shipment-class
<kwg:DataGrid DataSource="{Binding Items}" ActiveDataItem="{Binding ActiveItem, Mode=TwoWay}" Visibility="{Binding ContentVisibility}" GridLayout="{Binding ShipmentsGridLayout, Mode=TwoWay}" LayoutSavedCommand="{Binding GridLayoutSaveCommand}" RefreshGridCommand="{Binding RefreshGridCommand}" CommandParameter="shipment_overview" Theme="Office2k7Silver" Background="GhostWhite" IsSynchronizedWithCurrentItem="True" AutoFit="False" AllowDrop="False"> <kwg:DataGrid.FieldLayoutSettings> <kwg:FieldLayoutSettings HeaderPrefixAreaDisplayMode="FieldChooserButton" AllowAddNew="False" AllowDelete="False" HighlightAlternateRecords="False" SelectionTypeRecord="Extended" SelectionTypeField="Extended" SelectionTypeCell="None" AutoGenerateFields="False" /> </kwg:DataGrid.FieldLayoutSettings> <kwg:DataGrid.FieldLayouts> <idp:FieldLayout Key="Shipment"> <idp:FieldLayout.FieldSettings> <kwg:FieldSettings AllowRecordFiltering="True" AllowGroupBy="True" AllowResize="True" AllowEdit="False" CellClickAction="SelectRecord"/> </idp:FieldLayout.FieldSettings> <idp:Field Name="CreatedDate" Converter="{StaticResource formatter}" ConverterParameter="\{0:yyyy-MM-dd hh:mm\}" Label="Created" Column="0" Visibility="Visible" Width="80"> <idp:Field.Settings> <idp:FieldSettings EditAsType="{x:Type sys:String}"/> </idp:Field.Settings> </idp:Field> <idp:Field Name="Assignmentid" Label="Assignmend Id" Column="1" Visibility="Visible" Width="150" /> <idp:Field Name="MovementReferenceNumber" Label="MRN" Column="2" Visibility="Visible" Width="80" /> <idp:Field Name="DeclarationType" Label="Declaration type" Column="3" Visibility="Visible" Width="80" /> <idp:Field Name="DeclarationStatus" Label="Status" Column="4" Visibility="Visible" Width="80"> <idp:Field.Settings> <idp:FieldSettings> <idp:FieldSettings.CellValuePresenterStyle> <Style TargetType="{x:Type idp:CellValuePresenter}"> <Style.Triggers> <DataTrigger Binding="{Binding Path=DataItem.DeclarationStatus}" Value="ERR"> <Setter Property="Foreground" Value="Red"/> </DataTrigger> </Style.Triggers> </Style> </idp:FieldSettings.CellValuePresenterStyle> </idp:FieldSettings> </idp:Field.Settings> </idp:Field> <idp:Field Name="TotalNumberOfItems" Label="Total # of items" Column="5" Visibility="Visible" Width="80"> <idp:Field.Settings> <idp:FieldSettings> <idp:FieldSettings.EditorStyle> <Style TargetType="{x:Type ide:XamCurrencyEditor}"> <Setter Property="Format" Value=".###"/> </Style> </idp:FieldSettings.EditorStyle> </idp:FieldSettings> </idp:Field.Settings> </idp:Field> <idp:Field Name="TotalNumberOfPackages" Label="Total # of packages" Column="6" Visibility="Visible" Width="80"> <idp:Field.Settings> <idp:FieldSettings> <idp:FieldSettings.EditorStyle> <Style TargetType="{x:Type ide:XamCurrencyEditor}"> <Setter Property="Format" Value=".###"/> </Style> </idp:FieldSettings.EditorStyle> </idp:FieldSettings> </idp:Field.Settings> </idp:Field> <idp:Field Name="TotalGrossWeight" Label="Total gross weight" Column="7" Visibility="Visible" Width="80"> <idp:Field.Settings> <idp:FieldSettings> <idp:FieldSettings.EditorStyle> <Style TargetType="{x:Type ide:XamCurrencyEditor}"> <Setter Property="Format" Value=".###"/> </Style> </idp:FieldSettings.EditorStyle> </idp:FieldSettings> </idp:Field.Settings> </idp:Field> <idp:Field Name="Declarant" Label="Declarant" Column="8" Visibility="Visible" Width="100" /> <idp:Field Name="PlaceOfLoading" Label="Place of load" Column="9" Visibility="Visible" Width="80" /> <idp:Field Name="PlaceOfUnloading" Label="Place of unload" Column="10" Visibility="Visible" Width="80" /> <idp:Field Name="Consignor" Label="Consignor" Column="11" Visibility="Visible" Width="100" /> <idp:Field Name="Consignee" Label="Consignee" Column="12" Visibility="Visible" Width="100" /> <idp:Field Name="NotifyParty" Label="Notify party" Column="13" Visibility="Visible" Width="100" /> <idp:Field Name="LodgingPerson" Label="Lodging person" Column="14" Visibility="Visible" Width="100" /> <idp:Field Name="Representative" Label="Representative" Column="15" Visibility="Visible" Width="100" /> <idp:Field Name="Carrier" Label="Carrier" Column="16" Visibility="Visible" Width="100" /> <idp:Field Name="CustomerId" Label="Customer Id" Column="17" Visibility="Visible" Width="150" /> <idp:Field Name="UserId" Label="User Id" Column="18" Visibility="Visible" Width="80" /> <idp:Field Name="LastChangedBy" Label="Last changed by" Column="19" Visibility="Visible" Width="80" /> <!--<idp:Field Name="AIVStatus" Label="AIV Status" Column="20" Visibility="Visible" Width="80" />--> </idp:FieldLayout> </kwg:DataGrid.FieldLayouts> <kwg:DataGrid.ContextMenu> <ContextMenu> <MenuItem Uid="mp_cmiOpen" Name="cmiOpen" Header="Open" Command="{Binding OpenICSCommand}" IsEnabled="{Binding OpenICSIsEnabled}" FontWeight="Bold" /> <MenuItem Uid="mp_cmiNew" Header="New" IsEnabled="{Binding NewIsEnabled}"> <MenuItem Uid="mp_cmiNewENS" Name="cmiNewENS" Header="Entry Summary Declaration [ENS]" Command="{Binding NewENSCommand}" IsEnabled="{Binding NewENSIsEnabled}" /> <MenuItem Uid="mp_cmiNewEXS" Name="cmiNewEXS" Header="Exit Summary Declaration [EXS]" Command="{Binding NewEXSCommand}" IsEnabled="{Binding NewEXSIsEnabled}" /> </MenuItem> <MenuItem Uid="mp_cmiMake" Header="Make" IsEnabled="{Binding MakeIsEnabled}"> <MenuItem Uid="mp_cmiMakeAMD" Name="cmiMakeAMD" Header="Amendment [AMD]" Command="{Binding MakeAMDCommand}" IsEnabled="{Binding MakeAMDIsEnabled}" /> <MenuItem Uid="mp_cmiMakeARN" Name="cmiMakeARN" Header="Arrival Notification [ARN]" Command="{Binding MakeARNCommand}" IsEnabled="{Binding MakeARNIsEnabled}" /> <MenuItem Uid="mp_cmiMakeDIV" Name="cmiMakeDIV" Header="Diversion Request [DIV]" Command="{Binding MakeDIVCommand}" IsEnabled="{Binding MakeDIVIsEnabled}" /> </MenuItem> <MenuItem Uid="mp_cmiDelete" Name="cmiDelete" Header="Delete" Command="{Binding DeleteICSCommand}" IsEnabled="{Binding DeleteICSIsEnabled}" /> <Separator/> </ContextMenu> </kwg:DataGrid.ContextMenu> </kwg:DataGrid>
Hello,
I have been looking into your issue and based on what I can make out form your description this seems very similar to an issue that is already fixed for the 10.2 version. I can suggest you download and install the latest available Service Release: https://ko.infragistics.com/Membership/Default.aspx?panel=Downloads#Downloads and let me know if the issue still persists.
Looking forward to hearing from you.
Sincerely,
Petar Monov
Developer Support Engineer
Infragistics Bulgaria
www.infragistics.com/support
Hello again
We are currently using the 10.2 version ("NetAdvantage for Win Client 2010 Volume 2").But I will download the latest Service Release as recommended, and try that.All I know now is that the exception comes randomly when clearing the ItemsSource of the grid for adding new data. We use WPF for XBAP (XAML Browser Application, hosted i Internet Explorer) and we use the MVVM pattern.
And it seems like the exception comes when the grid is drawing, hence we have problems catching and handling the exception properly.
I have not been able to isolate the issue in an application because I have not had any time to create such application. Both me and my team has been busy 100% developing for the application release, being forced to craete a "known bugs" document for avoiding the grid error.
But I will try and download from the provided link and see if it is solved.Thank you for the input.
- Mats MagnemKSD Software
Downloading and installing version 10.3 ("NetAdvantage for Win Client 2010 Volume 3") seemed to do the trick. I have not yet had time to test this very strictly in a full scale. But quick testing seems all OK.
I first uninstalled version 10.2, installed version 10.3, then changed all the references which came as a result of the uninstall.
Thank you so far. I will get back to you if the issue persist.
Hi,
I installed service release for 10.2 but it did not fix problem.
note:
I was a bit fast here; the default recordselector is included as a resource dictionary in the top of the office theme.
Yet still the default theme doesn't crash, while the office2k7silver theme does.
We are using the 10.3 version as stated earlier.
Best Regards,
Stian
Hello.
We've done some further digging into this issue, as we managed to reproduce the error again.
At our grids we're using the office2k7silver theme. Looking through the style for the recordselector in defualt theme there is a path named selectorArrow_Active is defined. This path is not present in the office2k7 theme.
Reverting to the default theme eliminates the crash. It's pure speculation from this point, but are you handling this path somewhere in your code after pulling it out from the template? Without a nullcheck for instance?
Best regards,
Stian Farstad
I hide RecordSelector with RecordSelectorLocation="None" and I rescued myself to investigate problem:) Thank you very much.
Thank you for help. Specific version number is : 10.2.20102.2174
Hi emreo,
Please let me know the specific version of the Infragistics assemblies (*.dll files) that you are using in your project so I can try and replicate it.