[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 451
  • Last Modified:

setting value in flex datagrid position

hi guys
I have a simple requirment
In the datagrid 9th row and 9th column i need to set a data.
I am doing this

int myRow = 9;
int myCol = 9;
datagrid.dataProvider.getItemAt(myRow)[myCol] = 'jr45444';

Doesnt seem to work.
Any idea?

thanks
0
royjayd
Asked:
royjayd
  • 5
  • 4
1 Solution
 
dgofmanCommented:
You need to split oppression by 3 steps

car dataField:String = "colName";
var item:Object = datagrid.dataProvider.getItemAt(myRow);
item[dataField] = "jr45444";
datagrid.dataProvider.setItem(item, myRow);
0
 
dgofmanCommented:
Sorry, miss typo use setItemAt
0
 
royjaydAuthor Commented:
thanks

what is "colName" ?
0
Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

 
dgofmanCommented:
<mx:DataGridColumn dataField="???"
0
 
dgofmanCommented:
colName - should be assign to dataField what are you using for column 9
0
 
royjaydAuthor Commented:
when i use setItemAt
var item:Object = datagrid.dataProvider.setItemAt(myRow);
 
i get
Argument count mismatch on mx.collections::ListCollectionView/setItemAt(). Expected 2, got 1.

thanks
0
 
dgofmanCommented:
Did you see my posts:

var item:Object = datagrid.dataProvider.getItemAt(myRow);
item[dataField] = "jr45444";
datagrid.dataProvider.setItem(item, myRow);
then
Sorry, miss typo use setItemAt

So you should use

datagrid.dataProvider.setItemAt (item, myRow);
0
 
royjaydAuthor Commented:
got it.thanks
0
 
royjaydAuthor Commented:
0

Featured Post

Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now