Solved

how to refresh a DataGrid

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
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.

746 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

8 Experts available now in Live!

Get 1:1 Help Now