Apply Bootstrap icons to GridView CommandField Buttons in ASP.Net

Last Reply 29 days ago By pandeyism

Posted 29 days ago

Hi all,

With reference to below link.

https://www.aspsnippets.com/Articles/Simple-Insert-Select-Edit-Update-and-Delete-in-ASPNet-GridView-control.aspx

Is it possible to show custom buttons or bootstrap icon buttons in gridview to edit ,update ,delete the data.

Thanx in Advance.

 

You are viewing reply posted by: pandeyism 29 days ago.
Posted 29 days ago

Hi Waghmare,

Please use below code.

HTML

<asp:CommandField ButtonType="Link" ShowEditButton="true" ShowDeleteButton="true"
EditText="<i aria-hidden='true' class='glyphicon glyphicon-pencil'></i>" DeleteText="<i aria-hidden='true' class='glyphicon glyphicon-trash'></i>"
CancelText="<i aria-hidden='true' class='glyphicon glyphicon-remove'></i>" UpdateText="<i aria-hidden='true' class='glyphicon glyphicon-floppy-disk'></i>" />