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

Selected value from client side

1 Answer 41 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Tina
Top achievements
Rank 1
Tina asked on 09 May 2012, 05:54 PM
How to pass the cell value that is selected in a grid to a textbox in templatcolumn?

1 Answer, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 10 May 2012, 05:14 AM
Hello Tina,

Try the following javascript to acheive your scenario.
JS:
function OnRowSelected(sender, args)
{
 var masterTable = sender.get_masterTableView();
 var selectedrow = masterTable.get_selectedItems();
 for (var i = 0; i < selectedrow.length; i++)
 {
   var cell = masterTable.getCellByColumnUniqueName(selectedrow[i], "UniqueName");
   var textbox = selectedrow[i].findElement('TextBox1');
   textbox.value = cell.innerHTML;
 }
}

Thanks,
Shinu.
Tags
General Discussions
Asked by
Tina
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or