Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a KB on null reference exception from the GridRowCollection class #2006

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

svdimitr
Copy link
Contributor

Related to: #8796

@svdimitr svdimitr requested a review from a team March 28, 2024 14:27
@svdimitr svdimitr self-assigned this Mar 28, 2024
@svdimitr svdimitr requested a review from a team as a code owner March 28, 2024 14:27
res_type: kb
---

## Environment
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As the issue is version-related, you can add the affected versions to the table. In this case, they are "3.0.0 and later".


## Description

I upgraded the version of the Telerik UI from Blazor components from `<3.0.0` to `>3.0.0` and I get a `NullReferenceException` from the `GridRowCollection` class.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably no client will search with the exact string "<3.0.0" or ">3.0.0", so there is no need to make the sentence hard to read by using these strings. Mention the affected versions in the ## Cause section.

Suggested change
I upgraded the version of the Telerik UI from Blazor components from `<3.0.0` to `>3.0.0` and I get a `NullReferenceException` from the `GridRowCollection` class.
I upgraded the version of the Telerik UI from Blazor components and I get a `NullReferenceException` from the `GridRowCollection` class.


## Error Message

>warning Error: System.NullReferenceException: Object reference not set to an instance of an object.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the message spans multiple rows, present the entire message as a code block (```bash error message ```). If it can also appear on a single line, enclose it in backticks and render it as inline code.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Example for multiline error messages: https://docs.telerik.com/blazor-ui/knowledge-base/root-component-null-reference

You can skip the backticks.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Example for multiline error messages: https://docs.telerik.com/blazor-ui/knowledge-base/root-component-null-reference

You can skip the backticks.

@dimodi Just because you can do it doesn't mean that you should. The Formatting article in the Style Guide clearly prescribes using monospace for the error messages. Using a note of type warning to present an error message is not allowed.

knowledge-base/grid-rowcollection-nullreference.md Outdated Show resolved Hide resolved
Co-authored-by: Yordan <60105689+yordan-mitev@users.noreply.github.com>
@@ -0,0 +1,53 @@
---
Copy link
Contributor

@dimodi dimodi Apr 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neither "rowcollection", nor "nullreference" exist as separate words like this in the error message. Using them in the URL is not optimal, because the URL affects SEO a lot. Consider this:

grid-nullreferenceexception-gridrowcollection.md

@@ -0,0 +1,53 @@
---
title: Null Reference Expection from the GridRowCollection
description: Fixing a Null Reference Exception Thrown from the GridRowCollection.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
description: Fixing a Null Reference Exception Thrown from the GridRowCollection.
description: How to fix a null reference exception thrown for the GridRowCollection property of the Telerik Blazor Grid.

description: Fixing a Null Reference Exception Thrown from the GridRowCollection.
type: troubleshooting
page_title: Null Reference Expection from the GridRowCollection
slug: grid-kb-nullref-gridrowcollection
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you change the .md file name, make the slug consistent, e.g.

Suggested change
slug: grid-kb-nullref-gridrowcollection
slug: grid-kb-nullreferenceexception-gridrowcollection


## Solution

Remove either the `Data` parameter or the `OnRead` event handler.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the developer has used OnRead for some reason, it's unlikely they will go back to Data. Thus the primary recommendation can be phrased in a different way. For example, focus on the new way to use OnRead and link the relevant documentation here. The "See Also" links are less visible by definition.

svdimitr and others added 2 commits April 2, 2024 14:20
Co-authored-by: Dimo Dimov <961014+dimodi@users.noreply.github.com>
Co-authored-by: Dimo Dimov <961014+dimodi@users.noreply.github.com>
svdimitr and others added 5 commits April 2, 2024 14:20
Co-authored-by: Dimo Dimov <961014+dimodi@users.noreply.github.com>
Co-authored-by: Dimo Dimov <961014+dimodi@users.noreply.github.com>
Co-authored-by: Dimo Dimov <961014+dimodi@users.noreply.github.com>
Co-authored-by: Dimo Dimov <961014+dimodi@users.noreply.github.com>
Co-authored-by: Dimo Dimov <961014+dimodi@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants