0
votes

I have a datagrid in which a column s having cusomized itemRenderer(textflow on canvas). Now I want to perform find text operation on each cell's textflow. For that I able to do find text operation on a focused cell. But now my requirment is to find the the text in all.

Thanks in advance.

1
maybe a little more detail would help us answer the question. The title makes it sound like you want to know how to focus a cell, the text makes it sound like you want to find text in all cells. Can you clarify?Ryan Guill
Thanks. Actually I want to find text only within the datagrid. But I am asking for setting focus to a cell coz I am able to find text in the focused cell. So I asked to set cell focus.gaurav flex

1 Answers

1
votes

If you're using a custom itemRenderer, can you have the searchable text for it be derived from the data property? This way you can just set the dataProvider for the dataGrid and search that.

<mx:itemRenderer>
    <mx:Component>
        <ns1:customTextBox searchedText={data.searchedText} text={data.text}/>    
    </mx:Component>
</mx:itemRenderer>

Then you modify data.searchedText, which is linked to your dataProvider (remember to use an ArrayCollection so it will respond to dataChange events).