how to refresh a DataGrid

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

caherciveenAsked:
Who is Participating?
 
ChristoferDutzConnect With a Mentor Commented:
Have you tried the following command, it should run smoother.

toolGrid.invalidateList();

instead of:

toolGrid.dataProvider.refresh();
0
 
ChristoferDutzCommented:
What type is your dataprovider?
0
 
caherciveenAuthor Commented:
very nice fix!  works perfectly.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.