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

Errors when RadGrid in RadDock

2 Answers 72 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 2
CSurieux asked on 05 Dec 2008, 08:36 PM

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;" >
        <div style="width:300px;">
        <telerik:RadGrid ID="RadGrid2" runat="server" GridLines="None" Width="100%" AutoGenerateColumns="False">
            <ExpandCollapseColumn Visible="False" Resizable="False">
                <HeaderStyle Width="20px" />
            <RowIndicatorColumn Visible="False">
                <HeaderStyle Width="20px" />
                <telerik:GridBoundColumn DataField="Name" HeaderText="<%$ Resources:ResourcesWTCRM,AM_NAME %>"
                    ItemStyle-Width='200px' UniqueName="Name">
                <telerik:GridBoundColumn DataField="Parameter" HeaderText="<%$ Resources:ResourcesWTCRM,AM_PARAMETER %>"
                    ItemStyle-Width='200px' UniqueName="Parameter">

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 )
                RadGrid2.DataSource = InfoTb;

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

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.

2 Answers, 1 is accepted

Sort by
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.

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,
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Asked by
Top achievements
Rank 2
Answers by
Top achievements
Rank 2
Telerik team
Share this question