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">
<Columns>
---------------------------------
<ej:Column Field="CustomerID" HeaderText="Customer ID" Width="90">
<ValidationRule>
<ej:KeyValue Key="required" Value="true" />
</ValidationRule>
<EditTemplate Create="create" Read="read" Write="write" />
</ej:Column>
---------------------------------
<EditSettings AllowEditing="True" AllowAdding="True" AllowDeleting="True"></EditSettings>
<ToolbarSettings ShowToolbar="True" ToolbarItems="add,edit,delete,update,cancel"></ToolbarSettings>
</ej:Grid>
<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%");
}</script>
</asp:Content>
|
Screenshot:
Refer to the Help document for the editTemplate.
Regards,
Prasanna Kumar N.S.V