Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • bigdiddy 2 posts 72 karma points
    Oct 04, 2015 @ 12:00
    bigdiddy
    0

    Custom grid editor with properties

    Hello umbraco community,

    I have an understanding problem to create a custom grid with properties, how it works? :D Ok, i have read this tutorial to create custom grid editor

    https://our.umbraco.org/documentation/getting-started/backoffice/property-editors/built-in-property-editors/grid-layout/build-your-own-editor

    with that tutorial it wasn´t really hard to add a new editor, but I cannot find a way to add properties to it (right panel) like a content picker or a custom editor also there is no setting button by default.

    enter image description here

    I have found solutions to open a config panel with javascript, is it actually the only one solution?

    P.S. have found LeBlender but wanna understand it and do it on my own ;-)

  • Lars-Erik Aabech 349 posts 1100 karma points MVP 7x c-trib
    Oct 05, 2015 @ 05:14
    Lars-Erik Aabech
    0

    As far as I know, you have to do the config yourself.

    I'd start by having a look at the dialogService available in Umbraco. It's fairly well documented over here.
    Just pop a dialog with your own view and controller that returns values to your grid property controller.

    Here's a quick sample from the doc:

    var dialog = dialogService.open({template: 'path/to/page.html', show:true, callback: done});
    functon done(data){
      //The dialog has been submitted 
      //data contains whatever the dialog has selected / attached
    }     
    
  • bigdiddy 2 posts 72 karma points
    Oct 05, 2015 @ 17:07
    bigdiddy
    0

    thanks, good to know that there is actually no configuration for it. I´ll try it with dialogService, thanks for help

  • Rune Hem Strand 147 posts 911 karma points hq c-trib
    Oct 07, 2015 @ 05:49
    Rune Hem Strand
    0

    Yup, if you want to add properties/settings to a custom editor using the right pane, the dialog service is the way to go.

    A thing to consider is that the settings button you are referring to is actually used for cell settings and styles (configured on the grid datatype) and not for settings on the editor it self. Ie. to configure cell background-color, class and so forth.

    If you take the media editor for example, you click on the editor itself to open the right pane and add an image from there.

    All the best Rune

Please Sign in or register to post replies

Write your reply to:

Draft