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
Shomen Deb
NA
43
0
How to detect changes in values in the datagridview cells
Nov 4 2008 12:03 AM
I want to detect changes in values in cells. but it is not working. I have given the code. private void dataGridView1_CellValueChanged(object sender, DataGridViewCellEventArgs e) { Int32 selectedCellCount = dataGridView1.GetCellCount(DataGridViewElementStates.Selected); if (selectedCellCount > 0) { for (int i = 0; i < selectedCellCount; i++) { row = dataGridView1.SelectedCells[i].RowIndex; col = dataGridView1.SelectedCells[i].ColumnIndex; } } //MessageBox.Show(Convert.ToString(this.dataGridView1[row, col].Value)); this.dataGridView1.CurrentCell = this.dataGridView1[col + 1, row]; int a = Convert.ToInt32(this.dataGridView1[col, row].Value); int b = Convert.ToInt32(this.dataGridView1[col - 1, row].Value); this.dataGridView1.CurrentCell.Value = a * b; } Please give me solution regarding this problem Regards, Shomen Deb
Reply
Answers (
1
)
how to perform calculation between cells under a datagridview control using C#.net
How to add PageBreak in RichTextBox- KIndly Help Me