Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
165 views
Hi,


Can some please help me in getting date from database table column..ASAP..

 <MasterTableView DataKeyNames="ID" CommandItemDisplay="TopAndBottom"  EditMode="PopUp" DataSourceID="DS1">

I was using the above code for editing data with a pop-up.
My edit is working fine...but the add button... is not l working..It says the specific cast is Invalid...once I remove the date fields then i get the add button working...

My field:
   <telerik:GridBoundColumn UniqueName="TechnicalDateofEntry" HeaderText="TechnicalDateofEntry" DataField="TechnicalDateofEntry" DataFormatString="{0:d}">

Edit template:
                            <td>
                               DateofEntry  
                            </td>
                            <td>
                                <telerik:RadDatePicker ID="TextBox17" runat="server"  SelectedDate='<%# Bind( "TechnicalDateofEntry") %>'>
                                </telerik:RadDatePicker>
                            </td>
                 
 <InsertParameters>
                  
                    <asp:Parameter Name="TechnicalDateofEntry" Type="DateTime" />
                   
                                       
                </InsertParameters>


.I have the attached error...plz let me know wats causing this issue..Am i missing casting anywhere...all I declared is date time..

I was update the records with out any casting...Why is it asking cast for inserting the data...????


followed the below article:


http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/templateformupdate/defaultcs.aspx  

please advise
Thanks a lot..  


            
S
Top achievements
Rank 1
 answered on 20 Dec 2011
3 answers
136 views
Hi
I have grid control on my page

<

 

 

Rad:RadGrid Width="100%" Height="100%" EnableAJAX="true" ID="grdDispatchedStaff" style="border:0;" runat="server" AllowPaging="False" AllowSorting="True"

 

 

 

AllowMultiRowSelection="false" AutoGenerateColumns="false"

 

 

 

OnNeedDataSource ="GridDispatchedStaffNeedDataSource" >

 

 

 

<MasterTableView DataKeyNames="DispatchAssignmentGUID" ClientDataKeyNames="DispatchAssignmentGUID" AllowNaturalSort="false" TableLayout="Fixed" >

 

 

 

<HeaderStyle Height="18px" Font-Names="Tahoma" Font-Size="7pt" Font-Bold="true"/>

 

 

 

<ItemStyle CssClass="RowModified" />

 

 

 

<AlternatingItemStyle CssClass="RowModified" />

 

 

 

<Columns>

 

 

 

<Rad:GridBoundColumn UniqueName="DispatchAssignmentGUID" SortExpression="DispatchAssignmentGUID" HeaderText="DispatchAssignmentGUID" DataField="DispatchAssignmentGUID" Visible="false" />

 

 

 

<Rad:GridBoundColumn UniqueName="FullName" SortExpression="FullName" HeaderStyle-Width="8%" HeaderText="Name" DataField="FullName" DataFormatString="<nobr>{0}&nbsp;</nobr>"/>

 

 

 

<Rad:GridBoundColumn UniqueName="RadioID" SortExpression="RadioID" HeaderStyle-Width="8%" HeaderText="Radio ID" DataField="RadioID" DataFormatString="<nobr>{0}&nbsp;</nobr>"/>

 

 

 

<Rad:GridBoundColumn UniqueName="CallSign" SortExpression="CallSign" HeaderStyle-Width="8%" HeaderText="Call Sign" DataField="CallSign" DataFormatString="<nobr>{0}&nbsp;</nobr>"/>

 

 

 

<Rad:GridBoundColumn UniqueName="ReferenceID" SortExpression="ReferenceID" HeaderStyle-Width="8%" HeaderText="Ref. ID" DataField="ReferenceID" DataFormatString="{0:d}"/>

 

 

 

<Rad:GridBoundColumn UniqueName="DispatchRole" SortExpression="DispatchRole" HeaderStyle-Width="7%" HeaderText="Role" DataField="DispatchRole" DataFormatString="<nobr>{0}&nbsp;</nobr>"/>

 

 

 

<Rad:GridBoundColumn UniqueName="DispatchTime" SortExpression="DispatchTime" HeaderStyle-Width="11%" HeaderText="Dispatch Time" DataField="DispatchTime" DataFormatString="<nobr>{0}&nbsp;</nobr>"/>

 

 

 

