Hello,
Is anyone encounter the same problem? Can't figure out how to fix with the data grid
Nuget version: 24.2.5
** error
Incorrect use of <label for=FORM_ELEMENT>
The label's for attribute doesn't match any element id. This might prevent the browser from correctly autofilling the form and accessibility tools from working correctly.
To fix this issue, make sure the label's for attribute references the correct id of a form field.
<SfGrid TValue="Item"
EnablePersistence="true"
AllowPaging="true"
AllowFiltering="true"
AllowSorting="true"
Toolbar="@(new List<string>() { "Add", "Edit", "Delete", "Cancel", "Update" })">
<SfDataManager Url="https://localhost:7169/odata/items" Adaptor="Adaptors.ODataV4Adaptor"></SfDataManager>
<GridEditSettings AllowAdding="true"
AllowDeleting="true"
AllowEditing="true"
Mode="EditMode.Dialog"/>
<GridEvents OnActionBegin="OnActionBegin"
OnActionFailure="ActionFailureHandler"
TValue="Item"/>
<GridColumns>
<GridColumn Field=@nameof(Item.Id)
HeaderText="Item ID"
IsPrimaryKey="true"
Visible="false"
Width="120"
AllowAdding="false"
AllowEditing="false"
Type="ColumnType.Integer"/>
<GridColumn Field=@nameof(Item.Code)
HeaderText="Item Code"
Width="150"
Type="ColumnType.String"
ValidationRules="@(new ValidationRules{ Required= true, MaxLength = 100 })" />
<GridColumn Field=@nameof(Item.Name)
HeaderText="Item Name"
Type="ColumnType.String"
Width="150"
ValidationRules="@(new ValidationRules{ Required= true, MaxLength = 200 })" />
<GridColumn Field=@nameof(Item.Description)
HeaderText="Item Description"
Type="ColumnType.String"
ValidationRules="@(new ValidationRules{ MaxLength = 500 })" />
<GridColumn Field=@nameof(Item.IsItemConsigment)
HeaderText="Is Consigment?"
Type="ColumnType.Boolean"
Width="120"/>
<GridColumn Field=@nameof(Item.Active)
Type="ColumnType.Boolean"
HeaderText="Is Active?"
Width="120"/>
<GridColumn Field=@nameof(Item.CreatedDate)
HeaderText="Datetime Created"
Format="d"
Type="ColumnType.DateTime"
Width="130"
AllowAdding="false"
AllowEditing="false"/>
</GridColumns>
</SfGrid>
Hi Jayson,
We are unable to reproduce the
reported issue when attempting to reproduce the issue. For your
reference we have attached simple sample. So, to further proceed with
the reporting problem, we require some additional clarification from your end.
Please share the below details to proceed further at our end.
Above-requested details will be very helpful in validating the reported query at our end and providing a solution as early as possible. Thanks for your understanding.
Regards,
Prathap s
Hello Prathap,
Thank you for taking time to respond.
I'm following this document. using Blazor Web App template with .Net 8.
I have attached the sample file and screen recording in chat.
Best regards,
Jayson
Hi Jayson,
Thanks for the update,
We have considered it as a bug and logged an issue “ If a grid column
is set to 'visible: false' and you click 'add' in the edit dialog, it throws a
console error “ for the same. Thank you for taking the time to report this
issue and helping us to improve our product. At Syncfusion, we are committed to
fixing all validated defects (subject to technological feasibility and Product
Development Life Cycle) and this fix will be included in our upcoming patch
release.
You can now
track the current status of your request, review the proposed resolution
timeline, and contact us for any further inquiries through this feedback.
Disclaimer: “Inclusion of this solution in the weekly release may
change due to other factors including but not limited to QA checks and works
reprioritization”
Until then we appreciate your patience.
Regards,
Prathap S
Hi Jayson,
Thanks for your patience,
We are glad to announce that, we have included the fix for the reported issue “ If a grid column is set to 'visible: false' and you click 'add' in the edit dialog, it throws a console error “ in our 25.1.35 Volume 1 2024 release. So please upgrade to our latest version of Syncfusion NuGet package to resolve the reported issue. Please find the NuGet package for latest fixes and features from below.
NuGet: https://www.nuget.org/packages/Syncfusion.Blazor.Grid
Release Notes: https://blazor.syncfusion.com/documentation/release-notes/25.1.35?type=all#data-grid
Root Cause: Adding label for column which having Visible property as
false.
Corrective Actions Taken: column visible to false prevents it from being rendered in the validation label element.
We thank you for your support and appreciate your patience in waiting for this release.
Regards,
Prathap S