Hi is there any way we can hide edit button of inline as below.?
We just want to keep delete if possible.
Hi is there any way we can hide edit button of inline as below.?
We just want to keep delete if possible.
Hello @Rinu,
To hide the edit option, please, add the following code to JavaScript editor:
fd.spRendered(function() {
fd.control('SPDataTable1').ready().then(function(dt) {
$($(dt.$el).find('.k-header')[1]).hide();
});
});
And the following style to CSS editor:
.fd-command-cell{
display: none!important;
}
Thanks Mnikitina,
This is not related to the above question but some what important.
We have a validation check to see if there is any record in the forms as below.
if (fd.control("SPDataTable1").widget.dataItems().length == 0) {
this.error = "Add at least one asset to cart before submitting";
return false;
}
You can add a custom validator that will check if control has unsaved lines. Please find the code below.
fd.validators.push({
name: 'MyCustomValidator',
error: "Please save rows",
validate: function(value) {
return fd.control('SPDataTable0').widget.element.find('.k-i-check').length==0;
}
});