<Rad:GridBoundColumn UniqueName="ETA" SortExpression="ETA" HeaderStyle-Width="11%" HeaderText="ETA" DataField="ETA" DataFormatString="<nobr>{0}&nbsp;</nobr>"/>

 

 

 

<Rad:GridBoundColumn UniqueName="ArrivalTime" SortExpression="ArrivalTime" HeaderStyle-Width="11%" HeaderText="Arrival Time" DataField="ArrivalTime" DataFormatString="<nobr>{0}&nbsp;</nobr>"/>

 

 

 

<Rad:GridBoundColumn UniqueName="ArrivalCode" SortExpression="ArrivalCode" HeaderStyle-Width="9%" HeaderText="Arrival Code" DataField="ArrivalCode" DataFormatString="<nobr>{0}&nbsp;</nobr>"/>

 

 

 

<Rad:GridBoundColumn UniqueName="ClearTime" SortExpression="ClearTime" HeaderStyle-Width="11%" HeaderText="Clear Time" DataField="ClearTime" DataFormatString="<nobr>{0}&nbsp;</nobr>"/>

 

 

 

<Rad:GridBoundColumn UniqueName="ClearCode" SortExpression="ClearCode" HeaderStyle-Width="8%" HeaderText="Clear Code" DataField="ClearCode" DataFormatString="<nobr>{0}&nbsp;</nobr>"/>

 

 

 

</Columns>

 

 

 

</MasterTableView>

 

 

 

<ClientSettings AllowDragToGroup="False">

 

 

 

<Resizing AllowColumnResize="True" EnableRealTimeResize="true" AllowResizeToFit="true"></Resizing>

 

 

 

<Selecting AllowRowSelect="true" />

 

 

 

<Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True" ScrollHeight="100%"></Scrolling>

 

 

 

<ClientEvents OnRowContextMenu="RowContextMenu" OnRowDblClick="GridDblClick" OnRowClick="GridRowClick"></ClientEvents>

 

 

 

</ClientSettings>

 

</

 

 

Rad:RadGrid>

 


and event handler in code behind

 

 

protected void GridDispatchedStaffNeedDataSource(object sender, GridNeedDataSourceEventArgs e)

 

{

 

 

this.LoadGrid();

 

}


where

 

 

private void LoadGrid()

 

{

 

 

this.grdDispatchedStaff.DataSource = this.DataSource.DispatchAssignment;

 

}


this.DataSource is using DataSet from Session.

I have updated DataSet by adding another row and want to Rebuind Grid. The doc says I can't user bind or rebind with OnNeedDataSource. How can I refresh Grid on the page if data sourcer was changed.
Thanks.
Vladimir



Vladimir
Top achievements
Rank 1
 answered on 20 Dec 2011
4 answers
159 views
Hi,

on my web part there are some comboboxes. The comboboxes are defined in code behind (google like filtering for RadGrid).
_filterbox.EnableLoadOnDemand = true;
_filterbox.AutoPostBack = true;

When I'm clicking into a combobox and leave it without doing a selection or entering text, a postback will be rised. Why?
How can I prevent this?

I'm using the newest Telerik verion.

regards,
Ralf


Ralf
Top achievements
Rank 1
 answered on 20 Dec 2011
7 answers
300 views

Having a little trouble trying to create a dynamic button - if I add an image URL I simply get my image...

tbBtn = New RadToolBarButton
tbBtn.ImageUrl = "trans.gif"
rfeMediaManager.ToolBar.Items.Add(tbBtn)
 

As soon as I add a text value a default telerik refresh image appears...?

tbBtn = New RadToolBarButton
tbBtn.ImageUrl = "trans.gif"   
tbBtn.Text = "Standard Mode"
rfeMediaManager.ToolBar.Items.Add(tbBtn)

How can I have only my own image and text?

Ashok
Top achievements
Rank 1
 answered on 20 Dec 2011
2 answers
133 views
I have the following problem, I have this code:

