Solved

How to use inserttemplate in gridview.

Posted on 2010-09-22
8
720 Views
Last Modified: 2013-12-16
How to add new row in the gridview on the click of button that are also add in gridview.
0
Comment
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 12

Expert Comment

by:jagssidurala
ID: 33732584
DataTable dt = new DataTable();

get data and assign dt from database Then write below code

Gv.DataSource = dt;
Gv.DataBind();

I assumed dt is having two columns EmployeeId,EmployeeName.

In button click you need to write below code

dt.Rows.Add(0,"Jagssidurala");
Gv.DataSource = dt;
Gv.DataBind();
0
 
LVL 5

Expert Comment

by:Siyamala
ID: 33732888
Hi ,
Try with sample in this url which would help you
http://www.dotnetspark.com/kb/643-how-to-editupdatedelete-gridview.aspx
0
 
LVL 19

Author Comment

by:Amandeep Singh Bhullar
ID: 33733153
I need to insert new row into the Grid
0
 
LVL 5

Accepted Solution

by:
Siyamala earned 250 total points
ID: 33733239
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 5

Expert Comment

by:Siyamala
ID: 33733254
0
 
LVL 41

Assisted Solution

by:guru_sami
guru_sami earned 250 total points
ID: 33736206
0
 
LVL 12

Expert Comment

by:jagssidurala
ID: 33766727
I think the code which i have written in first comment is exactly matches your need.
0
 
LVL 19

Author Closing Comment

by:Amandeep Singh Bhullar
ID: 33814477
Thanks
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

760 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

19 Experts available now in Live!

Get 1:1 Help Now