<GridColumn Field=@nameof(Order.Verified) HeaderText="Verified" TextAlign="TextAlign.Center" DisplayAsCheckBox="true" Width="120">
<Template>
@{
var val = (context as Order);
<SfCheckBox CssClass="e-outline e-success" @bind-Checked=@val.Verified TChecked="bool" ValueChange="@((args)=>valueChange(args,val))"></SfCheckBox>
}
</Template>
</GridColumn>
@code{
public void valueChange(ChangeEventArgs<bool> Args, Order record)
{
//update the changes in your database / datasource
Order rec = OrderData.Find(x => x.OrderID == record.OrderID);
rec.Verified = Args.Checked;
}
} |
<GridColumn Field=@nameof(Order.Verified) HeaderText="Verified" TextAlign="TextAlign.Center" DisplayAsCheckBox="true" Width="120">
<Template>
@{
var val = (context as Order);
<div @onclick:stopPropagation="true">
<SfCheckBox CssClass="e-outline e-success" @bind-Checked=@val.Verified TChecked="bool" ValueChange="@((args)=>valueChange(args,val))"></SfCheckBox>
</div>
}
</Template>
</GridColumn> |
This doesn't work for me. I get an error in the markup on ValueChange: 'The delegate type could not be inferred'. I'm using Syncfusion Blazor version 20.4.0.43
Hi Andy,
Greetings from Syncfusion.
We have upgraded the sample to the mentioned version (20.4.43). But we could not able to replicate the reported issue at our end.
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/BLAZOR~1-1767902782.zip
If you still face difficulties or if you have further queries then kindly 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 provide solution as early as possible.
Regards,
Monisha