Solved

how to refresh a DataGrid

Posted on 2009-04-14
3
4,962 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 500 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

Industry Leaders: 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

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

724 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