Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EditCommandColumn

Status
Not open for further replies.

jkl

Programmer
May 16, 2001
83
US
how do i add a css class value to the links created in the ECC. i know i can add a &quot;class&quot; attribute, but that only applies it to the <td> cell that surrounds the generated <a> link. i want to add the &quot;class&quot; attribute to the <a> link itself. thanks.
 
declare a style for <a> on the page, and it should get propagated out to the link in the dg.
penny1.gif
penny1.gif
 
the thing about that is that i have several <a> styles on this page that i want to control specifically. there are several datagrids on this page and not all the links that are generated in the ECC, in each DG, are going to be the same style. also, i want to have different styles for the &quot;edit&quot;, &quot;update&quot; and &quot;cancel&quot; links generated. am i out of luck here?
 
Base your styles on certain Id key's that way you can use the id in whenever you want that kind of style.
Ex. I have an cetain style specified for errors

.Error
{
font-size: 12pt;
color: red;
background-color: aqua;
}


When any error type things come up I simply set the id of that control or object to Error.
Works perfectly. That'l do donkey, that'l do
[bravo] Mark
 
Okay. To clarify. Here's the resulting HTML that's generated by the EditControlColumn:

<tr>
<td class=&quot;delLink&quot; align=&quot;Center&quot; onClick=&quot;return confirm('Are you Sure you want to delete this entry?\n:0:');&quot; style=&quot;width:75px;&quot;>
<a href=&quot;javascript:__doPostBack('grdArticles:_ctl3:_ctl0','')&quot;><b>DEL</a>
</td>
<td class=&quot;editLink&quot; align=&quot;Center&quot; style=&quot;width:40px;&quot;>
<a href=&quot;javascript:__doPostBack('grdAppointments:_ctl3:_ctl1','')&quot;>Edit ></a>
</td>
<td class=&quot;f12&quot; align=&quot;Left&quot; valign=&quot;Top&quot; style=&quot;width:600px;&quot;>
<font class=&quot;f11&quot; ><a href=&quot;How to Fix Everything Using Duct Tape&quot;>How to Fix Everything Using Duct Tape</a><br></font>
<font class=&quot;f10&quot; ><i>McGyver</i></font>
</td>
</tr>

One row, 3 columns: column1 = delete link, column2 = edit link, and column3 = article listing

I want the del link and the edit link to have different styles, called &quot;delLink&quot; and &quot;editLink&quot; in the stylesheet.

Notice how the class=&quot;delLink&quot; and class=&quot;editLink&quot; are applied to the TD but not to the <a> itself. I need to be able to apply the style to the <a>.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top