Wrox Programmer Forums
|
ASP.NET 1.x and 2.0 Application Design Application design with ASP.NET 1.0, 1.1, and 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.x and 2.0 Application Design 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 August 20th, 2003, 11:22 AM
Registered User
 
Join Date: Aug 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Dynamically adding a row to a DataGrid

How do you dynamically add a row to a datagrid?
The grid is already loaded with data from the database.
The new row would so that the user can add information into the newly created row to be saved back to the database?

please send your idea on how to handle this problem to vwindrow@msn.com

Thanks


 
Old August 20th, 2003, 11:34 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

I just looked at the datagrid control. There is the Items member, but there doesn't seem to be any method to add something too it. Your best bet is probable to add an item to the datasource you are binding it to then bind it. Otherwise, I don't see a way at first glance.

 
Old August 20th, 2003, 03:10 PM
Registered User
 
Join Date: Aug 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have tried using an untyped dataset and I still can't see how to add a row to the grid with nothing in it for the user to fill out. I have even tried a dataview.








Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding A Databound Column Dynamically in DataGrid Theone84 ASP.NET 2.0 Professional 0 July 30th, 2008 11:26 PM
Dynamically adding DataGrid rows lepreston ASP.NET 1.x and 2.0 Application Design 3 November 22nd, 2006 04:33 AM
Dynamically adding Colums to datagrid ? vivekshah C# 0 April 15th, 2006 02:54 AM
dynamically change the row colors in datagrid bvrao VS.NET 2002/2003 0 December 24th, 2003 06:19 AM





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