Hide Ribbon Button programmtically(TRim)
Add Dll "Microsoft.Web.CommandUI"
Find the Ribbon Button Id by
( C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\GLOBAL\XML\ CMDUI)
Page load add this line
SPRibbon current = SPRibbon.GetCurrent(this.Page);
current.TrimById("Ribbon.ListItem.Manage.Delete");
deploy it
this will hide the Ribbon button of Listitem delete button.
if u again want that control means just uncommand it and deploy it
Add Dll "Microsoft.Web.CommandUI"
Find the Ribbon Button Id by
( C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\GLOBAL\XML\ CMDUI)
Page load add this line
SPRibbon current = SPRibbon.GetCurrent(this.Page);
current.TrimById("Ribbon.ListItem.Manage.Delete");
deploy it
this will hide the Ribbon button of Listitem delete button.
if u again want that control means just uncommand it and deploy it