Solved

setting value in flex datagrid position

Posted on 2011-09-08
9
417 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
  • 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
 
LVL 29

Expert Comment

by:dgofman
ID: 36503767
<mx:DataGridColumn dataField="???"
0
Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

 
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 500 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

Free camera licenses with purchase of My Cloud NAS

Milestone Arcus software is compatible with thousands of industry-leading cameras for added flexibility. Upon installation on your My Cloud NAS, you will receive two (2) camera licenses already enabled in the software. And for a limited time, get additional camera licenses FREE.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Move Page left/Right based on Gesture Swipe 7 1,249
Keep a player within a circular area 3 258
Port 4000 issue 1 1,909
Indesign Data Merge 1 179
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 2017, ransomware will become so virulent and widespread that if you aren’t a victim yourself, you will know someone who is.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.

929 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now