Solved

adding new row to datagrid

Posted on 2004-09-22
4
213 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
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 …
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

634 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