Solved

adding new row to datagrid

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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ASP/VB email question 4 46
Expression Evaluater 3 38
vb.net winforms sizing/resolution? 4 45
Access Schema 6 27
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

820 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