in my flex application im using a datagrid which has three coloumns
first column is for checkbox as itemRenderer and
other two columns are editable.
my requirement is
now when i fetch some data from DB the datas will be populated in datagrid,
1.after populating datas, first column should be disabled in all rows
2.if i click second or third column in a row for editing.. the checkbox in first column corresponding row should be enabled and checkbox should be ready for check and uncheck..
how can i do this
here's my code
<mx:DataGrid x="46" y="135" dataProvider="{DetailsProvider}" width="836" height="349">
<mx:columns>
<mx:DataGridColumn headerText="Select" dataField="isSelect" itemRenderer="com.components.checkbox"/>
<mx:DataGridColumn headerText="First Name" dataField="fname"/>
<mx:DataGridColumn headerText="Second Name" dataField="sname"/></mx:columns></mx:DataGrid>
I hope this details is enough to understand my question
Any idea for this.. Thanks in advance..
Best Answer
I am providing you the sample code that i have created that uses ItemRenderer and ItemEditor both in a single DataGrid you just need to create a new mxml component that is name d ComNS and ComCB. Just create that i am givng you the sample code.
Code for main mxml Appication
Code for ComNS.mxml
Code for ComCB.mxml
If any query just comment on my answer....