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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

grid Textbox field client side event

Thread ID:





120824 Oct 20,2015 04:48 AM UTC Oct 21,2015 09:36 AM UTC ASP.NET Web Forms 2
Tags: Grid
Asked On October 20, 2015 04:48 AM UTC


InlineForm - grid 
one -it's possible if i select  product code(str_product_code) in grid client side event (ajax JSON ) bind price automatically 

 <ej:Column Field="str_product_code" HeaderText="Product Name"  ForeignKeyField="str_product_code"
                               ForeignKeyValue="str_product_name" TextAlign="Left" Width="90" IsPrimaryKey="true"/>
 <ej:Column Field="dml_price" HeaderText="Price" TextAlign="Right" Width="80" Format="{0:C}" >
                            <NumericEditOptions DecimalPlaces="2"></NumericEditOptions>


Replied On October 20, 2015 05:12 AM UTC


Sorry , please consider  Inline Editing -Grid ( not inlineForm - grid).



Balaji Marimuthu [Syncfusion]
Replied On October 21, 2015 09:36 AM UTC

Hi Pratheep,

Thanks for contacting Syncfusion support.

Your requirement is achieved using the ActionComplete event in Grid. Refer to the sample and code example as below.
Sample: Sample-Editing

Help Document: http://help.syncfusion.com/js/api/ejgrid#events:actioncomplete

<ej:Grid ID="OrdersGrid" runat="server" AllowPaging="True" >

           <ClientSideEvents  ActionComplete="actionComplete"  />

            <EditSettings AllowAdding="True" AllowDeleting="True" AllowEditing="True"></EditSettings>

            <ToolbarSettings ShowToolbar="True" ToolbarItems="add,edit,delete,update,cancel"></ToolbarSettings>


                <ej:Column Field="EmployeeID" HeaderText="Employee Name" IsPrimaryKey="True"  ForeignKeyField="EmployeeID"

                    ForeignKeyValue="FirstName" TextAlign="Left" Width="90" />

                <ej:Column Field="Freight" HeaderText="Freight" TextAlign="Right" Width="75" Format="{0:C}" EditType="Numeric">

                     <NumericEditOptions DecimalPlaces="2"></NumericEditOptions>



Using DropDownList select event, we have bind the value to Freight column automatically in Grid while adding the records. Refer to the help document.

<script type="text/javascript">

      function actionComplete(args) {

            if (args.requestType == "add") {

                var proxy = this._id;

                $("#" + this._id + "EmployeeID").ejDropDownList({

                    select: function (args) {  //select event in dropdownlist


                            url: "/Default.aspx/dropdowndata",

                            type: "POST",

                            contentType: "application/json; charset=utf-8",

                            data: JSON.stringify({ id: args.value }),

                            dataType: "json",

                            success: function (data) {

                                //set value to the Freight column

                                if ($('#' + proxy + 'Freight').hasClass("e-numerictextbox")) {

                                    var obj = $('#' + proxy + 'Freight').ejNumericTextbox("instance"); 

                                    obj.option("value", data.d);  //if using numeric text box



                                    $('#' + proxy + 'Freight').val(data.d);  //if using ordinary text box







Balaji Marimuthu


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