This is a migrated thread and some comments may be shown as answers.

Update Cell Text/value

2 Answers 230 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Xavier Soares
Top achievements
Rank 2
Xavier Soares asked on 23 Oct 2008, 06:39 PM
Hello,

I'm using a button to update a cell value that is in a radgrid. Some times all the cell values of a certain column.

I'm using the following code:

 

RGFiles.Rows(0).Cells(1).Value = RGProposals.CurrentRow.Cells(2).Value.ToString() & _

 

 

"_" & RGProposals.CurrentRow.Cells(3).Value.ToString() & _

 

 

"R" & RGProposals.CurrentRow.Cells(4).Value.ToString() & _

 

 

"_" & RGFiles.CurrentRow.Cells(2).Value

 

The code works fine (for one cell)  but if I'm updating a cell, i need to pass the mouse over the cell to update the value that is shown in that cell. If I'm updating all cells of a certain column, the cells show the new value but takes a lot of time to do that.

What is missing me? What do I need to do to resolve this problem.

Thank You.
LM

2 Answers, 1 is accepted

Sort by
0
Xavier Soares
Top achievements
Rank 2
answered on 24 Oct 2008, 09:43 AM
I've found the solution!

I need to insert, before updating the cell value, the code:

 

Me.RADGRIDVIEW.GridElement.BeginUpdate()

 


And when finished the code:

Me

 

.RADGRIDVIEW.GridElement.EndUpdate(True)

 


Thank You.
LM
0
Nikolay
Telerik team
answered on 28 Oct 2008, 02:05 PM
Hello Luis Mauricio,

I am glad to hear that you managed to resolve the issue.

Indeed, when setting multiple cell values through the API, you should do it between RadGridView.GridElement.BeginUpdate() and RadGridView.GridElement.EndUpdate().

If you have additional questions, feel free to contact me.

Greetings,
Nikolay
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
GridView
Asked by
Xavier Soares
Top achievements
Rank 2
Answers by
Xavier Soares
Top achievements
Rank 2
Nikolay
Telerik team
Share this question
or