best way to get values is , just extends the DataGrid and use on submit
loop through over all item of dataprovider and access the each column
itemrendere using listItems property. As below
for(var i:int ; i < dataprovider length ; i++)
{
var itemRender:Object = listItems[i][CoulmIndex] as CustomCheckBox;
if(itemRender && itemRender is CustomCheckBox)
//Get checkbox value here
else if(itemRender && itemRender is CustomComboBox)
//Get ComboBox value here
}
On Tue, Jul 21, 2015 at 7:45 PM, kamcknig [via Apache Flex Users] <
[email protected]> wrote:
> I have a DataGrid set up like so:
>
> <mx:DataGrid id="ticketListDataGrid"
> dataProvider="{_ticketList}">
> <mx:columns>
> <mx:DataGridColumn width="220"
> dataField="@package_name"
> headerText="Package Name"
> sortable="false" />
>
> <mx:DataGridColumn width="166"
> dataField="@barcode"
> headerText="Ticket Barcode"
> sortable="false" />
>
> <mx:DataGridColumn width="100"
> headerText="Ticket Blocked"
> sortable="false"
> itemRenderer="foo.bar.CustomCheckBox" />
>
> <mx:DataGridColumn width="210"
> headerText="Reason"
> sortable="false"
> itemRenderer="foo.bar.CustomComboBox" />
> </mx:columns>
> </mx:DataGrid>
>
> On submit I'd like to read the values of each CustomCheckBox and
> CustomComboBox. What is the easiest way to get those values?
>
> Thanks!
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-flex-users.2333346.n4.nabble.com/Flex-Getting-values-from-custom-item-renderers-in-DataGridColumns-tp10831.html
> To unsubscribe from Apache Flex Users, click here
> <http://apache-flex-users.2333346.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1&code=cHJhc2hha3VtYXJAZ21haWwuY29tfDF8LTU0MTcyMzE2NA==>
> .
> NAML
> <http://apache-flex-users.2333346.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
--
*Regards,*
Prashant Kumar* | *Mob.: +91 8408811225
--
View this message in context:
http://apache-flex-users.2333346.n4.nabble.com/Flex-Getting-values-from-custom-item-renderers-in-DataGridColumns-tp10831p10833.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.