Grid Add/Edit Dialog Template

Is there an example for the use of SfCheckBox when using the Dialog Template add/edit mode for the SfGrid control in Blazor?


4 Replies

GW Gary Wadden April 25, 2020 05:00 AM UTC

Problem solved.


RS Renjith Singh Rajendran Syncfusion Team April 27, 2020 04:24 AM UTC

Hi Gary, 

Thanks for your update. 

We are glad to hear that you have resolved your problem. 

Please get back to us if you need further assistance. 

Regards, 
Renjith Singh Rajendran 



RU Ruslan June 30, 2020 06:01 PM UTC

do you have an example using SfCheckBox  inside Dialog Template add/edit mode ?



KM Kuralarasan Muthusamy Syncfusion Team July 1, 2020 07:34 AM UTC

Hi Ruslan, 

Thanks for contacting Syncfusion support. 

We have prepared a sample by rendering the sfCheckBox in the Grid dialog template for a Boolean column and you can find it form the below link. Also, we would like to inform that, we must need to provide Name property to the checkbox while using it for editing purpose. Please refer the below code snippet. 

<SfGrid DataSource="@GridData" Toolbar="@(new string[] {"Add", "Edit" ,"Delete","Update","Cancel" })"> 
    <GridEvents OnActionBegin="ActionBeginHandler" TValue="OrdersDetails"></GridEvents> 
    <GridEditSettings AllowAdding="true" AllowEditing="true" AllowDeleting="true" Mode="@EditMode.Dialog"> 
        <Template> 
            @{ 
                var Order = (context as OrdersDetails); 
                <div> 
                   <div class="form-row"> 
                        <div class="form-group col-md-6"> 
                            <label class="e-float-text e-label-top">Verified</label> 
                            <SfCheckBox Name="Verified" ID="Verified" Checked="@(Order.Verified)"> 
                           </SfCheckBox> 
                        </div> 
                    </div> 
                </div> 
            } 
        </Template> 
    </GridEditSettings> 
    <GridColumns> 
       <GridColumn Field=@nameof(OrdersDetails.Verified) Type="ColumnType.Boolean" DisplayAsCheckBox="true" HeaderText="Verified" Width="150"></GridColumn> 
    </GridColumns> 
</SfGrid> 


Regards, 
Kuralarasan M 


Loader.
Up arrow icon