Model not getting to custom editor

6 posts, 0 answers
  1. Miguel
    Miguel avatar
    8 posts
    Member since:
    Oct 2013

    Posted 15 Apr Link to this post

    Hi!

    I made an editor template since I couldn't get the labels of the automatic editor to show up properly (they always show in lowercase, can't they pick up the DisplayName data annotation of the model?).

    The issue is that it seems the model object isn't getting into the editor. For example:

    If I edit a connector with the default automatic editor, I get a nice list for the "from/to" fields, with all the nodes in the diagram, which works perfectly. Now, if I want to replicate the same behaviour for my custom editor but I can't get them to show.

    How can I set up my editor template so it picks up the shapes in the diagram?

  2. Danail Vasilev
    Admin
    Danail Vasilev avatar
    1494 posts

    Posted 19 Apr Link to this post

    Hello Miguel,

    You can log an improvement about the casing of the connections editing in our uservoice portal. Regarding the custom editing could you please provide a runnable example where the issue is reproducible, so that we can investigate it further?

    Regards,
    Danail Vasilev
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Miguel
    Miguel avatar
    8 posts
    Member since:
    Oct 2013

    Posted 20 Apr Link to this post

    Eh I can give you the view, a complete example goes beyond a few hundred lines of code : /

    As I said, all you need to view the issue is to try to add a custom editor template to the connector and try to emulate the "from" and "to" drop down lists, like the ones from this example: http://demos.telerik.com/aspnet-mvc/diagram/editing

     As you can see, they get filled with the present shapes in the automatic editor, whereas I can't seem to be able to emulate the same behavior from a custom editor template.

    Also, say that in that custom editor I want to make changes to a nested object, how would I go about that? Say that I have a "Node" model that has a "Data" instance with miscellaneous fields inside it, how could I make an editor template that lets me edit the Data fields?

  5. Miguel
    Miguel avatar
    8 posts
    Member since:
    Oct 2013

    Posted 21 Apr Link to this post

    I've solved the nested object issue, turns out that like some other fields, if I dont set a default value for it, the editor template gets a null model object and can't do anything about it.
  6. Miguel
    Miguel avatar
    8 posts
    Member since:
    Oct 2013

    Posted 21 Apr in reply to Miguel Link to this post

    The issue with the connector remains though.
  7. Danail Vasilev
    Admin
    Danail Vasilev avatar
    1494 posts

    Posted 22 Apr Link to this post

    Hello Miguel,

    The file in the attachment is an empty file. Could you please try reattaching it?

    Regards,
    Danail Vasilev
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for ASP.NET MVC is VS 2017 Ready