JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › Data Grid › GetVisibleRows throws exception
Tagged: blazor, exception, getvisiblerows, grid
- This topic has 3 replies, 3 voices, and was last updated 6 days, 1 hour ago by
Markov.
Viewing 4 posts - 1 through 4 (of 4 total)
-
AuthorPosts
-
March 17, 2023 at 7:47 am #104538
wolf.t
ParticipantMy goal is to get all currently visible rows in the grid.
In order to do that I’ve been trying to use GetVisibleRows() but I’ve been getting the following Exception:Microsoft.JSInterop.JSException: Converting circular structure to JSON blazor.webassembly.js:1 --> starting at object with constructor 'BaseElement' blazor.webassembly.js:1 | property '$' -> object with constructor 'f' blazor.webassembly.js:1 | property 'events' -> object with constructor 'Object' blazor.webassembly.js:1 | ... blazor.webassembly.js:1 | index 0 -> object with constructor 'Object' blazor.webassembly.js:1 --- property 'context' closes the circle blazor.webassembly.js:1 TypeError: Converting circular structure to JSON blazor.webassembly.js:1 --> starting at object with constructor 'BaseElement' blazor.webassembly.js:1 | property '$' -> object with constructor 'f' blazor.webassembly.js:1 | property 'events' -> object with constructor 'Object' blazor.webassembly.js:1 | ... blazor.webassembly.js:1 | index 0 -> object with constructor 'Object' blazor.webassembly.js:1 --- property 'context' closes the circle blazor.webassembly.js:1 at JSON.stringify (<anonymous>) blazor.webassembly.js:1 at O (https://localhost:7010/_framework/blazor.webassembly.js:1:5193) blazor.webassembly.js:1 at Object.invokeJSFromDotNet (https://localhost:7010/_framework/blazor.webassembly.js:1:3254) blazor.webassembly.js:1 at Object.St [as invokeJSFromDotNet] (https://localhost:7010/_framework/blazor.webassembly.js:1:59918) blazor.webassembly.js:1 at _mono_wasm_invoke_js_blazor (https://localhost:7010/_framework/dotnet.6.0.11.5kzn1v3580.js:1:195300) blazor.webassembly.js:1 at wasm://wasm/00971d3e:wasm-function[219]:0x1a492 blazor.webassembly.js:1 at wasm://wasm/00971d3e:wasm-function[167]:0xce60 blazor.webassembly.js:1 at wasm://wasm/00971d3e:wasm-function[166]:0xbd73 blazor.webassembly.js:1 at wasm://wasm/00971d3e:wasm-function[2815]:0xabec4 blazor.webassembly.js:1 at wasm://wasm/00971d3e:wasm-function[1619]:0x6fc85 blazor.webassembly.js:1 at Microsoft.JSInterop.WebAssembly.WebAssemblyJSRuntime.InvokeJS(String identifier, String argsJson, JSCallResultType resultType, Int64 targetInstanceId) blazor.webassembly.js:1 at Microsoft.JSInterop.JSInProcessRuntime.Invoke[IEnumerable'1](String identifier, Int64 targetInstanceId, Object[] args) blazor.webassembly.js:1 at Microsoft.JSInterop.JSInProcessRuntime.Invoke[IEnumerable'1](String identifier, Object[] args) blazor.webassembly.js:1 at Smart.Blazor.JSRunner.<InvokeGetMethod>d__21'1[[System.Collections.Generic.IEnumerable'1[[System.Object, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext() blazor.webassembly.js:1 at Smart.Blazor.Grid.GetVisibleRows()
My grid looks like this:
<Grid @ref="grid" DataSource="@data"> <Columns> <Column DataField="Id" Width="auto" Visible="false" AllowEdit="false"/> <Column DataField="Name" Label="Name" AllowEdit="true"/> <Column DataField="BoolValue " Label="BoolValue" AllowEdit="true" DataType="boolean" Editor="@checkBoxEditor" Template="@checkBoxEditor"/> </Columns> </Grid>
My class look something like this, with @data being List<ClassName>
public class Entity { public Guid Id { get; set; } } public class ClassName: Entity { public string Name { get; set; } public bool BoolValue { get; set; } }
What am I doing wrong?
March 17, 2023 at 4:52 pm #104559Markov
KeymasterMarch 18, 2023 at 12:26 pm #104563oliver.aldrian
ParticipantHello,
colleague of wolf.t here.
Please see https://github.com/DiawaKG/reproduction-smarthtml-grid-getvisiblerows-exception.
Running the Server project and clicking the Button “Click Me” on the index page reproduces the problem.
KR
March 20, 2023 at 10:22 am #104585 -
AuthorPosts
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.