I have a call to display a radwindow alert after a record update in the rad grid 'UpdateCommand' like so:
Everything regarding the update works properly but the display alert does not show. If I select a different record on the grid to display or edit then all of a sudden the alert will show up correctly....
Here is my window manager from the aspx page which only displays a radWindow I use for a different purpose.
| Protected Sub grid_dealerships_UpdateCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles grid_dealerships.UpdateCommand |
| Dim editedItem As GridEditableItem = TryCast(e.Item, GridEditableItem) |
| Dim dealer_id As String = editedItem.OwnerTableView.DataKeyValues(editedItem.ItemIndex)("dealer_id") |
| Try |
| Dim dealer_name As String = (TryCast(editedItem.FindControl("txt_dealer_name"), TextBox)).Text |
| Dim logged As Integer = Dealership_DataAccess.UpdateDealershipInformation(dealer_id, dealer_name) |
| IF logged > 0 then |
| DisplayMessage(String.Format("Dealership: <br/><br/><b>{0} - {1}</b><br/><br/> Was UPDATED SUCCESSFULLY!", dealer_id, dealer_name), "Dealership UPDATED") |
| End If |
| Catch ex As Exception |
| DisplayMessage("Unable to update dealership record. Reason: " + ex.Message, "Update ERROR") |
| e.Canceled = True |
| End Try |
| End Sub |
| Private Sub DisplayMessage(ByVal text As String, ByVal title As String) |
| RadAjaxManager1.ResponseScripts.Add("Sys.Application.add_load(function(){radalert('" & text & "', 330, 210, '" & title & "');})") |
| End Sub |
Everything regarding the update works properly but the display alert does not show. If I select a different record on the grid to display or edit then all of a sudden the alert will show up correctly....
Here is my window manager from the aspx page which only displays a radWindow I use for a different purpose.
| <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> |
| <script type="text/javascript"> |
| function ShowDealerIDs() { |
| window.radopen("../shared/dealerID_list.aspx", "UserListDialog"); |
| return false; |
| } |
| </script> |
| </telerik:RadCodeBlock> |
| <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="RadAjaxManager1"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="grid_dealerships" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| <telerik:AjaxSetting AjaxControlID="grid_dealerships"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="grid_dealerships" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManager> |
| <telerik:RadWindowManager ID="RadWindowManager1" runat="server"> |
| <Windows> |
| <telerik:RadWindow Skin="Default" ID="UserListDialog" runat="server" Title="User List Dialog" Height="800px" |
| Width="550px" Left="100px" ReloadOnShow="true" Modal="true" /> |
| </Windows> |
| </telerik:RadWindowManager> |