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

Multiline edit in grid

Thread ID:





127585 Nov 25,2016 08:37 AM UTC Nov 28,2016 12:21 PM UTC ASP.NET Web Forms 1
Tags: Grid
Asked On November 25, 2016 08:37 AM UTC


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

Thank you

Prasanna Kumar Viswanathan [Syncfusion]
Replied On 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 


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

or the page will be automatically redirected to 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