hi,
I want to delete the grid record on button click inside the grid with confirmation but it not work my side please check my code and provide solutions.
my code is:
client side functions
function deletepermission() {
var add = 1;
if (add == 0)
{
bootbox.alert("You have no permissions to Delete Record"); return false;
}
else
{
bootbox.confirm("Are You Sure To Delete Record ?", function (result) {
if (result == true)
{ return true; }
});
}
<telerik:GridTemplateColumn AllowFiltering="false" UniqueName="Action" HeaderText="Action" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Button runat="server" ID="btnDelete" ToolTip="DeleteRecord" CommandName="DeleteButton" CommandArgument='<%# Eval("LandlordId") %>' Text="Delete" onclientclick="return deletepermission();" Height="22px"></asp:Button>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</telerik:GridTemplateColumn>
Thanks,
Rahul
I want to delete the grid record on button click inside the grid with confirmation but it not work my side please check my code and provide solutions.
my code is:
client side functions
function deletepermission() {
var add = 1;
if (add == 0)
{
bootbox.alert("You have no permissions to Delete Record"); return false;
}
else
{
bootbox.confirm("Are You Sure To Delete Record ?", function (result) {
if (result == true)
{ return true; }
});
}
<telerik:GridTemplateColumn AllowFiltering="false" UniqueName="Action" HeaderText="Action" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Button runat="server" ID="btnDelete" ToolTip="DeleteRecord" CommandName="DeleteButton" CommandArgument='<%# Eval("LandlordId") %>' Text="Delete" onclientclick="return deletepermission();" Height="22px"></asp:Button>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</telerik:GridTemplateColumn>
Thanks,
Rahul