TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Vignesh siva
NA
1
649
how to edit the details list in grid view ?
May 24 2016 7:57 AM
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
//SqlConnection con = new SqlConnection("Data Source=SIVA-PC\\SQLEXPRESS;Initial Catalog=bookshop;Integrated Security=True");
//con.Open();
//string s = ("select * from Bookshop");
//SqlDataAdapter da = new SqlDataAdapter(s, con);
//DataSet ds = new DataSet();
//da.Fill(ds,"b");
//dataGridView1.DataSource = ds.Tables["b"];
//dataGridView1.DataMember = "Bookshop";
//con.Close();
}
private void BookList_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the 'bookshopDataSet.Bookshop' table. You can move, or remove it, as needed.
this.bookshopTableAdapter.Fill(this.bookshopDataSet.Bookshop);
}
private void btnsave_Click(object sender, EventArgs e)
{
}
private void btnedit_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection("Data Source=SIVA-PC\\SQLEXPRESS;Initial Catalog=bookshop;Integrated Security=True");
con.Open();
string s = ("select * from Bookshop");
SqlDataAdapter da = new SqlDataAdapter(s, con);
DataSet ds = new DataSet();
da.Fill(ds, "b");
dataGridView1.DataSource = ds.Tables["b"];
}
}
}
Reply
Answers (
1
)
How to import data from excel file sheet to sql server
Changes in my program