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
ta mu
NA
201
81.8k
datagridview
Sep 21 2013 1:25 PM
int rowindex;
private void dataGridView1_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
{
my.Open();
string cellvalue = dataGridView1["id", rowindex].Value.ToString();
SqlCommand cmd = new SqlCommand("SELECT * FROM reminder WHERE id='" + cellvalue + "'", my);
SqlDataReader rd = cmd.ExecuteReader();
rd.Read();
upr.textBox1.Text = rd["message"].ToString();
upr.label1.Text = rd["id"].ToString();
my.Close();
}
i have this code and i want when mouse double click reader reads from database where id is equals selected cell but every time i got id and messag of
only first row of datagridview. is there problem with my int (rowidex variable) any other way to do this
Reply
Answers (
1
)
Why we should use Lightswitch?
interface & abstract