Skip navigation
Venkatesan Balasubramanian
Currently Being Moderated

How to pass values from text input field to particular column of datagrid in FLEX?

Dec 26, 2012 1:48 AM

Tags: #flex

Hi friends,

 

I am struck in one place when i work with datagrid.i am doing Adobe Air application.my requirement is :

 

I have a advance datagrid with 3 columns S.no  labelName and  Text field values, in that S.no and label name i gave as hotcode by array.but i dont know how to give textinput values to a particular column.

 

Ex:          S.No      label field           Textinput

 

                1              Name

  

 

                 2             Address

 

                  

                3               State

 

Here S.No and Label field column is hot code. my need is if i enter a name ,address and state and click save button means it have to show in Textinput column in datagrid.

 

How to do that.looking for useful suggession.

 

Cheers,

 

B.venkatesan.

 
Replies
  • Currently Being Moderated
    Dec 26, 2012 6:38 AM   in reply to Venkatesan Balasubramanian

    Hello,

     

    I'm not sure of understanding well but you can try this when the event 'textInput' is fired from your textInput Field :

     

    var rowIndex:int=0;

    var dataCollection:ArrayCollection = myDataGrid.dataProvider as ArrayCollection;

    dataCollection.setItemAt({no:rowIndex, label:dataCollection.source[rowIndex]['label'], textInput:myTxt.text}, rowIndex);

     

    Replace 'no:', 'label:' and 'textInput:' by your DatagridColumn's datafields.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points