.NET Editor with Select2

.NET Editor with Select2

tdktdk Posts: 32Questions: 16Answers: 0

The example project does not contain any examples when using the Select2 plugin.
Whist I can get the DDL populated in initial popup load it will not pre-populate the DDL with previously saved values.
I have looked at the initialValue property but that returns an escaped values (?initialValue=true&value="Supplier") when passed to the MVC controller.
It all seems overly completed to do such a simple task.

Answers

  • allanallan Posts: 61,451Questions: 1Answers: 10,055 Site admin

    Agreed. We need to effectively build select2 or similar into Editor in future - trying to twist a third party plug-in is proving to be difficult for both developers such as yourself and a significant support burden for us.

    I have looked at the initialValue property but that returns an escaped values (?initialValue=true&value="Supplier"

    You can have the plug-in send JSON values by adding:

    urlDataType === 'json'
    

    into your field's configuration.

    Allan

  • tdktdk Posts: 32Questions: 16Answers: 0

    urlDataType === 'json'

    That's a little vague, where?

  • tdktdk Posts: 32Questions: 16Answers: 0

    OK I got it sort of working but...
    1. the previously saved item is not selected but it is in the list
    2. there are no other items loaded so you can't select anything else

    This whole experience is not good Allan, just seems so flakey!

  • allanallan Posts: 61,451Questions: 1Answers: 10,055 Site admin

    I fully agree - our integration with Select2 leaves a lot to desire, which is why it isn't part of the core software. I don't know why it would be causing the issues you are seeing though, those aren't familiar to me from other feedback discussions. Can you give me a link to a page showing the issue so I can attempt to debug it and improve the plug-in please?

    Allan

This discussion has been closed.