I want to show a label message "Record deleted successfully" on deleting a record in readgrid, but the message should automatically fade out after a 5 seconds.
I have been able to do this on button click but don't know how to do this in a radgrid.
Here is the code:
ASPX:
<div id="del_error" style =" text-align:right; margin-right:20px;"><asp:Label ID="lbl_delete" runat="server" Style="white-space: nowrap" ForeColor="Red"></asp:Label></div><telerik:RadGrid ID="dgrBugs" runat="server" Width="98.7%" ShowStatusBar="true" AutoGenerateColumns="False"
OnDeleteCommand="RadGrid1_DeleteCommand" OnUpdateCommand="Update_DataGrid" AllowSorting="False"
AllowMultiRowSelection="False" AllowFilteringByColumn="false" Skin="Vista" AllowPaging="true"
PageSize="20">
-
-
-
-
-<telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="DeleteColumn"
HeaderText="Delete" ConfirmText="Are you sure to Delete?" /></telerik:RadGrid>In Code behind I am trying to do this way:
Public Sub RadGrid1_DeleteCommand(source As Object, e As Telerik.Web.UI.GridCommandEventArgs)
lbl_delete.Text = "Record deleted successfully"
dgrBugs.Rebind()
lbl_fade.Text = "<script>$(document).ready(function () {$('#del_error').hide(1000);});</script>"
End Sub