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
obulisundaram G
NA
3
3.6k
loading mysql to datagridview, datagridview became double
Oct 29 2013 5:18 AM
Hi,
I am using mysql and datagridview for storing and retrieving purpose., I just done saving the data from datagridview to mysql. But while I'm loading mysql into again that same datagridview, the datagridview become twice.
I given the code below
private void btnload_Click(object sender, EventArgs e)
{
DataTable dt = new DataTable();
string st = "select * from searchsong";
MySqlDataAdapter ad = new MySqlDataAdapter(st, con);
MySqlCommandBuilder cmd = new MySqlCommandBuilder(ad);
ad.Fill(dt);
BindingSource bg = new BindingSource();
bg.DataSource = dt;
dataGridView1.DataSource = bg;
}
In this "con"- connection string and "searchsong" is table name.
Reply
Answers (
0
)
Reduce File Size by Resampling Added Images in Excel to PDF
find an replace a particular character with another in strin