RadPanes in Repeater

4 posts, 0 answers
  1. Chris
    Chris avatar
    17 posts
    Member since:
    Oct 2010

    Posted 14 May 2012 Link to this post

    Hi,

    I'm not sure if what I'm doing is possible with the Splitter control, but it'd great if I could get some advice.

    Basically, I'd like to be able include RadPane's inside a repeater item - so that each item would be 'resizable' in relation to the other items.

    Here's my markup currently:

       <telerik:RadSplitter ID="splt" runat="server" Width="100%">              
    <asp:Repeater ID="rptSplitter" runat="server" OnItemDataBound="rptSplitter_ItemDataBound">
    <ItemTemplate>
    <telerik:RadPane ID="pane" runat="server">
    <asp:Label ID="lblText" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"From") %>'></asp:Label>
    <telerik:RadGrid ID="gv" runat="server" AutoGenerateColumns="false">
    <MasterTableView runat="server" DataKeyNames="ID">
    <Columns>
    <telerik:GridBoundColumn DataField="ConsignmentNo" HeaderText="Consignment" SortExpression="ConsignmentNo">
    </telerik:GridBoundColumn>
    <telerik:GridBoundColumn DataField="Customer" HeaderText="Customer" SortExpression="Customer"></telerik:GridBoundColumn>
    </Columns>
    </MasterTableView>
    </telerik:RadGrid>
    </telerik:RadPane>
    </ItemTemplate>
    <SeparatorTemplate>
    <telerik:RadSplitBar runat="server"></telerik:RadSplitBar>
    </SeparatorTemplate>
    </asp:Repeater>
     </telerik:RadSplitter>

    But this code does not work - the page simply doesn't render anything. If I remove the RadSplitter, RadPane etc elements then the Repeater displays the items correctly. Any ideas?
  2. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 16 May 2012 Link to this post

    Hi Chris,

    RadSplitter does not support controls other than RadPane to be nested as direct children.

    If I understand you correctly, you need to dynamically create the splitter's panes and their content based on some datasource. To do so you need to create and add the control on the server. Please take a look at the following help article to how to create and configure RadSplitter on the server:
    http://www.telerik.com/help/aspnet-ajax/splitter-server-side-defining-structure.html

    All the best,
    Dobromir
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Chris
    Chris avatar
    17 posts
    Member since:
    Oct 2010

    Posted 16 May 2012 Link to this post

    Many thanks for your reply,

    I have indeed tried that but all the controls inside the RadPane's are lost on PostBack - this is an issue as each pane controls a RadGrid, and the user needs to be able to drag and drop between grids - so when the drop occurs and the server posts back, my RowDrop event doesn't fire and all my controls disappear. If I recreate them on postback, I will lose the details of the drag drop occurred.

    Is there any possible way to do this or would I need to use another control?
  5. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 17 May 2012 Link to this post

    Hi Chris,

    I tried to reproduce the described behavior but to no avail. Could you please open formal support ticket and provide sample fully runnable project reproducing the issue so we can examine and debug it locally?

    For your convenience I have attached my test page, could you please modify it to a point where the problem occurs and send it back?

    Greetings,
    Dobromir
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top