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

ejGrid Colums Field TextArea

Hi,

How to Diplay ejGrid Colums Field TextArea and edittingType same way ?

columns: [

{ field: "Remarks", headerText: "Remarks", width: 75, textAlign: "left",editType: ej.Grid.EditingType.InputTextBox }

]

 This edittype does not work

Regards,

Emir


3 Replies

KK Karthick Kuppusamy Syncfusion Team July 18, 2016 09:10 AM UTC

Hi Emir,   
  
Thanks for contacting Syncfusion Support.   

To display ejGrid Colums Field TextArea and edittingType the same way you have to use “edittemplate” property of the grid column. The following sample displays text area in editing state. Please find the code example.  
 


 
 
columns: [   
                        { field: "OrderID", isPrimaryKey: true, headerText: "Order ID", textAlign: ej.TextAlign.Right, validationRules: { required: true, number: true }, width: 90 },   
                        {   
                            field: "CustomerID", headerText: 'Customer ID',   
                            editTemplate: {   
                                create: function () {   
                                    return "<textarea></textarea>";//initialize the control   
                                },   
                                read: function (args) {   
                                    return args.val();//read the value at the time of save   
                                },   
                                write: function (args) {   
                                    debugger;   
                                    $("textarea").css("width","100%").val(args.rowdata.CustomerID);//assign the value to the control   
                                }   
                            }, width: 170   
                        },   
                        { field: "EmployeeID", headerText: 'Employee ID', width: 150 },   
   
  
For more information, please refer to the UG Link:   
  
For your reference, we have created a JS playground sample.   


 
 
Regards,   
K. Karthick  



EA Emir Aydogan July 18, 2016 11:48 AM UTC

 
Hi K. Karthick,

Thank you for solving my problem,

Regard

Emir,  


KK Karthick Kuppusamy Syncfusion Team July 19, 2016 04:53 AM UTC

Hi Emir, 

We have happy to hear that your requirement is achieved. 

Regards, 
K.Karthick 


Loader.
Live Chat Icon For mobile
Up arrow icon