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

[Solved] Selected Row Values Update

1 Answer 101 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Chris Zavaleta
Top achievements
Rank 1
Chris Zavaleta asked on 01 Oct 2009, 04:43 PM
Hello,
I need a way to update the selected grid row values using the clientside api.  I can read the values just fine, but, I need to be able to write to the cells.  Also, I don't neccessarily need to take the grid into edit mode or want to.  I'm selecting a grid row, updating the values on the form and pressing save.  On save I want to update the selected row without having to rebind the grid. 

I can get the GridIItem using the "get_selectedItems() call, but then what? 

Any Ideas with examples would be great..

chris

1 Answer, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 05 Oct 2009, 03:52 PM
Hi Chris,

Here is what you can do:

var items = $find([gridClientID]).get_masterTableView().get_selectedItems(); 
var cell = item[0].get_cell("ColumnUniqueName"); //cell is the HTML TD element 
cell.innerHTML = "123"//modify its innerHTML property 

Note, however, that RadGrid is a databound control, and your updates with this approach will not be persisted between postbacks.

Greetings,
Veli
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
Chris Zavaleta
Top achievements
Rank 1
Answers by
Veli
Telerik team
Share this question
or