How to add a custom button in Telerik MVC Grid Column with Edit and delete Button

Telerik MVC Razor Code :
columns.Command(commands =>
{
commands.Edit().ButtonType(GridButtonType.Image);                                    commands.Custom("myButtonName").ButtonType(GridButtonType.Image).Action("myAction","myController").Ajax(true);
commands.Delete().ButtonType(GridButtonType.Image);
});



Javascript Code :
You can also assign a custom style to the button by using client side event onRowDataBound. Here is the code.

function onRowDataBound(e) {

var del = $(e.row).find($('.t-icon.t-ProcessPayment'));
        del.css('background-image', 'url("/Content/Images/SettingsBG.png")');
        del.css('background-repeat', 'no-repeat;');
        del.css('background-position-x', 0);
        del.css('background-position-y', 0);
}


                                                               


Comments

Popular Posts

GREYCstoration Oil Paint plugin for Photoshop

Apple iPhone sending SMS automatically 00447786205094

SharePoint online hub navigation not updating for other users

Service Bus Gateway service stuck at Starting

RangeError: Maximum call stack size exceeded | Node JS | SPFX React