Boopal Babu

Boopal Babu

  • 1.5k
  • 206
  • 3.9k

Display sting value in cell[1] only

May 5 2023 3:48 PM

I am creating Windows application using c# 2010

I tried to display string value in cell[1] only, but my string value display all cells. How to solve this error any one give me some ideas.

Here I am displaying my code

string test = "2023-24/k-";
string insertValueAs = "\t" + test;
for (int i = 0; i < dGV.RowCount - 1; i++)
{
    string stLine = "";
    for (int j = 0; j < dGV.Rows[i].Cells.Count; j++)
    stLine = stLine.ToString() + Convert.ToString(dGV.Rows[i].Cells[j].Value) + "\t";
    stLine = stLine.ToString() + Convert.ToString(dGV.Rows[i].Cells[1].Value) + "\t" + test;
    stOutput += stLine +   "\r\n";
}

 


Answers (3)