johnkainn
asked on
itemtemplate get value - javascript function
I have a Grid. In following code I get all value from a column.
In my Grid I also have an itemtemplate and in it a textbox.
How do I get the value from the textbox?
In my Grid I also have an itemtemplate and in it a textbox.
How do I get the value from the textbox?
function GetText() {
var masterTable = $find('<%= Grid.ClientID %>').get_masterTableView();
var cell;
var myText;
var myString;
var delimiter = ";";
for (var i = 0; i < masterTable.get_dataItems().length; i++) {
rowObject = masterTable.get_dataItems()[i];
cell = masterTable.getCellByColumnUniqueName(rowObject, "Column1");
myText = cell.innerHTML;
myString += delimiter + myText;
}
document.getElementById("<%=hidItem.ClientID %>").value = myString;
}
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.