<telerik:RadSplitter ID="Radsplitter5" runat="server" Height="655px" Width="100%"
            Skin="Office2010Black">
        <telerik:RadPane ID="Radpane9" runat="server" Width="215px" Scrolling="None">
           <telerik:RadPanelBar runat="server" ID="RadPanelBar1" ExpandMode="FullExpandedItem"
           Skin="Office2010Black" Height="655px" Width="100%">
            <Items>
                <telerik:RadPanelItem Text="Moviles" Expanded="true" >
                    <Items>
                        <telerik:RadPanelItem Value="Moviles">
                            <ItemTemplate>
                            <asp:Panel ID="Panel1" runat="server" Height="445px" ScrollBars="Vertical">
                               <telerik:RadTreeView ID="TreeView1" CheckBoxes="true" Runat="server" TriStateCheckBoxes="true" CheckChildNodes="true" OnLoad="OnTreeLoad" OnClientContextMenuItemClicking="onClientContextMenuItemClicking"
                OnClientContextMenuShowing="onClientContextMenuShowing" OnClientNodeClicking="onNodeClicking" OnClientNodeChecked="ClientNodeChecked" Font-Size="Smaller">
                                <ContextMenus>
                    <telerik:RadTreeViewContextMenu ID="MainContextMenu" runat="server">
                        <Items>
                            <telerik:RadMenuItem Value="UltimasPosiciones" Text="Ultimas Posiciones">
                            </telerik:RadMenuItem>
                            <telerik:RadMenuItem Value="LimpiarPosiciones" Text="Limpiar Posiciones" Visible="false">
                            </telerik:RadMenuItem>
                        </Items>
                        <CollapseAnimation Type="none" />
                    </telerik:RadTreeViewContextMenu>
                </ContextMenus>
    </telerik:RadTreeView></asp:Panel>


I need to know how to access the treeview using javascript.
Use this, and nothing:

var tree = $find('<%=RadPanelBar1.Items[0].FindControl("Treeview1").ClientID %>');

I do not know how, thank you very much beforehand.

Greetings.
mauricio
Top achievements
Rank 1
 answered on 20 Dec 2011
1 answer
148 views
I've just installed the controls and I'm not able to select a skin other than the default skin for RadGrid. I have added the dlls to my bin folder design, UI, UISkins, and XML. Is there another setup I have to do?
Celeste
Top achievements
Rank 1
 answered on 20 Dec 2011
3 answers
138 views
Hi,

I have a situation where I need to add usercontrols dynamically & in those usercontrols add RadDocks dynamically which itself contains usercontrol.

Following is the code I am using to add RadDocks in parent usercontrol

in .ascx
<telerik:RadDockLayout runat="server" ID="QuestionsDockLayout">
                   <telerik:RadDockZone ID="RadDockZone1" runat="server"/>
                      </telerik:RadDockLayout>
 
