Lux Smith
Posts: 0
Joined: Fri Jan 10, 2014 4:52 am

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

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.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

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

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

Lux Smith
Posts: 0
Joined: Fri Jan 10, 2014 4:52 am

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

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

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

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

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

Lux Smith
Posts: 0
Joined: Fri Jan 10, 2014 4:52 am

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

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?

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

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

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.

Return to “Issues”