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:
@(Html.EJ().Grid<object>("HierarchyGrid")
.Datasource((IEnumerable<object>)ViewBag.datasource)
----------------------------
.Columns(col =>
{
-----------------------
})
.ClientSideEvents(eve => eve.ActionComplete("complete"))
)
<script>
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");
}
}
}
</script>
|
Refer to the Help document for the actionComplete event.
Regards,
Prasanna Kumar N.S.V