Maziar,
First of all, if you've assigned a class to <td>, it will format the cell
content in the way your want. I don't think there is any reason for setting
the same class for the <a>.
Secondly, I had another look at your problem. The solution is
<asp:HyperLinkC olumn Text="Edit" DataNavigateUrl Field="PID"
DataNavigateUrl FormatString="M anageItem.aspx? PID={0}">
<ItemStyle CssClass="links mall"></ItemStyle>
</asp:HyperLinkCo lumn>
Eliyahu
"Maziar Aflatoun" <ma***@rogers.c om> wrote in message
news:zq******** *************@n ews01.bloor.is. net.cable.roger s.com...
That doesn't work because it assigns the css to the cell and not the href.
What I need is
<td class="linksmal l"><a href="ManageIte m.aspx?PID=24"
class="linksmal l">Edit</a></td>
instead of
<td class="linksmal l"><a href="ManageIte m.aspx?PID=24"> Edit</a></td>
Any idea?
Thank you
Maziar A.
"Eliyahu Goldin" <re************ *@monarchmed.co m> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. .. In ItemDataBound event set
e.Item.Cells[xx].Attributes["class"]="linksmall" ;
where xx is the index of the column with the hyperlink
Eliyahu
"Maziar Aflatoun" <ma***@rogers.c om> wrote in message
news:Zz******** *****@news04.bl oor.is.net.cabl e.rogers.com... Hi everyone,
Does anyone know how I can apply the css 'linksmall' to my hyperlink in
my
datagrid?
I have the following and it doesn't work
<asp:HyperLinkC olumn Text="Edit" DataNavigateUrl Field="PID"
ItemStyle-CssClass="links mall"
DataNavigateUrl FormatString="M anageItem.aspx? PID={0}">
I need to add it to my href='' tag.
Thank you
Maziar A.