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
Muhammad Hasifur Rahman Rahat
NA
7
435
ADO.NET problem with report & edit button creating in datagridview .
Jan 3 2021 3:52 PM
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex != -1 && e.ColumnIndex != -1 && dataGridView1.Rows.Count > e.RowIndex + 1)
{
var v = dataGridView1.Rows[e.RowIndex].Cells["CvID"].Value;
CvID = dataGridView1.Rows[e.RowIndex].Cells["CvID"].Value == null ? 0 : Convert.ToInt32(dataGridView1.Rows[e.RowIndex].Cells["CvID"].Value);
//if ("Report" == dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString())
//{
// Form2 f2 = new Form2();
// f2.Show();
//}
if ("Edit" == dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString())
{
Edit();
}
if ("Delete" == dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString())
{
//Delete();
}
}
}
SHOWING THAT COLUMNNAME CvID cannot found, for your consideration data insert works good.
Reply
Answers (
2
)
Xml file to table in asp. Net?
duplicate values of different two tables with only two common columns