Dear
Princy,
Thanx for ur reply.
when i added the button and window control in asp update panel its working fine and no flickering happens. but window re-opens when i close it.
I have put a function on OnClintClose event on the parent page which binds the grid after closing the window..
Below is the code : Please suggest me what to do.. Thanx in advance.
aspx code:
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
<script type="text/javascript">
function OnClientClose(oWnd, args) {
$get('<%=btnCheck.ClientID%>').click();
}
</script>
</telerik:RadCodeBlock>
<asp:UpdatePanel ID="aa14" runat="server">
<ContentTemplate>
<telerik:RadWindowManager ID="RadWinMan2" runat="server">
<Windows>
<telerik:RadWindow ID="RadWinRafat" runat="server">
</telerik:RadWindow>
</Windows>
</telerik:RadWindowManager>
<asp:Button ID="btnCheck" runat="server" Text="Check" SkinID="Button" Style="visibility: hidden;" OnClick="btnCheck_Click" />
<asp:Button ID="btnAddtogrid" runat="server" OnClick="btnAddtogrid_Click" CssClass="buttonBlue" ValidationGroup="add" CausesValidation="false" Text="Add to Prescription" Width="125px" OnClientClick="return DrugValidation('ctl00_ContentPlaceHolder1_ddlunit_DropDown','ctl00_ContentPlaceHolder1_txtQtyAmount','ctl00_ContentPlaceHolder1_txt_Days');" />
</ContentTemplate>
</asp:UpdatePanel>
Code behind :
RadWinRafat.NavigateUrl = "~/EMR/Medication/MedicationCheckMsg.aspx?DrugId=" + strDrugId;
RadWinRafat.Height = 530;
RadWinRafat.Width = 468;
RadWinRafat.Top = 40;
RadWinRafat.Left = 100;
RadWinRafat.Modal = true;
RadWinRafat.Behaviors = WindowBehaviors.Maximize | WindowBehaviors.Close | WindowBehaviors.Move | WindowBehaviors.Pin;
RadWinRafat.OnClientClose = "OnClientClose";
RadWinRafat.VisibleOnPageLoad = true; // Set this property to True for showing window from code
RadWinRafat.DestroyOnClose = true;
RadWinMan2.DestroyOnClose = true;
protected void btnCheck_Click(object sender, EventArgs e)
{
if (Convert.ToString(Session["Override"]) == "1")
{
AddToGrid();
btnAddtogrid.Text = "Add to Prescription";
btnAddToDailyMedication.Text = "Add to Daily Medications";
lstdrug.SelectedIndex = -1;
}
}