- Joined
- Jan 8, 2006
- Messages
- 4
- Reaction score
- 0
Hi Experts..
I have a problem with my asp datagrid. I have been through a lot of website but none of them have what i want. U see, i have to add an image in the datagrid using ASP.NET... ow here comes the difficult part.
In my MSSQL database, i MUST declare 'strFilePath' as type String and NOT Image... Now, how do i create a datagrid to display NOT the file path but the image from MSSQL base on the file path.. Experts tell me how... In detail.... Please....
_________________________________________________________________
Currently my codes are: <in HTML mode>
<asp:datagrid id="grdFoodAndGroceries" style="Z-INDEX: 107; LEFT: 152px; POSITION: absolute; TOP: 264px"
runat="server" Width="552px" Height="256px" AutoGenerateColumns="False" Visible="True">
<Columns>
<asp:BoundColumn Visible="False" DataField="FoodAndGroceriesNumber"></asp:BoundColumn>
<asp:BoundColumn DataField="ShopName" HeaderText="Shop Name" Visible="True"></asp:BoundColumn>
<asp:BoundColumn DataField="Image" HeaderText="images"></asp:BoundColumn>
</Columns>
</asp:datagrid>
__________________________________________________________________
<IN CODE BEHIND FILE>
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim objDBFoodAndGroceries As New DBFoodAndGroceries
Dim objArraylist As New ArrayList
objArraylist = objDBFoodAndGroceries.retrieveFoodAndGroceriesList
grdFoodAndGroceries.DataSource = objArraylist
grdFoodAndGroceries.DataBind()
End Sub
___________________________________________________________________
Hope u guys can help me out....
LeoPutera
I have a problem with my asp datagrid. I have been through a lot of website but none of them have what i want. U see, i have to add an image in the datagrid using ASP.NET... ow here comes the difficult part.
In my MSSQL database, i MUST declare 'strFilePath' as type String and NOT Image... Now, how do i create a datagrid to display NOT the file path but the image from MSSQL base on the file path.. Experts tell me how... In detail.... Please....
_________________________________________________________________
Currently my codes are: <in HTML mode>
<asp:datagrid id="grdFoodAndGroceries" style="Z-INDEX: 107; LEFT: 152px; POSITION: absolute; TOP: 264px"
runat="server" Width="552px" Height="256px" AutoGenerateColumns="False" Visible="True">
<Columns>
<asp:BoundColumn Visible="False" DataField="FoodAndGroceriesNumber"></asp:BoundColumn>
<asp:BoundColumn DataField="ShopName" HeaderText="Shop Name" Visible="True"></asp:BoundColumn>
<asp:BoundColumn DataField="Image" HeaderText="images"></asp:BoundColumn>
</Columns>
</asp:datagrid>
__________________________________________________________________
<IN CODE BEHIND FILE>
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim objDBFoodAndGroceries As New DBFoodAndGroceries
Dim objArraylist As New ArrayList
objArraylist = objDBFoodAndGroceries.retrieveFoodAndGroceriesList
grdFoodAndGroceries.DataSource = objArraylist
grdFoodAndGroceries.DataBind()
End Sub
___________________________________________________________________
Hope u guys can help me out....
LeoPutera