Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 4th, 2006, 05:41 AM
Authorized User
 
Join Date: Jun 2006
Posts: 88
Thanks: 0
Thanked 0 Times in 0 Posts
Default Datagrid in JAvascript

hi All

I have datagrid.Which contains Three fields.

my second column is button column.when i click on that button my jaavscript is fired.

My problem is : i want grid cell in javascript.I have total value in hidden.I want to store in different cells of third column of datagrid.

How can i use of datagrid property in javascript?

Thanks
monika

 
Old December 4th, 2006, 10:05 AM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 550
Thanks: 0
Thanked 1 Time in 1 Post
Default

Monika,

This can simply be done thru javascript as below:

document.getElementById("DataGrid1").rows[1].cells[1].innerText = "Testing by mike";

here DataGrid1 is the name of table that gets crated in HTML in place of datagrid, but this is not a good practice as when you refresh the page, this value will be lost from your grid, then to maintain this value, lot of manipulation has to be done, so try to think in a good manner with good logic.

Regards
Mike

Fortune favours the brave, so don't regret on missed oppurtunities.
 
Old December 5th, 2006, 02:53 AM
Authorized User
 
Join Date: Jun 2006
Posts: 88
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Mike

Thanks.

Monika






Similar Threads
Thread Thread Starter Forum Replies Last Post
datagrid, innertext, javascript, database update vsr ASP.NET 1.0 and 1.1 Professional 1 November 6th, 2007 05:54 PM
adding checkbox to datagrid using javascript k.manisha ASP.NET 1.0 and 1.1 Professional 0 June 4th, 2007 11:02 PM
JavaScript and DataGrid template column drasko ASP.NET 1.0 and 1.1 Basics 2 February 21st, 2006 06:34 AM
Problem with DataGrid & JavaScript qadeer05 Classic ASP Basics 2 April 19th, 2004 10:28 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.