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

Multiline edit in grid


i need to edit text field with a multiline textbox. How can i do to make it in a grid ?

Thank you

1 Reply

PK Prasanna Kumar Viswanathan Syncfusion Team November 28, 2016 12:21 PM UTC

Hi Nicolas, 

Thanks for contacting Syncfusion support. 

To have multiline input text box in editing,  use textarea html control in the inline editing of grid. It is achieved by the editTemplate property.  

In EditTemplate Create event we will create the textarea element for CustomerID column. 
Find the code example, screenshot and sample:  
<ej:Grid ID="Grid" runat="server" AllowPaging="True"> 
               <ej:Column Field="CustomerID" HeaderText="Customer ID" Width="90"> 
                        <ej:KeyValue Key="required" Value="true" /> 
                    <EditTemplate Create="create" Read="read" Write="write" /> 
         <EditSettings AllowEditing="True" AllowAdding="True" AllowDeleting="True"></EditSettings> 
          <ToolbarSettings ShowToolbar="True" ToolbarItems="add,edit,delete,update,cancel"></ToolbarSettings> 
<script type="text/javascript"> 
   function create() { 
        return "<textarea class='text' rows='4' cols='50'>{{:CustomerID}}</textarea>"; 
    function read(args) { 
        return args.val(); 
    function write(args) { 
        args.element.css("width", "100%"); 

Refer to the Help document for the editTemplate. 

Prasanna Kumar N.S.V 

Live Chat Icon For mobile
Up arrow icon