|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace gridViewTest
{
public partial class testGrid : Form
{
public testGrid()
{
InitializeComponent();
}
private void testGrid_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the 'gridTestDataSet.Emp' table. You can move, or remove it, as needed.
this.empTableAdapter.Fill(this.gridTestDataSet.Emp);
}
private void button3_Click(object sender, EventArgs e)
{
//Update button update dataset after insertion,upadtion or deletion
DialogResult dr = MessageBox.Show("Are you sure to save Changes","Message",MessageBoxButtons.YesNoCancel,MessageBoxIcon.Information);
if (dr == DialogResult.Yes)
{
this.empTableAdapter.Update(gridTestDataSet.Emp);
dataGridView1.Refresh();
MessageBox.Show("Record Updated");
}
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
A technology enthusiast and software developer by profession. He is developing .Net,database and azure based enterprise applications from past 6 years.
His skills includes C# ,ASP.NET, ASP.NET MVC,WCF,JQuery,Javascript,SQL Server,Oracle . His areas of interests are database development and application software development using Microsoft Technologies.
Visit his blog:
queryingsql.com
Blog | Articles |
Answers |
Facebook
The best anti-virus is a smart user