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

Errors when RadGrid in RadDock

2 Answers 107 Views
Dock
This is a migrated thread and some comments may be shown as answers.
CSurieux
Top achievements
Rank 2
CSurieux asked on 05 Dec 2008, 08:36 PM
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 Answers, 1 is accepted

Sort by
0
CSurieux
Top achievements
Rank 2
answered on 05 Dec 2008, 08:54 PM
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
0
Petko
Telerik team
answered on 08 Dec 2008, 01:40 PM
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.
Tags
Dock
Asked by
CSurieux
Top achievements
Rank 2
Answers by
CSurieux
Top achievements
Rank 2
Petko
Telerik team
Share this question
or