Blazor webassemply : Add Checkbox in Grid

Hello All,


I am creating a web application in blazor I looking for a checkbox in Grid. I need to create a User Role.

where admin assigns user role for a particular role. Please check the screenshot for that

Capture1 (1).jpg


1 Reply

RN Rahul Narayanasamy Syncfusion Team October 11, 2021 01:38 PM UTC

Hi Sanket, 

Greetings from Syncfusion. 

We have validated your query and we suspect that you want to show a checkbox when editing the checkbox column. If yes, then you can use EditType as BooleanEdit for that column. Find the below code snippets and reference link for your reference. 

Reference:  

 
<SfGrid DataSource="@OrderData" Toolbar=@ToolbarItems> 
    <GridEditSettings AllowEditing="true" AllowAdding="true" AllowDeleting="true"></GridEditSettings> 
    <GridColumns> 
        <GridColumn Field=@nameof(Order.OrderID) HeaderText="Order ID" IsPrimaryKey="true" TextAlign="TextAlign.Center" Width="120"></GridColumn> 
        . ..  
        <GridColumn Field=@nameof(Order.Verified) HeaderText="Verified" EditType="EditType.BooleanEdit" TextAlign="TextAlign.Center" DisplayAsCheckBox="true" Width="120" EditorSettings="@VerifiedEditParams"></GridColumn> 
    </GridColumns> 
</SfGrid> 

Please let us know if you have any concerns. 

Regards, 
Rahul 


Loader.
Up arrow icon