I want to bind a arraylist to grid in asp.net c#?
<pre><code>nsecashservice serviceofgainers = new nsecashservice();
int idd = serviceofgainers.maxID();
System.Collections.ArrayList copygrid = new System.Collections.ArrayList();
System.Collections.ArrayList grid = new System.Collections.ArrayList();
grid = serviceofgainers.getdata(idd);
copygrid = grid;
System.Collections.ArrayList losers = new System.Collections.ArrayList();

this.dataGridView1.DefaultCellStyle.BackColor = Color.Bisque;
dataGridView1.EnableHeadersVisualStyles = false;
dataGridView1.ColumnHeadersDefaultCellStyle.BackColor = Color.Salmon;

dataGridView1.Columns.Add("Sl.No", "Sl.No");
//  Console.WriteLine("column width: " + dataGridView1.Columns[0].Width);


dataGridView1.Columns.Add("scripName", "Company");
dataGridView1.Columns.Add("prevClose", "previousClose");
dataGridView1.Columns.Add("closeValue", "closeValue");
dataGridView1.Columns.Add("percentDiff", "percentDiff");




//int row = grid.Count - 1;
for (int r = 0; r &lt;= 14; r++)
{
    scripinfo inf = grid[r] as scripinfo;
    //Console.WriteLine("Row count" + dataGridView1.Rows.Count);
    dataGridView1.Rows.Add();
    dataGridView1.Rows[r].Cells[0].Value = r + 1;
    dataGridView1.Rows[r].Cells[1].Value = inf.scripName;
    dataGridView1.Rows[r].Cells[1].Style.ForeColor = System.Drawing.Color.Blue;
    dataGridView1.Rows[r].Cells[2].Value = Math.Round(inf.prevClose, 2);
    dataGridView1.Rows[r].Cells[3].Value = Math.Round(inf.closeValue, 2);
    dataGridView1.Rows[r].Cells[4].Value = Math.Round(inf.percentDiff, 2);
    dataGridView1.Rows[r].Cells[4].Style.ForeColor = System.Drawing.Color.Green;

}
</code></pre>

<p>this code i have done in window application i want to change it to asp.net c#. in this i am getting a array list of 1500 rows of data containing 4 columns of data. plz help me to to change this code.   </p>
