I have a Webpage in which two webparts are installed. This is a system wherin user can make holiday request and manager can approve or reject.
In 1st webpart The holiday requested by a user is shown in the gridview in a Pending state (to a Manager). Manager than has to click on the entry reflected in the gridview which than opens a Modal Dialog and set the status to approved in order to accept the users request.
In 2nd webpart: It consists of a date filter i.e a from date and to date, a dropdown list consisting of all the employees, a search button and a gridview. In this webpart all the Approved request are shown. On page load the gridview is blank and no entry is displayed. The entries are shown in grid only on click of search button and as per search criteria.Once manager approves the request from 1st webpart, the entry is than reflected in this 2nd webpart.
Now my issue is, when I hit a Search button may be for for all employees or for a single employee or by using the date range than all the results are displayed in grid but when i try to open a modal dialog from 1st webpart and change the status to approved and click save i get an IE error as shown in below image.
If i click retry than everything works fine but if i press cancel than the approved state of the request is not reflected.
I want to get rid of this IE error message either by somehow displaying a custom error message or any other way, but it should keep the search results in the grid.
I have done
location.reload(true); on click of save in modal pop up. This shows IE error, I also tried
SP.UI.ModalDialog.RefreshPage(DialogResult.OK); but this does not refresh the page.
Please guide me how to go away with the error message.