Errors when RadGrid in RadDock

3 posts, 0 answers
  1. CSurieux
    CSurieux avatar
    465 posts
    Member since:
    Jan 2007

    Posted 05 Dec 2008 Link to this post

    Hello,

    I need to hve a dockable floating window which presents results in a radgrid.
    Each time I select a new node in a RadTreeView, I do an AjaxCallBack to fill the grid.
    The row number in the grid vary and the dock windo has to adapt its height according.
    I am using same code as in the postit sample for RadDock.

    <telerik:RadDockLayout runat="server" ID="RadDockLayout1">
        <telerik:RadDock ID="GridDock" Title="&nbsp;" Top="200px" Left="550px" DefaultCommands="All" Pinned="true" DockMode="Floating" runat="server" style="min-width:310px;min-height:200px;margin-left:auto;margin-right:auto;" >
            <ContentTemplate>
            <div style="width:300px;">
            <telerik:RadGrid ID="RadGrid2" runat="server" GridLines="None" Width="100%" AutoGenerateColumns="False">
            <MasterTableView>
                <ExpandCollapseColumn Visible="False" Resizable="False">
                    <HeaderStyle Width="20px" />
                </ExpandCollapseColumn>
                <RowIndicatorColumn Visible="False">
                    <HeaderStyle Width="20px" />
                </RowIndicatorColumn>
                <Columns>
                    <telerik:GridBoundColumn DataField="Name" HeaderText="<%$ Resources:ResourcesWTCRM,AM_NAME %>"
                        ItemStyle-Width='200px' UniqueName="Name">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Parameter" HeaderText="<%$ Resources:ResourcesWTCRM,AM_PARAMETER %>"
                        ItemStyle-Width='200px' UniqueName="Parameter">
                    </telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
            </telerik:RadGrid>
            </div>
            </ContentTemplate>
        </telerik:RadDock>
    </telerik:RadDockLayout>

    The dock opbject is added in codebehind as a dependency of the radTreeView.

    During the ajax postback, my code is
                    RadGrid RadGrid2    =   (RadGrid)GridDock.ContentContainer.FindControl("RadGrid2");
                    if ( RadGrid2 == null )
                        return;
                    RadGrid2.DataSource = InfoTb;
                    RadGrid2.DataBind();


    It seems to work until I select a node with a smaller row of information.
    I get the following error:
    "System.ArgumentException: Ivalid JSON primitive: {"Top":153,"Left":908,"DockZoneID":"","Collapsed":false......
    at ...JavascriptObjectDeserialize.BasicDeserialize
    at..ProcessPostData

    Could we use radGrid, RadDock and RadAjax this way ??????
    Thanks for not answering me an 'open a ticket', I have a long queue of pending request for this and I have no time left for.

    Thanks fo help.
    CS.
  2. CSurieux
    CSurieux avatar
    465 posts
    Member since:
    Jan 2007

    Posted 05 Dec 2008 Link to this post

    It seems that I found a solution inserting the grid as the ajax updated control and not the dock.
    Hope it will resit testing.
    Thanks for attention, comments welcome.

    CS
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Petko
    Admin
    Petko avatar
    45 posts

    Posted 08 Dec 2008 Link to this post

    Hello Christian,

    The code that you posted seems OK and at this point we cannot tell what the reason for the problem is. It is good to know that you found a solution, but if you still experience problems with this, you will have to send us a sample project. We understand that this is a time consuming task, but if we cannot reproduce the problem locally, we can't be of much help.



    Best wishes,
    Petko
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top