G
Guest
Hello.
I want to display the content of 'displayTable' object reversely.
When from r=0 to r= displayTable.Length-1, the code works well to display.
But when from r= displayTable.Length-1 to r=0, the code doesn't work to
display.
Thanks a lot for any help.
**********
DataRow[] displayTable = resultTb.Select();
....
//for (int r = 0 ; r < displayTable.Length ; r++ ) // works well.
//for (int r = 6 ; r < -1 ; r = r-1 ) // doesn't work
for (int r = displayTable.Length-1 ; r < -1 ; r--) // doesn't work
{
...
buttonNm = displayTable[r].ItemArray.GetValue(3).ToString().Trim();
this.openButton = new System.Windows.Forms.Button();
this.Controls.Add(this.openButton);
...
}
*************
Have a nice day.
Eunice.
I want to display the content of 'displayTable' object reversely.
When from r=0 to r= displayTable.Length-1, the code works well to display.
But when from r= displayTable.Length-1 to r=0, the code doesn't work to
display.
Thanks a lot for any help.
**********
DataRow[] displayTable = resultTb.Select();
....
//for (int r = 0 ; r < displayTable.Length ; r++ ) // works well.
//for (int r = 6 ; r < -1 ; r = r-1 ) // doesn't work
for (int r = displayTable.Length-1 ; r < -1 ; r--) // doesn't work
{
...
buttonNm = displayTable[r].ItemArray.GetValue(3).ToString().Trim();
this.openButton = new System.Windows.Forms.Button();
this.Controls.Add(this.openButton);
...
}
*************
Have a nice day.
Eunice.