form design / update clash
-
Hello, In my form, I set a label's initial text as 0. in the Load() of this form, I make some calculations and then set the label's text to the output of these calculations. When I debug, I trace the calculations and nothing seems to be wrong. I tried to change the initial value of the label and I saw the new initial value in the runtime.
for (int i = 0; i < dbGridView.Rows.Count; i++)
{
if (dbGridView.Rows[i].Cells[4].Value.ToString() == "Nakit")
{
top = top + Convert.ToDouble(dbGridView.Rows[i].Cells[7].Value.ToString());
}
}
label5.Visible = true;
label5.Text = top.ToString().Substring(0, 10);I'd like to sum the value in 7th cells and then convert the sum to string, and set the label with this. In debug, I see that 'top' is calculated properly but I cannot see the calculated value in the label in runtime. Anyone can help me? this is urgent :(
-
Hello, In my form, I set a label's initial text as 0. in the Load() of this form, I make some calculations and then set the label's text to the output of these calculations. When I debug, I trace the calculations and nothing seems to be wrong. I tried to change the initial value of the label and I saw the new initial value in the runtime.
for (int i = 0; i < dbGridView.Rows.Count; i++)
{
if (dbGridView.Rows[i].Cells[4].Value.ToString() == "Nakit")
{
top = top + Convert.ToDouble(dbGridView.Rows[i].Cells[7].Value.ToString());
}
}
label5.Visible = true;
label5.Text = top.ToString().Substring(0, 10);I'd like to sum the value in 7th cells and then convert the sum to string, and set the label with this. In debug, I see that 'top' is calculated properly but I cannot see the calculated value in the label in runtime. Anyone can help me? this is urgent :(
add the below line at end of your code
label5.Refresh();
Cheers
Rajesh B --> A Poor Workman Blames His Tools <--
-
add the below line at end of your code
label5.Refresh();
Cheers
Rajesh B --> A Poor Workman Blames His Tools <--
thanks =) but the solution is to use Convert.toString(anydouble) instead of anydouble.toString() :)
-
thanks =) but the solution is to use Convert.toString(anydouble) instead of anydouble.toString() :)
Why did you delete your question? Now all we have an answer to an unknown question.
-
Why did you delete your question? Now all we have an answer to an unknown question.