Pricing changes are coming in January. Contact our Sales team to secure the current price for your desired license.

Exception in Blazor when using RecordId feature

Answered
Rushi Lonkar asked on April 19, 2024

Hello,
I am using the Flexmonster Blazor component (v 2.9.68) where I am setting a field in my JSON data source to type = "id" and then handling the cellclick event to do some custom processing. While I am able to get the recordId successfully in the cellclick event, I see a .NET exception in the console. It only happens if I have a mapping type of "id". If I remove that, I do not see the exception.
Can you please let me know what could be causing this?
Thanks,
Rushi
 
 

Attachments:
BlazorFlexmonsterError

3 answers

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster April 22, 2024

Hello, Rushi!

Thank you for reaching out to us.

Kindly note that in Flexmonster Blazor component, the recordId data should be of a string type. So, we suggest passing the ids as strings to the component and setting them the id type in mapping.

Hope you will find our answer helpful.

Kind regards,
Solomiia

Public
Rushi Lonkar April 22, 2024

Hi Solomiia,
So, just changing the data type to string did not help since it resulted in the same error. However, I tried the following and that seemed to work. Somehow, it always needs an array for recordId? Is that correct?

class MyData
{
public string Name {get;set;}
public string MyDataItemID {get;set;}
public string[] RecordID
{
get => new string[] { $"{MyDataItemID}" };
}
}
Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster April 23, 2024

Hello, Rushi!

Thank you for your feedback.

You are right, for classic and compact forms the array of recordId's is returned, as there can be several id fields, e.g. one recordId for the rows' member and one for columns'.

We are glad that setting the field type to string[] helped to resolve the case.

Feel free to reach out to us in case of any other questions.

Kind regards,
Solomiia

Please login or Register to Submit Answer