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

[Solved] Set the value of a cell client-side

2 Answers 198 Views
Grid
This is a migrated thread and some comments may be shown as answers.
John Thompson
Top achievements
Rank 1
John Thompson asked on 22 Oct 2009, 10:24 AM
Is it possible to set the value of a cell client-side doing something like this?  (Obviously this does not work) 

 

 

 

function Test2() {

 

 

var MasterTable = $find('RadGrid1').get_masterTableView();

 

 

var items = MasterTable.get_dataItems();

 

 

var i = 0;

 

 

for (i = 0; i < 5; i++) {

 

 

var row = MasterTable.get_dataItems()[i];

 

 

var cell = MasterTable.getCellByColumnUniqueName(row, "StopNumber");

 

 

if (cell.innerHTML == 2) {

 

MasterTable.selectItem(MasterTable.get_dataItems()[i].get_element());

MasterTable.editSelectedItems();

 

var cell2 = MasterTable.getCellByColumnUniqueName(row, "PickUpOrDelPIN_NUM");

 

cell2.set_value =

"711143"

 

 

 

 

 

MasterTable.updateEditedItems();

 

return false;

 

}

}

}

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 22 Oct 2009, 11:47 AM
Hello John,

Once the cells are in editmode, you would have to access the editor controls rendered in the cells rather than accessing the cells. For instance, you would have to access the textbox control when a gridboundcolumn is in edit mode. You can refer to the following code library submission to access the editor controls in grid on client:
Retrieving grid editor value client side

Hope this makes sense
Princy.
0
John Thompson
Top achievements
Rank 1
answered on 22 Oct 2009, 11:51 AM
Thank you for your assistance.  Is it possible to update the cells values programatically, without placing it in edit mode?
Tags
Grid
Asked by
John Thompson
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
John Thompson
Top achievements
Rank 1
Share this question
or