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

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top