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

Add custom placeholder/watermark in textbox on edit or add new row

Thread ID:





131163 Jun 25,2017 09:24 PM UTC Jun 26,2017 03:07 PM UTC ASP.NET MVC 1
Tags: Grid
Stephen Armstrong
Asked On June 25, 2017 09:24 PM UTC


I want to be able to add a placeholder in a textbox when editing or adding a new row in the grid.

Is there a simple way to do this?


Prasanna Kumar Viswanathan [Syncfusion]
Replied On June 26, 2017 03:07 PM UTC

Hi Steve, 

Thanks for contacting Syncfusion support. 

To add a placeholder in textbox in a row, use actionComplete event of ejGrid. This event will be triggered for every grid success event. In this event we find the input elements of a newly added row and add the placeholder in the textbox. 

Find the code example:  

        .Columns(col => 
        .ClientSideEvents(eve => eve.ActionComplete("complete"))       
    function complete(args) { 
        if (args.requestType == "add" && args.requestType == "edit") { 
            var textboxes = this.element.find(".gridform").find("input"); 
            for (var i = 0 ; i < textboxes.length ; i++) { 
                $(textboxes[i]).attr("placeholder", "Enter Text"); 

Refer to the Help document for the actionComplete event.  

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

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