BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
Index.cshtml
<ejs-grid id="grid" dataSource="ViewBag.DataSource" beforeDataBound="beforeDataBound" toolbar="@(new List<string>() { "Add"})">
<e-grid-editSettings allowAdding="true"></e-grid-editSettings>
<e-grid-columns>
<e-grid-column field="OrderID" headerText="Order ID" type="number" textAlign="Right" width="120"></e-grid-column>
<e-grid-column field="CustomerID" headerText="Customer ID" type="string" width="140"></e-grid-column>
<e-grid-column field="Freight" headerText="Freight" textAlign="Right" format="C2" width="120"></e-grid-column>
<e-grid-column field="OrderDate" headerText="Order Date" format='yMd' textAlign="Right" width="140"></e-grid-column>
</e-grid-columns>
</ejs-grid>
<script>
function beforeDataBound(args) {
if (args.count > 0) { // check the record in database
var data = this.toolbar.indexOf('Add'); // get the Add button indexof value
this.toolbarModule.toolbar.hideItem(data, true); // pass the value into the hideitem method as parameter and set to true
}
}
</script> |