This is a migrated thread and some comments may be shown as answers.

Rad Window Getting Poped Up on wrong events

1 Answer 37 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Naresh
Top achievements
Rank 1
Naresh asked on 05 Oct 2012, 09:21 AM
Hi

I am opening a Radwindow in the edit command of RadGrid. The problem is that the Rad Window gets opened on other events also like delete command or DetailTableDataBind or changing radgrid list size through UI.. etc...

Please let me know where I am going wrong.
 

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 05 Oct 2012, 10:13 AM
Hi Naresh,

I suppose you are opening the window using VisibleOnPageLoad property. So the window reappears after each postback. Try the following code to open radwindow.
C#:
protected void RadGrid2_ItemCommand(object sender, GridCommandEventArgs e)
{
   if (e.CommandName == RadGrid.EditCommandName)
   {
     string script = "function f(){$find(\"" + RadWindow1.ClientID + "\").show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);";
     ScriptManager.RegisterStartupScript(Page, Page.GetType(), "key", script, true);
   }
}
Please provide our code if it doesn't helps.

Thanks,
Princy.
Tags
General Discussions
Asked by
Naresh
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or