Click here to Skip to main content
15,908,115 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
var grid=document.getelementbyid('Gridname');


var text=grid.rows[1].cells[1].innerHTML;


Here instead of Cells[1] i want to use something like cells['txt_Orderno'];


in cell[1] i am using template field textbox;

the id of that textbox is txt_Orderno.

So my problem is instead of using index of cell i want use column name of bound filed or template filed id. How to achieve this???
Posted

You are trying server side methods on client side which won't work. GridView will be rendered as simple HTML table so once the grid is loaded,go through the rendered html and then code accordingly to access the required fields.

Regards...
 
Share this answer
 
Comments
tnkarthi 29-Jul-14 8:36am    
Then i need to get Grid view Column Index by using column Name (Template Filed Header or BoundFied )...How to do this?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900