Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 30, 2012 04:13 PM by Satbir_4
Member
157 Points
216 Posts
Nov 30, 2012 03:21 PM|LINK
<asp:TemplateField> <ItemTemplate>
****************************************
can we add CSS classes here to justify Description Column
*****************************************
<%# DataBinder.Eval(Container.DataItem,"Description") %> </ItemTemplate> </asp:TemplateField>
Star
12879 Points
2380 Posts
Nov 30, 2012 03:24 PM|LINK
what are you trying to do?
You can't create classes at that point, you can add in line styles or apply css classes, but it might be overriden by the css for gridview.
Nov 30, 2012 03:45 PM|LINK
Ok. tell me one thing .. <a href is not working with second ItemTemplate
Can we add second <a href with second ItemTemplate, but should fetch the value of pid like first <a href tag
********************************************************************************************************
<asp:TemplateField HeaderText="Products"> <ItemTemplate> <a href="AddCart.aspx?id=<%# DataBinder.Eval(Container.DataItem,"pid") %>"> <img width="145px" height="120px" src="... /<%# DataBinder.Eval(Container.DataItem,"p_id") %>" alt="image" /> </ItemTemplate> </asp:TemplateField>
<asp:TemplateField HeaderText="Products"> <ItemTemplate> <%# DataBinder.Eval(Container.DataItem,"pro_name") %></a> </ItemTemplate> </asp:TemplateField>
Nov 30, 2012 03:51 PM|LINK
I'm sorry, you've lost me. You were talking about CSS and now you're asking about adding a 2nd hyperlink?
I don't understand
Nov 30, 2012 03:56 PM|LINK
really sorry, but you told me that i am unable to add CSS classes at that point.
and hyperlink is my next question.
really sorry to bother you
All-Star
66017 Points
7639 Posts
Moderator
Nov 30, 2012 04:07 PM|LINK
<ItemTemplate> <div style="text-align:left;"> <%# DataBinder.Eval(Container.DataItem,"Description") %> </div> </ItemTemplate>
Nov 30, 2012 04:13 PM|LINK
Thanks
Satbir_4
Member
157 Points
216 Posts
CSS classes in Gridview
Nov 30, 2012 03:21 PM|LINK
<asp:TemplateField>
<ItemTemplate>
****************************************
can we add CSS classes here to justify Description Column
*****************************************
<%# DataBinder.Eval(Container.DataItem,"Description") %>
</ItemTemplate>
</asp:TemplateField>
DarthSwian
Star
12879 Points
2380 Posts
Re: CSS classes in Gridview
Nov 30, 2012 03:24 PM|LINK
what are you trying to do?
You can't create classes at that point, you can add in line styles or apply css classes, but it might be overriden by the css for gridview.
Seek and ye shall find or http://lmgtfy.com/
Satbir_4
Member
157 Points
216 Posts
Re: CSS classes in Gridview
Nov 30, 2012 03:45 PM|LINK
Ok. tell me one thing .. <a href is not working with second ItemTemplate
Can we add second <a href with second ItemTemplate, but should fetch the value of pid like first <a href tag
********************************************************************************************************
<asp:TemplateField HeaderText="Products">
<ItemTemplate>
<a href="AddCart.aspx?id=<%# DataBinder.Eval(Container.DataItem,"pid") %>">
<img width="145px" height="120px" src="... /<%# DataBinder.Eval(Container.DataItem,"p_id") %>" alt="image" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Products">
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem,"pro_name") %></a>
</ItemTemplate>
</asp:TemplateField>
DarthSwian
Star
12879 Points
2380 Posts
Re: CSS classes in Gridview
Nov 30, 2012 03:51 PM|LINK
I'm sorry, you've lost me. You were talking about CSS and now you're asking about adding a 2nd hyperlink?
I don't understand
Seek and ye shall find or http://lmgtfy.com/
Satbir_4
Member
157 Points
216 Posts
Re: CSS classes in Gridview
Nov 30, 2012 03:56 PM|LINK
really sorry, but you told me that i am unable to add CSS classes at that point.
and hyperlink is my next question.
really sorry to bother you
Curt_C
All-Star
66017 Points
7639 Posts
Moderator
Re: CSS classes in Gridview
Nov 30, 2012 04:07 PM|LINK
<ItemTemplate>
<div style="text-align:left;">
<%# DataBinder.Eval(Container.DataItem,"Description") %>
</div>
</ItemTemplate>
v5.1 of iTracker (Inventory Tracker Starter Kit) is out, Download it now!
Satbir_4
Member
157 Points
216 Posts
Re: CSS classes in Gridview
Nov 30, 2012 04:13 PM|LINK
Thanks