<Controls:RadGridView.Columns>
<Controls:GridViewDataColumn UniqueName="Test" Header="Test" DataFormatString="{}{0:N}" />
<Controls:GridViewDataColumn UniqueName="Test1" Header="Test2" DataFormatString="{}{0:N}"/>
</Controls:RadGridView.Columns>
This grid will throw "A first chance exception of type 'System.ArgumentNullException' occurred in System.Core.dll"
I'm using version 2010.2.924.40 of Telerik. I also tested this with the previous version of Telerik and it doesn't throw any exceptions.
In one of my grids 19 exceptions are thrown and it takes about 8 seconds to render the entire grid because of these exceptions. I can probably find a workaround without using UniqueName but it would of course be best it this could be fixed by you guys.
Regards
Arnstein
9 Answers, 1 is accepted
0
Hi Arnstein,
Vlad
the Telerik team
We believe that we already fixed this. Can you post the stack trace just in case to check if this is the same problem? In the meantime please declare DataMemberBinding instead UniqueName and let me know if you have the same issue.
Greetings,Vlad
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0
Arnstein
Top achievements
Rank 1
answered on 04 Nov 2010, 04:22 PM
In our application we're using both DataMemberBinding and UniqueName. The combination of DataMemberBinding and DataFormatString works fine. I don't know how to catch this exception so I don't have any stacktrace. But you can easily test this with the example I posted, just have a look at the output window in VS.
0
Betsy
Top achievements
Rank 1
answered on 15 Nov 2010, 02:38 PM
We are using 2010.3.110.40, DataMemberBinding, NOT using UniqueName and we get the same exception thrown. It is thrown once per column that has the DataFormatString applied. The below grid throws the exception twice. If I comment out the two date columns or remove the DataFormatString it is not thrown.
<
telerik:RadGridView
ItemsSource
=
"{Binding Items}"
AutoGenerateColumns
=
"False"
IsReadOnly
=
"True"
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewBoundColumnBase
Header
=
"Device Number"
DataMemberBinding
=
"{Binding DeviceNumber}"
ShowDistinctFilters
=
"False"
>
<
telerik:GridViewBoundColumnBase.CellTemplate
>
<
DataTemplate
>
<
TextBlock
>
<
Hyperlink
Command
=
"{Binding DataContext.SelectCommand, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadGridView}}}"
CommandParameter
=
"{Binding}"
>
<
TextBlock
Text
=
"{Binding DeviceNumber}"
></
TextBlock
>
</
Hyperlink
>
</
TextBlock
>
</
DataTemplate
>
</
telerik:GridViewBoundColumnBase.CellTemplate
>
</
telerik:GridViewBoundColumnBase
>
<
telerik:GridViewDataColumn
Header
=
"Active Date"
DataMemberBinding
=
"{Binding ActiveDate}"
DataFormatString
=
"{}{0:d}"
Width
=
"90"
/>
<
telerik:GridViewDataColumn
Header
=
"InActive Date"
DataMemberBinding
=
"{Binding InActiveDate}"
ShowDistinctFilters
=
"False"
DataFormatString
=
"{}{0:d}"
Width
=
"90"
/>
<
telerik:GridViewDataColumn
Header
=
"Service Account"
DataMemberBinding
=
"{Binding IssuingAccountName}"
/>
<
telerik:GridViewDataColumn
Header
=
"License Plate"
DataMemberBinding
=
"{Binding VehicleLicensePlate,TargetNullValue=Not Assigned}"
ShowDistinctFilters
=
"False"
/>
<
telerik:GridViewDataColumn
Header
=
"Truck Number"
DataMemberBinding
=
"{Binding VehicleDisplayName}"
ShowDistinctFilters
=
"False"
/>
</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>
0
Hi,
Please, take a look at the attached sample project. We tried both cases and everything works fine on our end.
Greetings,
Yordanka
the Telerik team
Please, take a look at the attached sample project. We tried both cases and everything works fine on our end.
Greetings,
Yordanka
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
0
Betsy
Top achievements
Rank 1
answered on 18 Nov 2010, 05:25 PM
Would having the project in VB would change things? I could not get your example to produce the error but when I recreate it in VB I get the issue. I also could not open your mainwindow in the designer, it kept throwing FileIO exceptions. I can submit my solution as a support ticket if you wish. If I take out the DataFormatString the exceptions go away.
Here is my XAML:
And here is the output that I get when running my project.
Here is my XAML:
<
Window
x:Class
=
"MainWindow"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
xmlns:local
=
"clr-namespace:GridExample"
Title
=
"MainWindow"
Height
=
"350"
Width
=
"525"
>
<
Window.Resources
>
<
local:MyViewModel
x:Key
=
"vm"
/>
</
Window.Resources
>
<
Grid
DataContext
=
"{StaticResource vm}"
>
<
telerik:RadGridView
ItemsSource
=
"{Binding Items}"
AutoGenerateColumns
=
"False"
IsReadOnly
=
"True"
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
Header
=
"Active Date"
DataMemberBinding
=
"{Binding ActiveDate}"
DataFormatString
=
"{}{0:d}"
Width
=
"90"
/>
<
telerik:GridViewDataColumn
Header
=
"InActive Date"
DataMemberBinding
=
"{Binding InActiveDate}"
ShowDistinctFilters
=
"False"
DataFormatString
=
"{}{0:d}"
Width
=
"90"
/>
</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>
</
Grid
>
</
Window
>
And here is the output that I get when running my project.
'GridExample.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'GridExample.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities\10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'GridExample.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'GridExample.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'GridExample.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'GridExample.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities.Sync\10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'GridExample.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'GridExample.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Development\Samples\Telerik\GridExample\RadControlsGridExamle\GridExample\bin\Debug\GridExample.vshost.exe', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'GridExample.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'GridExample.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'GridExample.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.DataSetExtensions\v4.0_4.0.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'GridExample.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'GridExample.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'GridExample.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xaml\v4.0_4.0.0.0__b77a5c561934e089\System.Xaml.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'GridExample.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\WindowsBase\v4.0_4.0.0.0__31bf3856ad364e35\WindowsBase.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'GridExample.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\PresentationCore\v4.0_4.0.0.0__31bf3856ad364e35\PresentationCore.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'GridExample.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework\v4.0_4.0.0.0__31bf3856ad364e35\PresentationFramework.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'GridExample.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.VisualBasic\v4.0_10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualBasic.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
The thread '<
No
Name>' (0x1014) has exited with code 0 (0x0).
The thread 'vshost.LoadReference' (0xca4) has exited with code 0 (0x0).
'GridExample.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Development\Samples\Telerik\GridExample\RadControlsGridExamle\GridExample\bin\Debug\GridExample.exe', Symbols loaded.
'GridExample.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'GridExample.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Development\Samples\Telerik\GridExample\RadControlsGridExamle\GridExample\bin\Debug\Telerik.Windows.Controls.GridView.dll', Symbols loaded.
'GridExample.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Development\Samples\Telerik\GridExample\RadControlsGridExamle\GridExample\bin\Debug\Telerik.Windows.Data.dll', Symbols loaded.
'GridExample.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Development\Samples\Telerik\GridExample\RadControlsGridExamle\GridExample\bin\Debug\Telerik.Windows.Controls.dll', Symbols loaded.
'GridExample.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Numerics\v4.0_4.0.0.0__b77a5c561934e089\System.Numerics.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
A first chance exception of type 'System.ArgumentNullException' occurred in System.Core.dll
'GridExample.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Development\Samples\Telerik\GridExample\RadControlsGridExamle\GridExample\bin\Debug\Telerik.Windows.Controls.Input.dll', Symbols loaded.
A first chance exception of type 'System.ArgumentNullException' occurred in System.Core.dll
'GridExample.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework.Aero\v4.0_4.0.0.0__31bf3856ad364e35\PresentationFramework.Aero.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'GridExample.vshost.exe' (Managed (v4.0.30319)): Loaded 'Anonymously Hosted DynamicMethods Assembly'
0
Betsy
Top achievements
Rank 1
answered on 18 Nov 2010, 06:51 PM
WPF 4.0, VB, telerik 2010.3.110.40
If I use the StringFormat as part of the binding expression I do not get the exception.
No exception:
Exception:
If I use the StringFormat as part of the binding expression I do not get the exception.
No exception:
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding ActiveDate, StringFormat=\{0:d\}}"
Header=
"Active Date"
/>
Exception:
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding ActiveDate}"
DataFormatString
=
"{}{0:d}"
Header
=
"Active Date"
/>
0
Rieni De Rijke
Top achievements
Rank 1
answered on 23 Nov 2010, 01:46 PM
Now we used
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding ActiveDate, StringFormat=\{0:d\}}"
Header
=
"Active Date" Un
iqueName="ActiveDate"/>
We use Runtime Version v4.0.30319 Version 2010.3.1110.40.
We still have the problem with:
"A first chance exception of type 'System.ArgumentNullException' occurred in System.Core.dll"
Now we used
<telerik:GridViewDataColumn DataMemberBinding="{Binding ActiveDate, StringFormat=\{0:d\}}"
Header="Active Date" UniqueName="ActiveDate"/>
We use Runtime Version v4.0.30319 Version 2010.3.1110.40.
We still have the problem with:
"A first chance exception of type 'System.ArgumentNullException' occurred in System.Core.dll"
Now we used
<telerik:GridViewDataColumn DataMemberBinding="{Binding ActiveDate, StringFormat=\{0:d\}}"
Header="Active Date" UniqueName="ActiveDate"/>
We use Runtime Version v4.0.30319 Version 2010.3.1110.40.
We still have the problem with:
"A first chance exception of type 'System.ArgumentNullException' occurred in System.Core.dll"
0
Hello,
We will investigate the problem and will let you know as soon as we have more information.
Please, excuse us for the inconvenience caused.
Regards,
Yordanka
the Telerik team
We will investigate the problem and will let you know as soon as we have more information.
Please, excuse us for the inconvenience caused.
Regards,
Yordanka
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
0
Hi,
We fixed the exception and the fix was included in our latest internal build - version .1213.
Best wishes,
Yordanka
the Telerik team
We fixed the exception and the fix was included in our latest internal build - version .1213.
Best wishes,
Yordanka
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF