ValuesToJsonArray from MultiCombo issue

  1. #1

    ValuesToJsonArray from MultiCombo issue

    I just upgraded from 1.3 to 2.0 and I'm able to get through most of the issues via your change notes and other threads but I can't find anything about this one. I am grabbing the values from a MultiCombo and putting them into a string before storing them. What I previously did was this:

    string mentorAreas = mcMentorAreas.SelectedItems.ValuesToJsonArray().To String();

    But now I am getting the following error:

    Error 324 'Ext.Net.ListItemCollection' does not contain a definition for 'ValuesToJsonArray' and no extension method 'ValuesToJsonArray' accepting a first argument of type 'Ext.Net.ListItemCollection' could be found (are you missing a using directive or an assembly reference?)

    Is there a new way to handle this? How can I grab all the values from a MultiCombo and store them in a string?
  2. #2
    Hi @zfreeman,

    Apologize for the long delay.

    Please follow:
    http://forums.ext.net/showthread.php...l=1#post100947
  3. #3
    Thanks Danil!

    Just to be clear, I would just add the method you wrote out into my code and then where I used to do this:
    string mentorAreas = mcMentorAreas.SelectedItems.ValuesToJsonArray().To String();
    I would now do this:
    string mentorAreas = ValuesToJsonArray(mcMentorAreas.SelectedItems);
  4. #4
    Yes, that is correct.
  5. #5
    Finally, we have added the following breaking change item.

    158. The type of the ComboBoxBase's and MultiSelectBase's SelectedItems property has been changed to the ListItemCollection class.

    There is no ToJsonArray method in the ListItemCollection class. Use this code if needed.
    JSON.Serialize(ComboBox1.SelectedItems);
    There are also no IndexesToJsonArray and ValuesToJsonArray methods.

    You can implement them yourself, they are simple. Here is an example of ValuesToJsonArray implementation.
    http://forums.ext.net/showthread.php...l=1#post100947
    Thank you for the question.

Similar Threads

  1. [CLOSED] JSON deserialisation issue with multicombo boxes.
    By machinableed in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Jun 01, 2012, 10:54 AM
  2. [CLOSED] MultiCombo Example Issue
    By cwolcott in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Mar 22, 2012, 2:38 PM
  3. [CLOSED] Radio button group issue with MultiCombo.
    By rnachman in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Dec 22, 2011, 2:23 PM
  4. selected value in MultiCombo
    By difa in forum 1.x Help
    Replies: 1
    Last Post: Dec 08, 2011, 1:30 PM
  5. Coolite.ext.web is having multicombo
    By Nagaraju in forum 1.x Help
    Replies: 1
    Last Post: Sep 23, 2011, 11:48 AM

Tags for this Thread

Posting Permissions