Datagrid columns?

S

Shapper

Hello,

I have a datagrid in my aspx page which is already bind to a dataset.

How can I create custom columns in the datagrid from my aspx.vb code?

Basically I need to create 3 columns with no title in the datagrid:
1. Image (It has an image which url is in the database field IMAGE)
2. Name
3. Price

Thanks,
Miguel
 
G

Guest

Hi Shapper,

You can use TemplateColumn + Image
(<asp:Image ID="Your_img_ID" Runat=server ImageUrl='<%#
DataBinder.Eval(Container, "DataItem.IMAGE") %>'></asp:Image>) for Image. And
use BoundColumn for Name and Price.

HTH

Elton Wang
(e-mail address removed)
 

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

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top