Create a Designer-less control
Hello,
Is there a way for me to completely remove the "Edit" link from a control in design mode? I have a control which doesn't need a designer, so, removing that link would prevent confusion for the user. Does anyone have an idea on how to achieve this?
Thanks
No idea how to remove the 'Edit' link from the control container of the page editor, but what I tend to do with controls I don't want users to mess with, is do a 'if in admin-mode' type test, and if true, render a line of red text that basically says - don't mess with this control.
Here is a little jQuery snippet that'll take care of it:
$(
'.rdTitleBar:first-child:contains("MyWidget1")'
).each(
function
()
$(
this
).find(
'.rdCommands'
).find(
'.rdMoreCommand'
).attr(
'style'
,
'border: 0px !important'
).end().find(
'a[title="Edit"]'
).parent().hide();
);
That's great Tim, as soon as MB replied I thought "Hmm, I could do this with jquery", but then didn't get a chance to actually try it out. Thanks for your help!