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

JavaScript

Avatar of undefined
Last Comment
sunithnair

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
sunithnair

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck