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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Edit Row Height in Grid

Thread ID:

Created:

Updated:

Platform:

Replies:

129534 Mar 23,2017 09:14 PM UTC Mar 24,2017 12:59 PM UTC ASP.NET MVC 1
loading
Tags: Grid
Michael Lambert
Asked On March 23, 2017 09:14 PM UTC

I have a grid with at text area that is multi-line, when viewing it is fine:


But when I go to edit, the row height reduces making editing difficult: 

How can I make the edit row height at least the same height has it was in non-edit mode (or even a little bit larger).
I'm using this as a template:

    function createNote() {
        return "<textarea class='text' >{{:DeployNotes}}</textarea>";
    }
    function readNote(args) {
        return args.val();
    }
    function writeNote(args) {
        $('.text').css("max-width", args.element.parent("td").width());
        $('.text').css("max-height", args.element.parent("td").height());
        null;
    }

Also is there a way (rather easily) to make the row height adjustable, like column with dragging?
Thanks.

Mike

Venkatesh Ayothi Raman [Syncfusion]
Replied On March 24, 2017 12:59 PM UTC

Hi Michael, 
Thanks for contacting Syncfusion support. 
We have achieved your requirement by applying setting a dynamic height which is based on the content in write event in EditTemplate. Please refer to the following code example, 
Code example
@Edit Tempalte functions 
function createNote() { 
        return "<textarea class='text'>{{:DeployNotes}}</textarea>"; 
    } 
    function readNote(args) { 
        return args.val(); 
    } 
    function writeNote(args) { 
        var contentHeight = $("#GridCustomerID")[0].scrollHeight.toString() + "px"; 
        $($("#GridCustomerID")[0]).css("height", contentHeight);//set textarea height based on the content  
       
        null; 
    } 

Regards, 
Venkatesh Ayothiraman. 


CONFIRMATION

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.

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

;