Skip to content

Commit cb42430

Browse files
authored
docs(kb): Document inputelementvalue JS error (#1401)
1 parent f125675 commit cb42430

File tree

2 files changed

+62
-0
lines changed

2 files changed

+62
-0
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
title: Error KeyNotFoundException About Key inputElementValue
3+
description: How to troubleshoot and fix exception error Error KeyNotFoundException The given key inputElementValue was not present in the dictionary
4+
type: troubleshooting
5+
page_title: Error KeyNotFoundException - the given key inputElementValue was not present in the dictionary
6+
slug: common-kb-keynotfoundexception-inputelementvalue
7+
position:
8+
tags: telerik, blazor, exception, error
9+
ticketid: 1604193, 1602978, 1601905, 1601905
10+
res_type: kb
11+
---
12+
13+
## Environment
14+
15+
<table>
16+
<tbody>
17+
<tr>
18+
<td>Product</td>
19+
<td>Telerik UI for Blazor</td>
20+
</tr>
21+
</tbody>
22+
</table>
23+
24+
25+
## Description
26+
27+
When I use Add, Delete or Edit Commands in the Grid, I get an error `KeyNotFoundException` about a key `inputElementValue` not present in the dictionary.
28+
29+
A date field in the Grid popup editing is crashing.
30+
31+
When I set the focus on a DatePicker or DateInput and tab to switch to another component, I get an error.
32+
33+
34+
## Error Message
35+
36+
>warning System.Collections.Generic.KeyNotFoundException: The given key 'inputElementValue' was not present in the dictionary.
37+
38+
39+
## Cause\Possible Cause(s)
40+
41+
This error indicates that the app is using an old or wrong version of the `telerik-blazor.js` file, for example, after a [component version upgrade]({%slug upgrade-tutorial%}).
42+
43+
44+
## Solution
45+
46+
To resolve the error:
47+
48+
* (if using [CDN]({%slug getting-started/what-you-need%}#using-cdn)) Update the `telerik-blazor.js` file URL to the correct version.
49+
* (if using static assets) Clear the browser cache.
50+
* (if using a local JS file) Replace the `telerik-blazor.js` file with the new version.
51+
52+
53+
## See Also
54+
55+
* [Telerik UI for Blazor version upgrade steps]({%slug upgrade-tutorial%})
56+
* [JavaScript error troubleshooting]({%slug troubleshooting-js-errors%})

troubleshooting/js-errors.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,12 @@ Another possible cause is a *race condition* during fast multiple recreations of
104104
* Do not call `StateHasChanged()` inside `EventCallback` methods (e.g. Button click handlers). Blazor executes `StateHasChanged()` automatically in such cases.
105105
* Throttle the user behavior, so that rapid subsequent navigation is not possible.
106106

107+
## KeyNotFoundException: The given key inputElementValue was not present
108+
109+
The full exception message is `System.Collections.Generic.KeyNotFoundException: The given key 'inputElementValue' was not present in the dictionary.`
110+
111+
This error indicates that [the app is using an old or wrong version of the `telerik-blazor.js` file]({%slug common-kb-keynotfoundexception-inputelementvalue%}), for example, after a component version upgrade.
112+
107113
## Object doesn't support property or method 'assign'
108114

109115
Under IE, you may get errors similar to `Object doesn't support property or method 'assign'` or errors that relate other modern JS features that are not supported under IE. The reason is that we use modern code that may not work under IE - it is not one of the [browsers we support]({%slug system-requirements%}#browser-support), and WebAssembly does not work on it anyway, so modern Blazor apps won't run on IE regardless.

0 commit comments

Comments
 (0)