Solved

setting value in flex datagrid position

Posted on 2011-09-08
9
411 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
Comment Utility
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
Comment Utility
Sorry, miss typo use setItemAt
0
 

Author Comment

by:royjayd
Comment Utility
thanks

what is "colName" ?
0
 
LVL 29

Expert Comment

by:dgofman
Comment Utility
<mx:DataGridColumn dataField="???"
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 29

Expert Comment

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

Author Comment

by:royjayd
Comment Utility
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
Comment Utility
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
Comment Utility
got it.thanks
0
 

Author Comment

by:royjayd
Comment Utility
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

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…
This article will show you how to create an ISO CD-ROM/DVD-ROM image (*.iso), and MD5 checksum signature, for use with VMware vSphere Hypervisor 6.5 (ESXi 6.5). It's a good idea to compare checksums, because many installations fail because of a corr…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

744 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

16 Experts available now in Live!

Get 1:1 Help Now