Matrix of Radio buttons on Datagrid please help!

Hi,
    Anyone help me walk through this, I have a Datagrid object which uses radio button as item renderer.
To be more specific this is a matrix of radio buttons on datagrid. The datagid columns are dynamically generated depending on the number of items i have in my database record, (e.g could be 10, 20, and so on...). The rendering of items goes well. Now my question would be how am I able to group the radio button in my datagrid "per column or per row"? since it appears to me that groupName is not working if applied on the item renderer. I also set the a radio button group on the item renderer parent document but it sets all the button to only one group.
Any hints, and ideas how am I able to accomplish this? Please help this novice trying to wrap himself in flex.
Thanks!
Best Regards

try this.
<mx:RadioButtonGroup id="groupA"/>
<mx:RadioButtonGroup id="groupB"/>
<mx:DataGrid>
     <mx:dataProvider>
          <mx:Object Group="A" Price="11.99" groupName="groupA"/>
          <mx:Object Group="B" Price="11.99"  groupName="groupB"/>
          <mx:Object Group="A" Price="11.99" groupName="groupA"/>
          <mx:Object Group="B" Price="11.99"  groupName="groupB"/>
          <mx:Object Group="A" Price="11.99" groupName="groupA"/>
          <mx:Object Group="B" Price="11.99"  groupName="groupB"/>
          <mx:Object Group="A" Price="11.99" groupName="groupA"/>
          <mx:Object Group="B" Price="11.99"  groupName="groupB"/>
     </mx:dataProvider>
     <mx:columns>
          <mx:DataGridColumn dataField="Group">
               <mx:itemRenderer>
                    <mx:Component>
                         <mx:RadioButton groupName="{data.groupName}" label="{data.Group}"/>
                    </mx:Component>
               </mx:itemRenderer>
          </mx:DataGridColumn>
          <mx:DataGridColumn dataField="Price"/>
     </mx:columns>
</mx:DataGrid>
You may want to set the groupName dynamically in your data provider.