in .ascx.cs
private bool _shouldSavesState = false;
 
      protected void Page_Init(object sender, EventArgs e)
      {
          QuestionsDockLayout.SaveDockLayout += QuestionsDockLayout_SaveDockLayout;       
 
              LoadQuestions();
      }
 
      private void LoadQuestions()
      {
 
          foreach (var zone in QuestionsDockLayout.RegisteredZones)
          {
              zone.Docks.Clear();
              zone.Controls.Clear();
          }
 
          if (!string.IsNullOrEmpty(XmlNode_Page))
          {
              XmlDocument xmldoc_page = new XmlDocument();
 
              xmldoc_page.Load(new StringReader(XmlNode_Page));
 
              
              XmlNodeList nodePages = xmldoc_page.SelectNodes("//Question");
 
              if (nodePages != null && nodePages.Count > 0)
              {
                  for (int i = 0; i < nodePages.Count; i++)
                  {
                      RadDock radDock = new RadDock();
                      radDock.ID = "dockPanel_" + this.ID + "_Q" + i;
                       
                     radDock.AutoPostBack = true;
                       
                      radDock.Resizable = false;
                      radDock.DockMode = DockMode.Docked;                     
                      radDock.DockHandle = DockHandle.None;
                      radDock.OnClientInitialize = "SetHandleDock";
                      QuestionsDockLayout.RegisteredZones[0].Controls.Add(radDock);
 
                      XmlNode XnodeQuestion = nodePages[i];
                      UC_SurveyQuestion SQ = (UC_SurveyQuestion)LoadControl("~/UserControls/UC_SurveyQuestion.ascx");
                      SQ.ID = XnodeQuestion.Attributes["id"].Value;
                      SQ.XmlNode_Question = XnodeQuestion.OuterXml;
                      SQ.Page_ID = this.ID;
 
                      HtmlImage img = SQ.FindControl("Handle") as HtmlImage;
                      img.ClientIDMode = System.Web.UI.ClientIDMode.Static;
                      img.ID = "Handle_" + radDock.ClientID;
 
                      radDock.ContentTemplate = new CompiledTemplateBuilder(parent =>
                      parent.Controls.Add(SQ)
                          );
 
                      radDock.DockPositionChanged += dock_DockPositionChanged;
                      
                       
                  }
              }
             
          
      }
 
    
      private void dock_DockPositionChanged(object sender, DockPositionChangedEventArgs e)
      {
          //if dock position was changed set a flag for saving dock state
          _shouldSavesState = true;
      }
 
      private void QuestionsDockLayout_SaveDockLayout(object sender, DockLayoutEventArgs e)
      {
          //Save dock panels state in user's profile
          if (_shouldSavesState)
          {
              List<DockState> lst = QuestionsDockLayout.GetRegisteredDocksState();
          }
      }


Now the problem is when I change the positions of RadDock Panels changes to state doesn't persist.
In SaveDockLayout event GetRegisteredDockState method returns the same state of docks as when they are added.

I am not using LoadDockLayout event as indices of RadDocks are same as they are added.

I must be making some silly mistake.

Please help me asap.

Regards,
Suraj Patil
Slav
Telerik team
 answered on 20 Dec 2011
2 answers
277 views
Hi there,

My upload process take a little while longer (around 30-40 secs in total) as it calls another application to execute extra actions in the same upload function. I want the progress bar to show the real percentage of this process. Can anyone please give me some advice on how I can do this? I have read this demo, but the progress seems like a fake percentage of the upload process. Any help would be greatly appreciated.

Best regards,
Meng
Meng
Top achievements
Rank 1
 answered on 20 Dec 2011
1 answer
87 views
Is it possible to force "View Gridlines" in Excel to be checked, through code?

Thanks!
Daniel
Telerik team
 answered on 20 Dec 2011
2 answers
143 views
Hi Telerik,

I have the following page (DockingTest.aspx):

<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="MasterPage.Master" CodeBehind="DockingTest.aspx.vb" Inherits="DockingTest" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register tagPrefix="ctl" tagName="GridTest" src="GridTest.ascx" %>
  
<asp:Content ID="Content1" ContentPlaceHolderID="AppContentTitle" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="AppContent" runat="server">
    <asp:Label ID="lblMessage" runat="server" EnableViewState="false" Visible="false" />
    <form id="Form1" runat="server">
        <ctl:GridTest ID="ctlGridTest" runat="server" Visible="true" />
    </form>
</asp:Content>

It uses a user control (GridTest.ascx):

<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="GridTest.ascx.vb" Inherits="GridTest" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
  
<asp:ScriptManager ID="ScriptManager1" runat="server"/>
<asp:Label ID="lblMessage" runat="server" EnableViewState="false" Visible="false" />
<telerik:RadGrid ID="rgGrid" 
                runat="server"
                Skin="Default"
                GridLines="both" 
                BorderStyle="outset" 
                BorderWidth="3" 
                PageSize="15" 
                AllowPaging="True" 
                style="width:100%;" 
                AutoGenerateColumns="false" 
                AllowSorting="true" 
                ShowStatusBar="true" 
                AllowAutomaticDeletes="false" 
                AllowAutomaticInserts="false" 
                ItemStyle-BackColor="AliceBlue"
                AlternatingItemStyle-BackColor="Lightyellow"
                AllowAutomaticUpdates="false">
                <PagerStyle Mode="Advanced" />
                <MasterTableView Width="100%" DataKeyNames="ZONE_ID" TableLayout="Auto"
                    CommandItemDisplay="TopAndBottom" EditMode="popUp" ExpandCollapseColumn-ButtonType="pushButton" Name="Template" ShowHeadersWhenNoRecords="true">
                    <Columns>
                        <telerik:GridEditCommandColumn UniqueName="Edit">
                        </telerik:GridEditCommandColumn>
                        <telerik:GridBoundColumn DataField="ZONE_ID" HeaderText="Zone ID" UniqueName="ZONE_ID">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="ZONE_TYPE" HeaderText="Zone Type" UniqueName="ZONE_TYPE">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="ZONE_CONTENT" HeaderText="Zone Content" UniqueName="ZONE_CONTENT">
                        </telerik:GridBoundColumn>
                        <telerik:GridButtonColumn ConfirmText="W A R N I N G !!! You are about to delete this zone. Do you still want to continue?" ConfirmDialogType="RadWindow" ConfirmTitle="Delete" 
                            ButtonType="LinkButton" CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">
                        </telerik:GridButtonColumn>
                    </Columns>
                    <EditFormSettings UserControlName="DocksDynamic.ascx" EditFormType="WebUserControl" PopUpSettings-Modal="true"  >
                    </EditFormSettings>
                </MasterTableView>
</telerik:RadGrid>

The grid uses an edit form user control (DocksDynamic.ascx):

 

<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="DocksDynamic.ascx.vb" Inherits="DocksDynamic" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
  
<asp:Button runat="server" CssClass="button" ID="ButtonAddDock" Text="Add Dock" OnClick="ButtonAddDock_Click" />
<asp:Button runat="server" ID="ButtonPostback" CssClass="button" Text="Make Postback" />
<br />
<br />
<asp:UpdatePanel runat="server" ID="UpdatePanel1">
    <ContentTemplate>
        <telerik:RadDockLayout runat="server" ID="RadDockLayout1" OnSaveDockLayout="RadDockLayout1_SaveDockLayout" OnLoadDockLayout="RadDockLayout1_LoadDockLayout">
            <telerik:RadDockZone runat="server" ID="RadDockZone1" Width="300" MinHeight="200"
                Style="float: left; margin-right: 20px;">
            </telerik:RadDockZone>
            <telerik:RadDockZone Width="300" MinHeight="200" runat="server" ID="RadDockZone2"
                Style="float: left;">
            </telerik:RadDockZone>
        </telerik:RadDockLayout>
    </ContentTemplate>
    <Triggers>
        <asp:AsyncPostBackTrigger ControlID="ButtonAddDock" EventName="Click" />
    </Triggers>
</asp:UpdatePanel>


Below is code-behind for DocksDynamic.ascx.vb:

Imports Telerik.Web.UI
  
    Partial Public Class DocksDynamic
        Inherits System.Web.UI.UserControl
        Private Property CurrentDockStates() As List(Of DockState)
            Get
                'Store the info about the added docks in the session. For real life
                ' applications we recommend using database or other storage medium 
                ' for persisting this information.
                Dim _currentDockStates As List(Of DockState) = DirectCast(Session("CurrentDockStatesDynamicDocks"), List(Of DockState))
                If [Object].Equals(_currentDockStates, Nothing) Then
                    _currentDockStates = New List(Of DockState)()
                    Session("CurrentDockStatesDynamicDocks") = _currentDockStates
                End If
                Return _currentDockStates
            End Get
            Set(value As List(Of DockState))
                Session("CurrentDockStatesDynamicDocks") = value
            End Set
        End Property
  
        Private Function CreateRadDockFromState(state As DockState) As RadDock
            Dim dock As New RadDock()
            dock.DockMode = DockMode.Docked
            dock.ID = String.Format("RadDock{0}", state.UniqueName)
            dock.ApplyState(state)
            dock.Commands.Add(New DockCloseCommand())
            dock.Commands.Add(New DockExpandCollapseCommand())
  
            Return dock
        End Function
  
        Private Function CreateRadDock() As RadDock
            Dim docksCount As Integer = CurrentDockStates.Count
  
            Dim dock As New RadDock()
            dock.DockMode = DockMode.Docked
            dock.UniqueName = Guid.NewGuid().ToString().Replace("-", "a")
            dock.ID = String.Format("RadDock{0}", dock.UniqueName)
            dock.Title = "Dock"
            dock.Text = String.Format("Added at {0}", DateTime.Now)
            dock.Width = Unit.Pixel(300)
  
            dock.Commands.Add(New DockCloseCommand())
            dock.Commands.Add(New DockExpandCollapseCommand())
  
            Return dock
        End Function
  
        Private Sub CreateSaveStateTrigger(dock As RadDock)
            'Ensure that the RadDock control will initiate postback
            ' when its position changes on the client or any of the commands is clicked.
            'Using the trigger we will "ajaxify" that postback.
            dock.AutoPostBack = True
            dock.CommandsAutoPostBack = True
  
            AddHandler dock.DockPositionChanged, AddressOf Me.DockPositionChanged
  
            'Dim saveStateTrigger As New AsyncPostBackTrigger()
            'saveStateTrigger.ControlID = dock.ID
            'saveStateTrigger.EventName = "DockPositionChanged"
            'UpdatePanel1.Triggers.Add(saveStateTrigger)
  
            'saveStateTrigger = New AsyncPostBackTrigger()
            'saveStateTrigger.ControlID = dock.ID
            'saveStateTrigger.EventName = "Command"
            'UpdatePanel1.Triggers.Add(saveStateTrigger)
        End Sub
  
        Protected Sub DockPositionChanged(ByVal sender As Object, ByVal e As DockPositionChangedEventArgs)
            Dim str As String = ""
            'Put a break here
        End Sub
  
        Private Sub Page_Init(sender As Object, e As System.EventArgs) Handles Me.Init
            'Recreate the docks in order to ensure their proper operation
            Dim i As Integer = 0
            While i < CurrentDockStates.Count
                Dim dock As RadDock = CreateRadDockFromState(CurrentDockStates(i))
                'We will just add the RadDock control to the RadDockLayout.
                ' You could use any other control for that purpose, just ensure
                ' that it is inside the RadDockLayout control.
                ' The RadDockLayout control will automatically move the RadDock
                ' controls to their corresponding zone in the LoadDockLayout
                ' event (see below).
                RadDockLayout1.Controls.Add(dock)
                'We want to save the dock state every time a dock is moved.
                CreateSaveStateTrigger(dock)
                System.Math.Max(System.Threading.Interlocked.Increment(i), i - 1)
            End While
        End Sub
  
        Protected Sub RadDockLayout1_LoadDockLayout(sender As Object, e As DockLayoutEventArgs) Handles RadDockLayout1.LoadDockLayout
            'Populate the event args with the state information. The RadDockLayout control
            ' will automatically move the docks according that information.
            For Each state As DockState In CurrentDockStates
                e.Positions(state.UniqueName) = state.DockZoneID
                e.Indices(state.UniqueName) = state.Index
            Next
        End Sub
  
        Protected Sub RadDockLayout1_SaveDockLayout(sender As Object, e As DockLayoutEventArgs) Handles RadDockLayout1.SaveDockLayout
            'Save the dock state in the page Session. This will enable us 
            ' to recreate the dock in the next Page_Init. 
            CurrentDockStates = RadDockLayout1.GetRegisteredDocksState()
        End Sub
  
        Protected Sub ButtonAddDock_Click(sender As Object, e As System.EventArgs)
            Dim dock As RadDock = CreateRadDock()
            RadDockZone1.Controls.Add(dock)
            CreateSaveStateTrigger(dock)
        End Sub
  
    End Class

The issue that I'm facing is this.

With the setup above (SETUP 1): DocksDynamics.ascx is used as an EditForm user control for the GridTest.ascx user control's RadGrid that is used by the DockingTest.aspx page ...

For some reason, the RadDockLayout1_LoadDockLayout event is never fired when I click Edit in any of the records in the RadGrid or whenever I add a dock or move a dock from one zone to another.

Furthermore, when I click the Add Dock  button, it is able to add one dock, but when I click it a second time, I get the following error message:

Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Cannot unregister UpdatePanel with ID 'UpdatePanel1' since it was not registered with the ScriptManager. This might occur if the UpdatePanel was removed from the control tree and later added again, which is not supported.
Parameter name: updatePanel


BUT, if I change my setup to be like this (SETUP 2): DocksDynamics.ascx (with a Script Manager added to it) is used directly in DockingTest.aspx page and not from within a RadGrid in a separate user control, the RadDockLayout1_LoadDockLayout event gets fired.

<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="MasterPage.Master" CodeBehind="DocksTest.aspx.vb" Inherits="DocksTest" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register tagPrefix="ctl" tagName="DocksDynamic" src="DocksDynamic.ascx" %>
  
<asp:Content ID="Content1" ContentPlaceHolderID="AppContentTitle" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="AppContent" runat="server">
    <asp:Label ID="lblMessage" runat="server" EnableViewState="false" Visible="false" />
    <form id="Form1" runat="server">
        <ctl:DocksDynamic ID="ctlDocksDynamic" runat="server" Visible="true" />
    </form>
</asp:Content>

Why does the RadDockLayout1_LoadDockLayout event get fired in SETUP 2 but not in SETUP 1?

I really need it to work in SETUP 1. How can I make it do so?

Thanks in advance for your help.

Virgil Rodriguez
Top achievements
Rank 1
 answered on 20 Dec 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?