Solved

adding new row to datagrid

Posted on 2004-09-22
4
164 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

746 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

10 Experts available now in Live!

Get 1:1 Help Now