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
Ankush
NA
267
63.2k
Get the value from datagrid to textbox using c#
Mar 24 2016 5:42 AM
I am developing a window application in which I have a datagridview. I get the data in datagridview from database and have added checkbox column in datagridview. when the checkbox is checked the value should be shown in label, for that I have written foreach loop and its working but,
when the user checks the first row the value is not refreshed, it gets refreshed when focus from first row is leaved.
Which is the appropriate datagridview event ??
The code I have written
Amt = 0;
foreach
(DataGridViewRow dgr
in
dgvDetails.Rows)
{
if
(Convert.ToBoolean(dgr.Cells[0].Value) ==
true
)
{
Amt += Convert.ToInt32(dgr.Cells[12].Value.ToString());
}
txtCash_Amt.Text = Amt.ToString();
}
Reply
Answers (
4
)
insertind date problem
How can I set default homepage in Chrome via javascript?