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
Adilcan Topuz
NA
2
1k
How to run cellendedit when a cell value changes in the data
Jul 28 2017 3:39 AM
The
CellEndEdit
event is running when I edit the datagridview cells, but when I print the data from the database to the DataGridView cell,
CellEndEdit
does not work:
dataGridView1.Rows[0].Cells[0].Value =
"test"
;
How can I run
CellEndEdit
?
My code:
private
void
btnKaydet_Click(
object
sender, EventArgs e)
{
try
{
int
index = 2;
int
rc = gridView1.RowCount;
for
(
int
i = 0; i < rc; i++)
{
index++;
string
stk = gridView1.GetRowCellValue(i,
"STOKKODU"
).ToString();
string
beden = gridView1.GetRowCellValue(i,
"BEDEN"
).ToString();
string
mik = gridView1.GetRowCellValue(i,
"MIKTARI_2"
).ToString();
dataGridView1.Rows[index].Cells[0].Value = stk;
dataGridView1.Rows[index].Cells[1].Value = beden;
dataGridView1.Rows[index].Cells[2].Value = mik;
}
ExcelProje.Save();
}
catch
(Exception ex)
{
MessageBox.Show(ex.Message);
}
}
private
void
dataGridView1_CellEndEdit(
object
sender, DataGridViewCellEventArgs e)
{
object
hucre = ExcelSayfa.Cells[dataGridView1.CurrentCell.RowIndex + 2, dataGridView1.CurrentCell.ColumnIndex + 1];
Excel.Range bolge = ExcelSayfa.get_Range(hucre, hucre);
bolge.Value2 = dataGridView1.CurrentCell.Value;
}
Reply
Answers (
0
)
AccessVoilationException with richtextbox
Interface inheritance