Similar Messages

  • Radio button with javascript - - Please HeLP !

    Hi,
    I have the following code
    My question is:-
    Q : Clicking on Submit button. gives a javascript
    message "Please make a selection" even though when I selected a radio button
         I have haspmap which displays possible answers to a question in a radiobutton type. When submit is prssed, I like to check whether a selection is made or not. and if not, I want a message shown. And when selected. I want page to prcede to processSurveyInfo.do
    Please help
    <script language="javascript">
    function checkRBtn()
         var name = document.forms[getNetuiTagName("studentmultpChcform", this)][getNetuiTagName("rbtn", this)].value;
         if ((name==null) || (name=="Undefined")) {
         alert("Please make a selection");}
         else {
         document.forms[getNetuiTagName("studentmultpChcform", this)].method="POST";
         document.forms[getNetuiTagName('studentmultpChcform', this)].action="<netui:rewriteURL URL="/TrainingActivity/Administration/SurveyFile/processSurveyInfo.do" />";
         document.forms[getNetuiTagName("studentmultpChcform", this)].submit(); }
    </script>
    <table align="center">
    <tr>
    <td>
    <netui:button value="Next-->" type="submit" styleClass="commonButtons" onClick="checkRBtn(); return false;" tagId="nq"/> </td>
    <td>
    <netui:button value="Finish" tagId="finbtn" action="fwdfinish"/> </td>
    </tr>
    </table>
    <table align="center">
    <tr>
    <td>
    <netui:button value="Next-->" type="submit" styleClass="commonButtons" onClick="checkRBtn(); return false;" tagId="nq"/> </td>
    <td>
    <netui:button value="Finish" tagId="finbtn" action="fwdfinish"/> </td>
    </tr>
    </table>
    please help me out.
    Thanks
    -Raza-

    You need to write a custom script and it's location will depend upon when you want the script to execute.
    Radio Buttons and Check Boxes have a string value of "Off" when none have been selected and take the value assigned to the field when checked.

  • My iphone 4s will not allow me to open any apps that I have downloaded. I have tried a few things but still will not allow me to open. Shows they are open once pushing the home button twice. Please help!

    My iphone 4s will not allow me to open applcations that I have downloaded. I have tried a few things but still will not allow me to open. Shows they are open once pushing the home button twice. Please help!

    Pressing the Home button twice does not show you what apps are running. It shows you what apps were recently used.
    Download a free app from the App Store. Once it downloads, your other apps should work properly again.

  • My iPod touch is permanently disabled and it says to connect my iPod to my iTunes yet when I do that, it tells me to type in pass code even though it's still disabled. i cant go to DFU mode cause my home button is broken PLEASE HELP ME GOD I MISS MY IPOD

    My iPod touch is permanently disabled and it says to connect my iPod to my iTunes yet when I do that, it tells me to type in pass code even though it's still disabled. i cant go to DFU mode cause my home button is broken PLEASE HELP ME GOD I MISS MY IPOD TOUCH PLEASE :'((

    i cant do that sir ,my ipod touch 4g keeps rebooting and rebooting all over again until the battery is empty HELP GUYS PLEASE

  • My ipod touch 5th gen. 16gb ios 8.1.2 wont turn on, i press the power button and nothing happens, and my home button doesnt work, PLEASE HELP ME OUT!!!

    My ipod touch 5th gen. 16gb ios 8.1.2 wont turn on, i press the power button and nothing happens, and my home button doesnt work, PLEASE HELP ME OUT!!!

    Try:                                               
    - iOS: Not responding or does not turn on           
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try another cable                     
    - Try on another computer                                                       
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar                                     

  • My iPhone 4 wont turn on, It wont go passed the charging icon and then when I take the charger out it says it needs charge. Its not the charger as iv tried several and holding lock and home button doesnt work please help!!!!!

    My iPhone 4 wont turn on, It wont go passed the charging icon and then when I take the charger out it says it needs charge. Its not the charger as iv tried several and holding lock and home button doesnt work please help!!!!!

    Hello there, Conorjl7.
    The following Knowledge Base article provides some good, practical steps for troubleshooting issues with charging:
    iPhone and iPod touch: Charging the battery
    http://support.apple.com/kb/HT1476
    Particularly:
    If your battery doesn't charge, or if your device shows a low-battery image, black screen, or "accessory not supported" alert, follow these steps.
    Inspect the connector at the bottom of the phone:
    Make sure that there are no bent pins in the connector.
    Make sure that the connector is free from debris.
    If there are bent pins or debris, please contact Apple Support.
    Otherwise, continue troubleshooting.
    Make sure that the outlet you're using works.
    Make sure that the Apple USB cable and Apple USB power adapter work.
    Plug the device in to power and let it charge for up to 30 minutes. If you don't have an Apple USB power adapter, try connecting to a computer's high-power USB 2.0 port (not a keyboard). The computer must be on.
    If the device still exhibits an issue, try turning your device off and then on again while connected to power.
    If the issue is persists, please contact Apple Support.
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

  • Radio Buttons in DataGrid

    I am hoping someone can assist me asap, as I need to get
    something that works for a prototype I am creating. I am not a Flex
    developer but a designer, so my AS skills are very minimal. Anyway,
    I need to set up a datagrid so that the first column contains radio
    buttons with the top radio button selected upon load of that
    screen. I was able to find something online that was close, but I
    cannot seem to figure out how to change the selected radio button
    from the second row to the first row. VERY frustrating. Here is the
    url of the site that has the code I have been trying. If someone
    has a better solution, please let me know.
    http://carballares.es/arcadio/wp-content/uploads/2009/01/RadioButtonItemRenderer/srcview/i ndex.html
    All I need is first column of a datagrid with radio buttons
    and top row shows selected radio button on load of screen.
    Thanks!

    By the way, I forgot to mention I already tried the obvious
    of changing:
    private var items:ArrayCollection=new ArrayCollection([
    {dataField:'active', active:false, name:'Row 1'},
    {dataField:'active', active:true, name:'Row 2'},
    {dataField:'active', active:false, name:'Row 3'}
    to this:
    private var items:ArrayCollection=new ArrayCollection([
    {dataField:'active', active:true, name:'Row 1'},
    {dataField:'active', active:false, name:'Row 2'},
    {dataField:'active', active:false, name:'Row 3'}
    This did NOT work.

  • How to use checkboxes instead of radio button in datagrid

    I have a datagrid. I have two checkboxes in datagrid.That checkboxes should act like radio button.ie we can select only one checkbox at a time. If we select second checkbox,then the first selected checkbox should deselected.How to handle this scenario.Please give some code samples.
    Thanks & Regards
    kvpdy

    You could do that, but it will be a lot easier doing it from the data model. This way you don't have to modify the behavior of the chart, it just blindly renders the data given to it. Behind the scenes you're dealing with boolean values, so it's pretty easy to write setters accomplish this.
    public function set myAttribute(value:Boolean):void
         setAttributesTiedTogetherToFalse();
         _attrib = value;

  • Blackberry buttons not working, Please help!

    I was using my blackberry and all of a sudden the trackpad started have a slow reaction time. THen when i went to hit the button to select it wouldn't. Now if i press the talk key the letter jk come up, if i hit the blackberry button the letters ij come up, whenever i hit the trackpad the letter hi come up and whenever i got the end call button the letters mn come up. I can't do anything on my phone because of it. The rest of the keyboard works, does anyone know how to fix this?  Please Help!

    KailaWoods wrote:
    When i said i checked, i meant i checked the moisture indicators, they're all totally white, no pink or red at all.
    Ahhh...OK...so one of the  ~6 possibilities. Thanks for the clarification. However, it's been known for moisture damage to cause exactly your symptoms with no change in the indicators. I'm not saying this is the cause...it's just one of many possible causes. So you still have some work to do in order to figure it out.
    Good luck!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Hp DV6 TouchPad Lock Button Not Working Please Help.?

    I just bought my hp dv6 6c4se entertainment notebook. but the touchpad on and off button is not working.please help.yes there is a little white sqaure in the left up corner of the touchpad.but it doesnt work.please help somebody

    Try a Hard Reset to gently "kick" that TouchPad back into operation.
    HP Notebook PCs - Use a Forced Reset to Resolve Hardware and Software Issues on Notebook with a Seal...
    Removable Battery:
    HP Notebook PCs - Use Hard Reset to Resolve Hardware and Software Issues
    Kind Regards,
    Dragon-Fur

  • Simple "show / hide" script using radio buttons, need a little help

    Hello;
    I have a place in my form where I need to swap out what type of form you need to fill out in an area. If I don't do this, it makes the page look over crowded and if I pass it off to a 2 or 3 step process, it doesn't have enough info in each section to be worth it. It's either one or the other.
    Right now, this code works nice. click on a radio button, and the form section appears and disappears. What I am trying to make this do it when the page loads, one of the radio buttons is selected and one of the form sections is visible. Then if you click on the other radio button, it swaps them.
    can anyone help me tweek this code so one of the buttons is selected all the time?
    here is my script.
    <style type="text/css">
    .showHide {
    position: absolute;
    background-color: #f1f1f1;
    width: 350px;
    padding: 1px;
    color: black;
    border: #999999 2px dashed;
    display: none;
    </style>
    <script language="JavaScript">
    function setVisibility(id, visibility) {
    document.getElementById(id).style.display = visibility;
    </script>
    <form>
    <input name=type type=radio onclick="setVisibility('sub3', 'inline');setVisibility('sub4','none');" value='male' checked>Selection 1
    <input type=radio name=type value='female' onclick="setVisibility('sub3', 'none');setVisibility('sub4','inline');";>Selection 2
    <div id="sub3" class="showHide">Selection 1 content</div>
    <div id="sub4" class="showHide">Selection 2 content</div>
    </form>
    That's the short of it with out dumping tons of other code on anyone.
    Thank you

    That's what I need. I tweeked it a little and now it doesn't work. Can
    you help me add one last option? I need 3 buttons that intereact leaving the red one still visible when it loads unless you click on
    one of the others. this is what I'm trying to do:
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function() {
    $('#divGrey').hide();
    $('#divRed').show();
    $('#divBlue').hide();
    $('.grey').click(function(){
    //$(this).hide();
    $('#divGrey').show();
    $('#divRed').hide();
    $('#divBlue').hide();
    $('.red').click(function(){
    //$(this).hide();
    $('#divGrey').hide();
    $('#divRed').show();
    $('#divBlue').hide();
    $('.blue').click(function(){
    //$(this).hide();
    $('#divGrey').hide();
    $('#divRed').hide();
    $('#divBlue').show();
    </script>
    <style type="text/css">
    #divGrey {
    position: absolute;
    background-color: #f1f1f1;
    width: 350px;
    padding: 1px;
    color: black;
    border: #999999 2px dashed;
    display: none;
    #divRed {
    position: absolute;
    background-color: #f1f1f1;
    width: 350px;
    padding: 1px;
    color: black;
    border: #999999 2px dashed;
    display: none;
    #divBlue {
    position: absolute;
    background-color: #f1f1f1;
    width: 350px;
    padding: 1px;
    color: black;
    border: #999999 2px dashed;
    display: none;
    </style>
    <input type="radio" name="Radio1"  value="" id="RadioGroup1_1" checked="checked"  />Selection 1
    <input type="radio" name="Radio1"  value="checked" id="RadioGroup1_0" />Selection 2
    <input type="radio" name="Radio1"  value="checked" id="RadioGroup1_2" />Selection 3
    <div id="divRed">Selection 1 content</div>
    <div id="divGrey">Selection 2 content</div>
    <div id="divBlue">Selection 3 content</div>
    it isn't doing anything right now, and no errors either that I can see. Any ideas?

  • My iPhone 5s not showing radio in music application please help

    I have this problem for many month now please help me solve this problem

    What country are you in?
    iTunes Radio is currently only available in the US and Australia

  • My iphone 5 wont turn on, i tried charging..but no response... my lock button is broken.. so i cant do the lock and home button thingy..please help :(

    my iphone 5 wont turn on, i tried charging..but no response... my lock button is broken.. so i cant do the lock and home button thingy..please help

    Hi laurenwatt2014,
    Thanks for visiting Apple Support Communities.
    It sounds like your iPhone is in need of service. I recommend using this link to find out more about having your iPhone evaluated:
    http://www.apple.com/support/iphone/repair/
    Best Regards,
    Jeremy

  • Lenovo Care button not working please help!

    hello everyone. i upgraded my Lenovo 3000 N200 0769-B9G from windows vista home basic to windows 7 ultimate recently. everything works fine but the lenovo care button is not working. While installing windows 7, it gave a warning saying "lenovo care manager" might not work properly... etc... is there a driver i have to install to fix this? any help would be appreciated. 

    You have to reinstall Rescue and Recovery. Go here to download: http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-4Q2QAK
    Bill

  • Flash button problem! please help!

    hello-
    I haven't used flash to create a website for a while and I am feeling really lost. I have looked through countless forums and such and tried all sorts of things but nothing seems to be working. Basically- I have a set of 6 soon to be buttons and two movie clips. I want each of the buttons to trigger a certain part of both movie clips to play as well as going to a web page. There is also a little character at the bottom that I want to play part of a movie clip when clicked. (I'm sorry if this sounds really jumbled). I have figured out multiple ways so that when I click the little character it will play the clip-I placed the action to do this in the main timeline. However the action that plays this little movie clip plays it no matter what I click on. How do I make sure that only a certain thing I click on plays the action?
    I'm not sure if I am placing the actions in the correct part of the timeline or what I am doing wrong. I am having trouble finding information on how to keep the actions separate.
    I also want the first 10 or so frames of one of the movie clips to loop continuously except when another part of the clip plays.
    each of the buttons is on a separate layer in the main timeline as are each of the movie clips.
    if you think that you can help I can send the flash file.
    I am very new to any action scripting- and appreciate the help!

    A mouseDown event is a molouse related event, not an interactioon event with an object, so anytime you press down anywhere with the molouse it will trigger.
    Give your buttons/movieclips iinstance names (via the properties panel), and then assign event handling functionaliuty to them.  Let's say you name one of them "btn1"...
    stop();
    _root.frogdance.stop();
    btn1.onRelease = function() {
    _root.frogdance.play(4);

Maybe you are looking for

  • Error when posting IDoc *** in system ERP100

    Hi Experts! Can you pls help me with a goods receipt issue? When user tries to make a good receipt on a PO, we have the msg "Error when posting IDoc *** in system ERP100" in SRM front-end application monitor. The same msg is getting displayed in RZ20

  • Flash Content Deleted on Each Publish (svViewer) iWeb '11

    Hey everyone, hope you can help me out. So I have built an iWeb site for my wife's side business. There are lot of photos that I must show for each product she sells. The best way I found to do this and helps give the site a little "life" is to use s

  • Prevent shadow system in SUM

    Hello I have installed a new PI 7.4 system (SR 1) and now I'm updating it from SP 5 to the newest, SP 7 (both java and ABAP stacks) I'm using SUM 1 SP 10 patch 8, which is the newest SUM version. Is there any way to prevent SUM from creating a shadow

  • Jdic browser help

    Hello, I used jdic to embed internet explorer in a java application. I have a textfield and when the user inputs the website he wishes to visit, the jdic does the work and displays the site. My problem is that I dont know how to update the textfield

  • Change UNIX file permitions using ABAP

    Hello, I create a file using the open and close dataset statements and the file has the following permitions: -rw-rw---- Now i whant to send the file using FTP to another server, but function module FTP_COPY return the error: Permission denied Is tha