?
Solved

how to refresh a DataGrid

Posted on 2009-04-14
3
Medium Priority
?
5,017 Views
Last Modified: 2013-11-11
Hi, I am modifying the contents of a DataGrid cell with this line of code:

     toolGrid.dataProvider.getItemAt(row)[field] = tempValue;

However, the change is not displayed on the screen.  If I add a refresh line:

     toolGrid.dataProvider.getItemAt(row)[field] = tempValue;
     toolGrid.dataProvider.refresh();

...the change is reflected on the screen.  However, the modified row is moved from its original position to the top of the DataGrid, causing major confusion by the user.  From their perspective, the row they were editing has disappeared.

Is there a better way to change the contents of a cell and have it appear immediately with nothing else about the DataGrid changing?

thanks

Kevin

0
Comment
Question by:caherciveen
[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
  • 2
3 Comments
 
LVL 20

Expert Comment

by:ChristoferDutz
ID: 24138743
What type is your dataprovider?
0
 
LVL 20

Accepted Solution

by:
ChristoferDutz earned 2000 total points
ID: 24138853
Have you tried the following command, it should run smoother.

toolGrid.invalidateList();

instead of:

toolGrid.dataProvider.refresh();
0
 

Author Comment

by:caherciveen
ID: 24139747
very nice fix!  works perfectly.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
Suggested Courses

765 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