We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Checkbox UIChangeEventArgs

Hello!
As documentationhttps://ej2.syncfusion.com/blazor/documentation/check-box/native-event/I try to implement Onchange Event but it shows and errors. I'm with preview 9 and I have the last syncfusion version I add in _Imports.razor file@usingSyncfusion.EJ2.Blazor.Buttons
error CS0246: Le nom de type ou d'espace de noms 'UIChangeEventArgs' est introuvable (vous manque-t-il une directive using ou une référence d'assembly ?)
here is my code
@code{
private void onChange(UIChangeEventArgs args)
{
//onChange Event triggered
}
}
Thanks,
Chimène NK.

3 Replies

SP Sangeetha Priya Murugan Syncfusion Team September 18, 2019 07:27 AM UTC

Hi NKOUAMBIA, 
 
Thank you for contacting Syncfusion support. 
 
We have checked your reported issue based on your provided link in preview 9 and we are able to reproduce the reported issue in our end. Based on the assistance of the Blazor Preview 9, we would suggest you to use onchange event in the "@" sign prefix with the proper argument declaration as like in the below code example. 
 
Code Block: 
 
@using Syncfusion.EJ2.Blazor.Buttons 
 
<EjsCheckBox Label="Change" @onchange="onChange"></EjsCheckBox> 
 
@code { 
    private void onChange(Microsoft.AspNetCore.Components.ChangeEventArgs args) 
    { 
        //onChange Event triggered 
    } 
} 
 
For your convenience, we have prepared the sample based on your requirement. Please find the sample link below. 
 
 
In the meantime, on our online documentation site, we have considered this and corrected it. And  
refresh in our next by-weekly release, which is scheduled to be rolled out at the end of this month. 
 
Could you please check the above sample and get back to us, if you need any further assistance on this. 
 
Regards, 
Sangeetha M 



NC NKOUAMBIA CHIMENE September 18, 2019 01:03 PM UTC

Hello!

thanks for answer I will wait for the next release, I have another Questions: How can I change programmatically Backgroud color of my checkbox??
This is my scenario
public string[]  colors = { "#ff8787", "#9775fa", "#748ffc", "#3bc9db", "#69db7c",
"#fdd835", "#f5e592", "#20b3d1", "#df5286", "#7fa900",
"#fec200", "#5978ee", "#00bdae", "#ea80fc"};
grappeSalleList = ( from g in grappesList
                            select new GrappeSalle { 
                                                IdGrappeSys = g.IdGrappeSys,
                                                NomGrappe =  g.NomGrappe,
                                                color =  colors[(new Random().Next( 1, colors.Length ) % colors.Length)]
                                                }).ToList(); 

and I want each checkbox to be rendered with color in grappeSalleList 

@foreach (var g in grappesList){
  EjsCheckBox>  
}
I look at this link https://ej2.syncfusion.com/blazor/documentation/check-box/how-to/customized-checkbox/ but it doesn't help me or I don't know how to manage with.

Thanks,
Chimène NK.




SD Saranya Dhayalan Syncfusion Team September 19, 2019 02:40 PM UTC

Hi NKOUAMBIA, 
 
We have checked your reported requirement, this requirement achieved by handling the html attribute. Currently, we don’t have to handle the html attribute support for checkbox component. So, we have included in the support in our upcoming by-weekly release. Please track the status in the below feedback link 
 
 
 
Regards, 
Saranya D 


Loader.
Live Chat Icon For mobile
Up arrow icon