How i can restrict the deletion of row in dialog child table

here how i can hide r restrict the delete and delete all buttons.

Can you share the code ?

If you want to hide delete or delete all button
try this

thanks for sharing but doesnt work…

in a dialog how we can restrict those things

need to bulid…

You can add frappe.user.has_role(“Blablabla”)

add in the function delete and delete all button

i m trying these buttons…

Thanks fa sharing but not worked

Try this in your Dialog child table declaration

fieldname: “trans_items”,
fieldtype: “Table”,
label: “Items”,
cannot_add_rows: 1,
cannot_delete_rows : 1,
in_place_edit: false,
reqd: 1,
read_only: 1,
get_data: () => {
fields: fields

Thanks for sharing this sammer,
We can use this for custom dialog

yes u can