Re: bind data to gridview using custom data class?



VineetBatta,

If you want to use the arraylist instead from a normal performing solution
without troubles, than why are you asking for help to us.

Do you think that I want my name with a non good solution on internet?

It sounds for me the same as I want to increase a number but I want to use
the divide operator.

Cor


"vineetbatta" <vineetbatta@xxxxxxxxxxxxxxxxxxxxxxxxx> schreef in bericht
news:06355C9

5-7AD9-4628-9D0F-F80CD9704F17@xxxxxxxxxxxxxxxx
I have Custom Data class which stores data about single customer and then i
store that customer objects in arraylist as shown below.

Customer custdata = null; // Custom Data class for 1 customer data.

ArrayList ar = new ArrayList(); // To store more than one customer
object.
for (int x = 0; x < 30; x++)
{
custdata = new Customer();
custdata.CustomerID = 1234 + x;
custdata.CustomerName = "Name" + x.ToString();
custdata.CustomerLocation = "UK " + x.ToString();
custdata.CustomerType = x.ToString();

ar.Add(custdata);

}

grid.; /// FEW Steps are missing and not sure to make it compatable to
Grid.
grid.DataBind();

Now i want to bind data to gridView control, just like as we do if it was
Datatable.
Is there any simple conversion possible?

I do not want to use DataSet or DataTable but collection of Customer
Objects
in Arraylist.

Thanks in advance.


-Vineet


.