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
Khaliunaa Darkhanbat
NA
12
3k
How to call input values from datagridview? (unlimited row)
Jun 12 2017 9:13 PM
1.PLease help me, How to call input values from datagridview.(unlimited rows) I tried this coding, but it's not working, didn't show any answers.
private
void
dataGridView10_CellContentClick(
object
sender, DataGridViewCellEventArgs e)
{
for
(
int
i = 0; i < (dataGridView10.Rows.Count); i++)
{
DataGridViewRow row = dataGridView1.Rows[i];
groundproperty[0] = Convert.ToDouble(dataGridView10.Rows[i].Cells[
"Column1"
].Value);
groundproperty[1] = Convert.ToDouble(dataGridView10.Rows[i].Cells[
"Column2"
].Value);
groundproperty[2] = Convert.ToDouble(dataGridView10.Rows[i].Cells[
"Column3"
].Value);
groundproperty[3] = Convert.ToDouble(dataGridView10.Rows[i].Cells[
"Column4"
].Value);
groundproperty[4] = Convert.ToDouble(dataGridView10.Rows[i].Cells[
"Column5"
].Value);
groundproperty[5] = Convert.ToDouble(dataGridView10.Rows[i].Cells[
"Column6"
].Value);
groundproperty[6] = Convert.ToDouble(dataGridView10.Rows[i].Cells[
"Column7"
].Value);
groundproperty[7] = Convert.ToDouble(dataGridView10.Rows[i].Cells[
"Column8"
].Value);
groundproperty[8] = Convert.ToDouble(dataGridView10.Rows[i].Cells[
"Column9"
].Value);
}
}
2.
Second quistion in groupbox of 'OUTPUT VALUE' didn't changing, just showing one row, how can i do ? i need, if user insert unlimited case of input than calculating that number of case's ouptut showing on "output value' datagridview.
I tryied this code, but showing just one row result.
for
(
int
n= 0; n< (dataGridView1.Rows.Count); n++)
{
DataGridViewRow row = dataGridView1.Rows[n];
dataGridView1.Rows[n].Cells[
"dataGridViewTextBoxColumn2"
].Value = finalvalue[0].ToString();
dataGridView1.Rows[n].Cells[
"dataGridViewTextBoxColumn3"
].Value = finalvalue[1].ToString();
}
Reply
Answers (
0
)
C# Logic failure in dynamic Controls Code
About Event Viewer