Skip to content
Loading
  • 0
    Dear Yesubabu,
    If you want to show value in grid view then you need to do below code.
    foreach (DataGridViewRow row in dataGridView1.Rows)
    {
    int n = row.Index;
    dataGridView1.Rows[n].Cells[6].Value =
    Double.Parse(dataGridView1.Rows[n].Cells[4].Value.ToString()) /
    Double.Parse(dataGridView1.Rows[n].Cells[5].Value.ToString());
    }
    and if you want to show value in Text Box so need to do below code.
    double issue = 0;
    int storedays = Convert.ToInt32(Total_StoreDays_txt.Text);
    if (double.TryParse(Total_issue_txt.Text, out issue))
    {
    remainingvalue.Text = (TotalValue / Percentage).ToString();
    }
    0