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

Custom InsertCommand

1 Answer 48 Views
Grid
This is a migrated thread and some comments may be shown as answers.
William
Top achievements
Rank 1
William asked on 01 Oct 2011, 06:31 PM
I have followed most of the following thread:
http://www.telerik.com/community/forums/aspnet-ajax/grid/custom-insertcommand.aspx
However I can't get the radwindow to show.  If I run the code from a button click event it opens and displays fine if I run it from the

RadGrid1_ItemCommand then it does not show.  I know that event is firing since I have a trace log file within the process.

If e.CommandName = RadGrid.InitInsertCommandName Then
           e.Canceled = True
 
           Dim newwindow As Telerik.Web.UI.RadWindow = New Telerik.Web.UI.RadWindow()
           newwindow.ID = "RadWindow1"
           newwindow.NavigateUrl = "/portals/0/NewEducation.aspx?RecID=0"
           newwindow.OnClientClose = "OnClientClose"
           newwindow.Width = New Unit(650)
           newwindow.Height = New Unit(580)
           newwindow.VisibleOnPageLoad = True
           newwindow.Modal = True
           RadWindowManager1.Windows.Clear()
           RadWindowManager1.Controls.Add(newwindow)
       End If

Please help.  Thanks

My grid is in an asp.update panel

Added information.  It seems that it's an issue with Ajax.  I removed the asp.update panel and it works fine but with a postback I added a
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
       <AjaxSettings>
           <telerik:AjaxSetting AjaxControlID="RadGrid1">
               <UpdatedControls>
                   <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
               </UpdatedControls>
           </telerik:AjaxSetting>
       </AjaxSettings>
   </telerik:RadAjaxManager>
 and again it does not show. Is there a way to have the best of both worlds?  Ajax and also a custom window when the add new record is clicked? 

1 Answer, 1 is accepted

Sort by
0
William
Top achievements
Rank 1
answered on 02 Oct 2011, 09:49 PM
I got it.  It was a problem with the update panel
Tags
Grid
Asked by
William
Top achievements
Rank 1
Answers by
William
Top achievements
Rank 1
Share this question
or