3

I am creating a custom Data Type for Umbraco.
It is a UserControl (.ascx file) derived from IUsercontrolDataEditor.
(It shows a grid that lists all the child nodes)

How do I make this control full-width?
ie. I want to hide the label, just like what you can do with RichTextEditor by unchecking 'Show Label'.

EDIT: Thanks for the answers :) Another way to do this is using AbstractDataEditor, but it is more complicated.

amelvin
  • 8,919
  • 4
  • 38
  • 59
Aximili
  • 28,626
  • 56
  • 157
  • 216
  • This question was asked when Umbraco 4 was the latest version - Umbraco 5 had been abandoned & Umbraco 6 was released the following year. – amelvin Apr 18 '18 at 07:50

3 Answers3

7

For Umbraco 7.x using an angularJs-controller for your custom datatype just change the property hideLabel of the inherited model on the scope:

    $scope.model.hideLabel = true;
Florian D.
  • 250
  • 3
  • 9
  • This question was asked when Umbraco 4 was the latest version - Umbraco 5 had been abandoned & Umbraco 6 was released the following year. – amelvin Apr 18 '18 at 07:50
1

The only way I know of is to use some javascript as in this forum post.

Douglas Ludlow
  • 10,754
  • 6
  • 30
  • 54
-1

This is a bit of a workaround but should be OK for an admin function (where Name is the label you want to suppress):

<script type="text/javascript">
    jQuery(document).ready(function () {
        $("div.propertyItemheader:contains('Name')").hide();
    });
</script>
amelvin
  • 8,919
  • 4
  • 38
  • 59