Page 1 of 1

Getting an exception when using a radio button group in a list item

Posted: Wed Feb 19, 2014 8:50 pm
by Lux Smith

I am using a radio button group within a list item in a list that is being populated from a database service. When I place the radio button group in the list item and run the service I get the error in the console

Uncaught TypeError: Object [object Object] has no method 'enhanceWithin'

When I remove the radio button group, it works fine. There is no logic in the mapping.


Getting an exception when using a radio button group in a list item

Posted: Wed Feb 19, 2014 9:34 pm
by Maryna Brodina

Hello! Unfortunately it's a bug. We'll fix it, sorry for inconvenience.


Getting an exception when using a radio button group in a list item

Posted: Wed Feb 19, 2014 9:41 pm
by Lux Smith

Thanks for the reply. Any workaround or suggestions in the mean time?


Getting an exception when using a radio button group in a list item

Posted: Wed Feb 19, 2014 9:50 pm
by Maryna Brodina

The only one way is do not add radio button group on screen, but add using JS in mapping.


Getting an exception when using a radio button group in a list item

Posted: Sat Mar 15, 2014 5:11 pm
by Lux Smith

The checkbox group is located in a grid cell and mapped to a database service that returns a collection of records. How do I get a handle on the grid cell in JS that is dynamically created based on the service mapping so that i can insert the checkbox using JS?


Getting an exception when using a radio button group in a list item

Posted: Sun Mar 16, 2014 11:58 pm
by Alena Prykhodko

Hi Lux.

You have a list of grid(populated by datasource).
To place list of radio buttons inside each of grid item:

  1. Select container cell which contains radiobuttons, rename it to "cell_radioContainer".

  2. Go to the mapping.

  3. Find the link "$-mobilegrind..." and click "Add JS".

  4. Place the following code inside js editor:

    pre
    //Find container to append new radiobuttons inside the item.
    var radioContainer = jQuery(element).find("[name='cell_radioContainer']");

    for(var i = 0; i < 3; i++){
    var radioItemText = '';

    var radioItem = jQuery(radioItemText);

    &#47;&#47;Append new radioButton inside the radiobutton container&#46;
    radioContainer&#46;append(radioItem);
    };/pre

    Note: This code generates a simple radiobutton list. If you want to generate jqm-like radiolist you should change html code inside "radioItemText" variable.