Hi, Poornima.

 

It's considered bad etiquette to post to this group with unrevealing
subjects such as "Help me". In the future, you should use a subject such
as "Problem using labelFunction on DataGridColumn" which will help
readers quickly determine whether they might know the answer. Many
people on this list won't even look at a "Help me" post.

 

- Gordon

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of poorni_agile
Sent: Monday, August 04, 2008 4:27 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Help me

 

Hi
Iam having some doubts with datagrid. My datagrid values are not
changing if iam using LabelFunction attribute in datagrid column. How
to solve this issue. Iam requesting you to give me ideas how can i
resolve this issue.

My Code:
<mx:Form id="editForm" label="View and Edit XML Rules">
<mx:HBox>
<mx:FormItem label="Rule DocType:"
fontWeight="bold">
<mx:TextInput id="doctype" width="280"
fontWeight="normal" editable="false" />
</mx:FormItem>
<mx:FormItem label="Target:" fontWeight="bold">
<mx:ComboBox id="target"
dataProvider="{targ}" width="150" fontWeight="normal"/>
</mx:FormItem>
</mx:HBox>
<mx:FormItem label="Rule Handler:" fontWeight="bold">
<mx:TextInput id="handler" width="280"
fontWeight="normal" editable="false" styleName="wrapme"/>
</mx:FormItem>

<mx:FormItem label="Stylesheet:" fontWeight="bold">
<mx:TextInput id="stylesheet" width="280"
fontWeight="normal" editable="false"/>
</mx:FormItem>

<mx:FormItem label="IdLocations:" fontWeight="bold"/>
<mx:DataGrid id="dgrid" dataProvider="{b}"
width="600" rowCount="5" editable="false" wordWrap="true">
<mx:columns>
<mx:DataGridColumn
headerText="IDLocation Description" dataField="@description"
width="150" editorDataField="text"/>
<mx:DataGridColumn
headerText="IDLocation Path" dataField="@path" editorDataField="text"/>
<mx:DataGridColumn
headerText="Column-Index" dataField="@column-index" width="70"/>
<mx:DataGridColumn
headerText="Separator Used" dataField="@separator" width="70"/>
</mx:columns>
</mx:DataGrid>

<mx:FormItem label="Special Cases:"
fontWeight="bold"/>
<mx:DataGrid id="dgrid1" dataProvider="{c}"
width="600" rowCount="5" editable="false">
<mx:columns>
<mx:DataGridColumn
headerText="Priority" dataField="@priority" width="50"
editorDataField="text"/>
<mx:DataGridColumn
headerText="Test" dataField="@test"/>
<mx:DataGridColumn
headerText="Handler" dataField="@handler"/>

----> <mx:DataGridColumn
headerText="SpecialCaseStylesheet Name" labelFunction="displayName"/>
----> <mx:DataGridColumn
headerText="SpecialCaseTarget Destination"
labelFunction="displayDestination"/>

</mx:columns>
</mx:DataGrid>
<mx:HBox> 
<mx:Button id="edit" label="Edit Rule"
click="editRule()"/> 
<mx:Button id="save" label="Save Rule"
click="saveRule()"/>
</mx:HBox>
<mx:TextArea id="xmlObj" text="{externalXML}"
visible="false"/>


</mx:Form> 

In the above code i pointed two lines with arrow mark ---> for those
two lines column is not changing.
Even if i change something in that column and once again get focus out
of that column then once again the previous data is only coming what
ever i wrote was vanishing.
What is the problem when iam using labelFunction attribute.

Thanks in advance,
Poornima.

 

Reply via email to