Link to home
Start Free TrialLog in
Avatar of johnkainn
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?
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;
        }

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of sunithnair
sunithnair

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial