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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

When I insert an element by the DataManager the Checkbox is always with the value ON

Thread ID:





142508 Feb 7,2019 12:44 AM UTC Feb 7,2019 09:27 AM UTC ASP.NET Web Forms 1
Tags: Grid
Nestor Ochoa
Asked On February 7, 2019 12:44 AM UTC

Hi There.

I'm using the Grid control, and I face this issue, I use a DataManager to do the CRUD functionality, one of the columns is  a Checkbox. when the DataManager receive the call for insert the Checkbox is always sending on.
And the other issue is that the Validation rules are not working.

Thanks in advance.

[WebMethod, ScriptMethod(UseHttpGet = false)]
    public static void NotesInsert(Dictionary<string, object> value, string action)
          value["Completed"] // Always with the value ON


                            <ej:DataManager runat="server"  ID="gvNotesData" URL="EmployeeUpdateUAT_N.aspx/NotesGet" Adaptor="WebMethodAdaptor"  InsertURL="EmployeeUpdateUAT_N.aspx/NotesInsert" >

                            <ej:Grid ID="gvEmployeeNote" runat="server" AllowPaging="true" AllowTextWrap="true" DataManagerID="gvNotesData"  >
                                <EditSettings AllowEditing="false" AllowAdding="true" AllowDeleting="false"></EditSettings>
                                <ToolbarSettings ShowToolbar="true" ToolbarItems="add,update,cancel"></ToolbarSettings>
                                <TextWrapSettings WrapMode="Content" />
                                    <ej:Column Field="Notes" Width="40%" AllowTextWrap="true" HeaderTextAlign="center"   EditType="StringEdit">
                                            <ej:KeyValue Key="required" Value="true"  />
                                            <ej:KeyValue Key="minlength" Value="true" />
                                    <ej:Column Field="LastUpdate" HeaderText="Last Update" HeaderTextAlign="center"  AllowEditing="false" Format="{0:dd/MM/yyyy HH:mm}" Width="12em" TextAlign="Right"   />
                                    <ej:Column Field="CreatedBy" AllowEditing="false"  Width="12em" HeaderTextAlign="center"  /> 
                                    <ej:Column Field="NoteCategoryId" EditType="DropdownEdit" HeaderText="Category" HeaderTextAlign="center" 
                                        ForeignKeyValue="NoteCategoryName" TextAlign="Left" >
                                            <ej:KeyValue Key="required" Value="true"  />
                                    <ej:Column Field="DueDate" AllowEditing="false" HeaderText="Due date" HeaderTextAlign="center"  />
                                    <ej:Column Field="Completed" EditType="BooleanEdit" TextAlign="Center"  AllowEditing="false" HeaderTextAlign="center"  />
                                    <%--  <ej:Column Field="NoteCategoryName" />--%>

Vignesh Natarajan [Syncfusion]
Replied On February 7, 2019 09:27 AM UTC

 Hi Nestor 
Thanks for contacting Syncfusion Support. 
Query#1:- I use a DataManager to do the CRUD functionality, one of the columns is  a Checkbox. when the DataManager receive the call for insert the Checkbox is always sending on. 
From your query, we understand that you are facing issue while inserting the a record with checkbox value. We have checked your reported problem as like your code example but we are unable to reproduce your problem at our end. Please refer to the sample Link 
Refer to the screenshot:- 
Note: reported issue may occur when primary key is not defined for any of the available column. So kindly ensure to define the IsPrimaryKey property to available column whose value is unique  
Query#2:- And the other issue is that the Validation rules are not working. 
We have checked your query and the reported problem occurs when we doesn’t refer the validation script files that are necessary to perform validation. So we suggest you to refer “jquery.validate.min.js” in site.master file. 
Please refer to the below documentation Link 
You can get the script file from your build installed location and refer to the below location.  
              {programfilesfolder}\Syncfusion\Essential Studio\{Version}\JavaScript\assets \external \.... 
                Eg: C:\Program Files (x86)\Syncfusion\Essential Studio\\ JavaScript\assets\external \  …. Get the required script files and load into your project.   
Refer to the screenshot:- 
After following the above solution still facing the issue. Please share us the following details. 
  1. Complete Grid code example(Server side code example ).
  2. Screenshot of the Network Tab/ Video Demo to replicate the issue.
  3. Ensure that validation files are referred in your project. Share your Site.Master.cs file.
Requested details will help us to validate the reported issue at our end. 
Vignesh Natarajan 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon