1 Reply Latest reply on Feb 11, 2007 9:59 PM by theLoggerGuy

    How to find out the radioButtonGroup name in a function

    Mark.P.
      I have to sets of radioButtons each with their own unique groupName. I have function that needs just a little tweaking depending on what group is selected. In order to not write the same function twice I'd to change it depending on what group is being clicked. But I can't figure out how to get that information. Here's what I have so far....

      the trace for groupName is what doesn't work.

      Thanks

      public function filterByBLine(evt:ItemClickEvent):void {
      trace (evt.item.groupName);
      if (evt.currentTarget.selectedValue == "All"){
      projectArray.filterFunction = null;
      projectArray.refresh();
      } else {
      projectArray.filterFunction = DGFilter;
      projectArray.refresh();
      }
      }

      <mx:RadioButtonGroup id="businessLineRB" itemClick="filterByBLine(event)"/>
      <mx:RadioButtonGroup id="sponsorRB" itemClick="filterByBLine(event)"/>