I do not want to use "CommandItemTemplate".
I want to add a only button on CommandItem.
My code:
My code is Ok ...but It's a workaround.
Is there a cleaner way?
I want to add a only button on CommandItem.
My code:
<
CommandItemSettings
ShowExportToExcelButton
=
true
ExportToExcelImageUrl
=
"~/App_Themes/SETheme/SESkin/Grid/MyImage.gif"
/>
<
script
type
=
"text/javascript"
>
//
<![CDATA[
function MyFunction() {
}
//]]>
</
script
>
protected
void
radGrid_ItemCreated(
object
sender, Telerik.Web.UI.GridItemEventArgs e)
{
if
(e.Item
is
GridCommandItem)
{
e.Item.FindControl(
"InitInsertButton"
).Visible =
false
;
LinkButton Export = e.Item.FindControl(
"ExportToExcelButton"
)
as
LinkButton;
Export.OnClientClick =
"javascript:ExportTxt(); return false;"
;
}
}
My code is Ok ...but It's a workaround.
Is there a cleaner way?