?
Solved

setting value in flex datagrid position

Posted on 2011-09-08
9
Medium Priority
?
435 Views
Last Modified: 2012-05-12
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
Comment
Question by:royjayd
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 29

Expert Comment

by:dgofman
ID: 36503688
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
 
LVL 29

Expert Comment

by:dgofman
ID: 36503692
Sorry, miss typo use setItemAt
0
 

Author Comment

by:royjayd
ID: 36503744
thanks

what is "colName" ?
0
Quiz: What Do These Organizations Have In Common?

Hint: Their teams ended up taking quizzes, too.

 
LVL 29

Expert Comment

by:dgofman
ID: 36503767
<mx:DataGridColumn dataField="???"
0
 
LVL 29

Expert Comment

by:dgofman
ID: 36503780
colName - should be assign to dataField what are you using for column 9
0
 

Author Comment

by:royjayd
ID: 36503791
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
 
LVL 29

Accepted Solution

by:
dgofman earned 2000 total points
ID: 36503845
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
 

Author Comment

by:royjayd
ID: 36504047
got it.thanks
0
 

Author Comment

by:royjayd
ID: 36504161
0

Featured Post

Cyber Threats to Small Businesses (Part 1)

This past May, Webroot surveyed more than 600 IT decision-makers at medium-sized companies to see how these small businesses perceived new threats facing their organizations.  Read what Webroot CISO, Gary Hayslip, has to say about the survey in part 1 of this 2-part blog series.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question