Solved

adding new row to datagrid

Posted on 2004-09-22
4
174 Views
Last Modified: 2010-04-23
Hi

 Initially i am displaying dropdownlist, button, textbox in datagrid. when the user click add new row
 I want to add a new row to datagrid again with dropdownlist, button , textbox.

any idea how to do this

thanx
sandeep
0
Comment
Question by:sandeep437
4 Comments
 
LVL 10

Accepted Solution

by:
123654789987 earned 250 total points
ID: 12130252
See the following link to add controls to u datagrid

http://www.4guysfromrolla.com/webtech/050801-1.shtml

To create a new row

DataTable1 = datagrid.DataSource
DataRow row = DataTable1.NewRow();

row = DataTable1.Row(0).ItemArray();  //This copies the whole structure of row 0 of the new row. Then u change the values of some column values that are different.

row("FirstColumn") = "sfsdf"

DataTable1.Rows.Add(row);

DataGrid1.Databind();
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Encryption Decryption in Oracle 12 105
Visual Studio editor? 1 38
Iterate a dictionnary to change values 4 53
Saveas need to save a copy 16 26
Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now