I have pre-assigned button themes that are intended to be used as
<input ... class="button-red" />. In the GridButtonColumn, I would expect to be
able to assign a CSS class to the button itself, not the table cell which isn't very intuitive.
For example, I have a GridButtonColumn in my RadGrid like this:
<telerik:GridButtonColumn
ButtonType="PushButton"
CommandName="SendToCart"
Text="Send To Cart">
<ItemStyle
VerticalAlign="Top"
CssClass="button-red" />
</telerik:GridButtonColumn>
The problem is that the CssClass gets assigned to the table cell like this (which is almost useless for styling buttons using existing themes):
I'm trying to get the css class "button-red" to be assigned to the <input> button so the html ends up as:
I was hoping to find a "Button-CssClass" property in the GridButtonColumn, but no such luck. Support told me to use the ItemDataBound event to add the class to the input button. Even though I'm doing this now, this seems like overkill for such a simple issue. Although I don't think it's much to ask to add a Button-CssClass property to the GridButtonColumn, it would really go great lengths in making the GridButtonColumn much more visually functional. Am I alone in this?
For example, I have a GridButtonColumn in my RadGrid like this:
<telerik:GridButtonColumn
ButtonType="PushButton"
CommandName="SendToCart"
Text="Send To Cart">
<ItemStyle
VerticalAlign="Top"
CssClass="button-red" />
</telerik:GridButtonColumn>
The problem is that the CssClass gets assigned to the table cell like this (which is almost useless for styling buttons using existing themes):
<td class="button-red" valign="top"> |
<input name="main_content_dynamic$WishlistItemsGridView$ctl00$ctl04$ctl00" value="Send To Cart" |
onclick="javascript:__doPostBack('main_content_dynamic$WishlistItemsGridView$ctl00$ctl04$ctl00','')" |
type="button"> |
</td> |
I'm trying to get the css class "button-red" to be assigned to the <input> button so the html ends up as:
<td valign="top"> |
<input name="main_content_dynamic$WishlistItemsGridView$ctl00$ctl04$ctl00" value="Send To Cart" |
onclick="javascript:__doPostBack('main_content_dynamic$WishlistItemsGridView$ctl00$ctl04$ctl00','')" |
type="button" |
class="button-red"> |
</td> |
I was hoping to find a "Button-CssClass" property in the GridButtonColumn, but no such luck. Support told me to use the ItemDataBound event to add the class to the input button. Even though I'm doing this now, this seems like overkill for such a simple issue. Although I don't think it's much to ask to add a Button-CssClass property to the GridButtonColumn, it would really go great lengths in making the GridButtonColumn much more visually functional. Am I alone in this?