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

Open RadWindow after edit or insert

3 Answers 78 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Erik Kipp
Top achievements
Rank 1
Erik Kipp asked on 29 Mar 2010, 03:59 PM
How can I open a radwindow after an insert, delete or edit operation?  If need to show confirmation that the operation succeeded.  I would also like to show a dialog after an insert asking the user if they want to do another insert operation without going back to the grid and clicking the add button.


I've tried this

RadWindowManager1.Windows[0].VisibleOnPageLoad = true;

But it doesn't work.

Thanks



3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 30 Mar 2010, 06:03 AM

Hello Erik,

Have you ajaxified the grid using AjaxManager? If so you need to set the AjaxSettings correspondingly to update RadWindowManager control also. Here is the code that worked for me.

aspx:

 
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
    <AjaxSettings>  
        <telerik:AjaxSetting AjaxControlID="RadGrid1">  
            <UpdatedControls>  
                <telerik:AjaxUpdatedControl ControlID="RadGrid1" />  
                <telerik:AjaxUpdatedControl ControlID="RadWindowManager1" />  
            </UpdatedControls>  
        </telerik:AjaxSetting>  
    </AjaxSettings>  
</telerik:RadAjaxManager> 

cs:

 
protected void RadGrid1_ItemInserted(object source, GridInsertedEventArgs e)  
{  
    RadWindowManager1.Windows[0].VisibleOnPageLoad = true;  

Another option to open window from server code is by using RegisterStartupScript() method as described in the forum.

Opening rad window

Hope this helps,

Shinu.

0
Erik Kipp
Top achievements
Rank 1
answered on 30 Mar 2010, 01:50 PM
I was missing  <telerik:AjaxUpdatedControl ControlID="RadWindowManager1" />  

Thank you
0
Erik Kipp
Top achievements
Rank 1
answered on 07 Apr 2010, 02:13 PM
This is working for me now but with each postback the window pops up, is there a way to get the window to show 1 time? In my test app I can make the window pop up using RegisterStartupScript or create a new radwindow then do form1.Controls.Add(newwindow); but in my app with master pages they don't work. 
Tags
Grid
Asked by
Erik Kipp
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Erik Kipp
Top achievements
Rank 1
Share this question
or