Skip to content

Commit fb63609

Browse files
NansiYanchevaNansiYancheva
authored andcommitted
docs(common): update after review
1 parent 7462af1 commit fb63609

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

knowledge-base/common-struct-error.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
title: Databound Telerik Blazor components do not work and get a null exception
2+
title: Databound Telerik Blazor Components Do Not Work and Get a Null Exception
33
description: Using struct objects for the Data of the component causes error
44
type: troubleshooting
5-
page_title: Struct data source causes exception
5+
page_title: Struct Data Source Causes Exception
66
slug: common-kb-struct-error
77
tags: telerik, blazor, autocomplete, breadcrumb, chart, chiplist, combobox, contextmenu, drawer, dropdownlist, filemanager, gantt, grid, listbox, listview, menu, multicolumncombobox, multiselect, panelbar, pivotgrid, radiogroup, sankey, scheduler, stock chart, treelist, treeview, struct, null exception
88
ticketid: 1657421
@@ -22,16 +22,13 @@ res_type: kb
2222

2323
## Description
2424

25-
When using a data-bound component, the application gets a null exception, and the component does not work.
26-
27-
## Error Message
28-
When running a Telerik Blazor application the application gets an error similar to the following:
25+
When using a data-bound component, the application gets a null exception, and the component does not work. When running the Telerik Blazor application the application gets an error similar to the following:
2926
```
3027
ArgumentNullException: Value cannot be null. (Parameter 'source')
3128
System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
3229
```
3330

34-
## Example to Reproduce
31+
To reproduce the problem, you can use the following code sample:
3532
````CSHTML
3633
<TelerikGrid Data="@GridData">
3734
<GridColumns>
@@ -78,11 +75,11 @@ System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
7875
}
7976
````
8077

81-
## Possible Cause
82-
The reason for this error is because the component is databound to a `struct`.
78+
## Cause
79+
The cause for this null exception is the binding of Telerik UI for Blazor components to a `struct` component model.
8380

8481
## Solution
85-
The solution is to use a `class` model, not a `struct`, as documented in the red note [here]({%slug common-features-data-binding-overview%}#how-to-provide-data):
82+
The solution is to always bind the component to a `class` model, not a `struct`. For more information, see [Data Binding Overview]({%slug common-features-data-binding-overview%}#how-to-provide-data).
8683

8784
<div class="skip-repl"></div>
8885

@@ -98,4 +95,5 @@ The solution is to use a `class` model, not a `struct`, as documented in the red
9895
````
9996

10097
## See Also
98+
10199
- [Data Binding Overview]({%slug common-features-data-binding-overview%})

0 commit comments

Comments
 (0)