Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Professionals
|
ASP.NET 3.5 Professionals If you are an experienced ASP.NET programmer, this is the forum for your 3.5 questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Professionals 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 June 15th, 2009, 09:34 AM
Friend of Wrox
 
Join Date: Jan 2006
Posts: 180
Thanks: 1
Thanked 1 Time in 1 Post
Send a message via ICQ to dpkbahuguna Send a message via MSN to dpkbahuguna Send a message via Yahoo to dpkbahuguna
Default Add newrow with controls in gridview using Java Script

hello friends ,

I am creating rows in gridview using java script..now I've to add combo and textbox also in that row..I meant as I have format in Gridview in server side. please let me know how can i do this.
what I am doing now to add just a normal row is like below:
<script type="text/jscript" language="javascript">
function addrow(gv)
{
var gv1 = document.getElementById(gv);
var tr = document.createElement("tr");
var td1 = document.createElement("td");
var td2 = document.createElement("td");
td1.innerHTML = 'hello1';
td2.innerHTML = 'hello2';
tr.appendChild(td1);
tr.appendChild(td2);
gv.firstChild.appendChild(tr);
}
</script>

<input id="Button2" type="button" value="button" onclick='addrow(<%= GridView1.ClientID %>)'/>



Thanks !!
Cheers!!
__________________
DPK..





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to bind Gridview with controls hyder_master .NET Framework 2.0 0 October 5th, 2007 05:01 AM
How to add a new column into gridview? Bryan Stanley ASP.NET 2.0 Basics 0 September 12th, 2007 10:49 PM
Validating Gridview Controls rit01 ASP.NET 2.0 Basics 1 March 8th, 2006 02:28 PM
Java vs Java Script functions joemorrison74 J2EE 0 July 6th, 2005 04:28 PM
Datagrid newrow column color sa5webber General .NET 0 May 17th, 2004 05:47 AM





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