How to create data and bind it to a GridView?

  • Thread starter Miguel Dias Moura
  • Start date
M

Miguel Dias Moura

Hello,

I have a GridView on an Aspx page.

I need my GridView to have three columns:
Name [String], City [String] and Photo [Image]

I want to declare the data in my Aspx.Vb code and bind it to my
GridView.
I DON'T want to use a database as the datasource.

My question is:

What data type should I use?
(I tried a list and and arrayList but I am having problems to make it
work)
Could you, please, show me a simple example?

Thank You,
Miguel
 
K

krishna.bitla

Hi Miguel,

You can use either ArrayList or any datatable.

If you do not want to use a database, create a temporary datatable and
add the values to the table and make it as datasource to the view.

Cheers,
Kris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top