View Single Post
Old 02-18-2006, 07:19 AM   #1 (permalink)
rikb53
Registered User
 
Join Date: Jan 2006
Posts: 29
rikb53 is on a distinguished road
boundColumn,TemplateColumn,ButtonColumn

guys, can i have a bound column, then a template column and then a button column.
Everything works for me except when i put the Template column in - thats when it blows up.
i want to pass to the DataBinder.Eval, the path of the image, so the image will change based on the string path i pass. this has got to be doable if i can use the Text Field of the Button column to pass an image path as well.
any help here is appreciated
general code is below
thanks
rik

<Columns>
<asp:BoundColumn DataField="Enabled" HeaderText="Enabled">
</asp:BoundColumn>
<asp:TemplateColumn HeaderText="ImageHere" >
<ItemTemplate>
<asp:image Runat="server" ImageUrl='<%# DataBinder.Eval(Container.DataItem, "EnabledImg") %>
</ItemTemplate>
</asp:TemplateColumn>
<asp:ButtonColumn ButtonType="LinkButton" Text="&lt;img src=Images/Enable.gif border=0&gt;" HeaderText="Change Enable"
CommandName="Enable">
</asp:ButtonColumn>
</Columns>
rikb53 is offline   Reply With Quote