ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
disable/hide the delete button for certain rows or show a info popup on click?
Title:
B
I
{code}
?
is there a way to hide the delete button for certain rows, if I don't want that row to be deleted or instead of showing the Confirm Deletion popup just show a popup that this row can't be deleted?
Save Changes
Cancel
c4
asked at 23 Jul 2020
Answers
B
I
{code}
?
using `Column.ClientFormatFunc` you can set a js function that will return a different cell content depending on the row model, you can see it shown here: https://demo.aspnetawesome.com/GridDemo/CustomFormat and in this demo: https://demo.aspnetawesome.com/GridInlineEditDemo/ConditionalDemo you can see the delete buttons missing for certain rows so for example to show a message for rows that can't be deleted you could have function delFormat(rowModel) var btnMsg = '<button type="button" onclick=\"awe.open("cantDeletePopup")\">delete</button>'; var btnConfirm = ... return rowModel.Prop1 ? btnMsg : btnConfirm; }
Save Changes
Cancel
Omu
answered at 23 Jul 2020
Allright Sir, got it. Thanks alot!
at 29 Jul 2020
c4
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK