
A Caruso-Howatt
Top achievements
Rank 1
A Caruso-Howatt
asked on 02 Oct 2008, 02:49 PM
Hi,
I have placed two related RadGrids inside a RadDock and receive the following compile error:
Could not find control 'RadGrid1' in ControlParameter 'newsdate'
I followed the example in the Demo section for RadGrid labeled "related grids".
Note: When I take the RadGrids out of the RadDock the related grids work correctly.
Any help will be appreciated...
a caruso
I have placed two related RadGrids inside a RadDock and receive the following compile error:
Could not find control 'RadGrid1' in ControlParameter 'newsdate'
I followed the example in the Demo section for RadGrid labeled "related grids".
Note: When I take the RadGrids out of the RadDock the related grids work correctly.
Any help will be appreciated...
a caruso
2 Answers, 1 is accepted
0
Accepted
Hello A Caruso-Howatt,
I modified the ASPX code of our "Related Grids" example and prepared a small sample that shows how to achieve the desired behavior. RadGrid1's ClinentID is"RadDock1_C_RadGrid1", so you should use "RadDock1$C$RadGrid1" instead "RadGrid1", e.g:
Let us know if you need further assistance.
Petko
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
I modified the ASPX code of our "Related Grids" example and prepared a small sample that shows how to achieve the desired behavior. RadGrid1's ClinentID is"RadDock1_C_RadGrid1", so you should use "RadDock1$C$RadGrid1" instead "RadGrid1", e.g:
<body class="BODY"> |
<form runat="server" id="mainForm" method="post" style="width: 100%;"> |
<!-- content start --> |
<asp:ScriptManager ID="ScriptManager1" runat="server"> |
</asp:ScriptManager> |
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> |
<ajaxsettings> |
<telerik:AjaxSetting AjaxControlID="RadGrid1"> |
<UpdatedControls> |
<telerik:AjaxUpdatedControl ControlID="RadGrid1" /> |
<telerik:AjaxUpdatedControl ControlID="RadGrid2" /> |
</UpdatedControls> |
</telerik:AjaxSetting> |
<telerik:AjaxSetting AjaxControlID="RadGrid2"> |
<UpdatedControls> |
<telerik:AjaxUpdatedControl ControlID="RadGrid2" /> |
</UpdatedControls> |
</telerik:AjaxSetting> |
</ajaxsettings> |
</telerik:RadAjaxManager> |
<telerik:RadDock ID="RadDock1" runat="server" Title="Customers"> |
<ContentTemplate> |
<telerik:RadGrid ID="RadGrid1" runat="server" AllowSorting="true" AllowPaging="true" |
PageSize="5" DataSourceID="SqlDataSource1" GridLines="None" Skin="Web20" width="95%"> |
<clientsettings allowkeyboardnavigation="true" enablepostbackonrowclick="true"> |
<Selecting AllowRowSelect="true" /> |
</clientsettings> |
<mastertableview datakeynames="CustomerID" /> |
<pagerstyle mode="NextPrevAndNumeric" /> |
</telerik:RadGrid> |
<telerik:RadGrid ID="RadGrid2" ShowStatusBar="true" runat="server" AllowSorting="True" |
AllowPaging="True" PageSize="5" DataSourceID="SqlDataSource2" GridLines="None" |
Skin="Web20" width="95%" HorizontalAlign="NotSet"> |
<mastertableview width="100%" autogeneratecolumns="False" datakeynames="OrderID" |
datasourceid="SqlDataSource2"> |
<Columns> |
<telerik:GridBoundColumn DataField="OrderID" DataType="System.Int32" HeaderText="OrderID" |
ReadOnly="True" SortExpression="OrderID" UniqueName="OrderID"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="OrderDate" DataType="System.DateTime" HeaderText="OrderDate" |
SortExpression="OrderDate" UniqueName="OrderDate" DataFormatString="{0:d}"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="ShipCountry" HeaderText="ShipCountry" SortExpression="ShipCountry" |
UniqueName="ShipCountry"> |
</telerik:GridBoundColumn> |
</Columns> |
</mastertableview> |
<clientsettings allowkeyboardnavigation="true" enablepostbackonrowclick="true"> |
<Selecting AllowRowSelect="true" /> |
</clientsettings> |
<pagerstyle mode="NextPrevAndNumeric" /> |
</telerik:RadGrid> |
</ContentTemplate> |
</telerik:RadDock> |
<asp:SqlDataSource ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>" |
ProviderName="System.Data.SqlClient" SelectCommand="SELECT CustomerID, CompanyName, ContactName, ContactTitle, Address, PostalCode FROM Customers" |
runat="server"> |
</asp:SqlDataSource> |
<asp:SqlDataSource ID="SqlDataSource2" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>" |
ProviderName="System.Data.SqlClient" SelectCommand="SELECT [OrderID], [OrderDate], [CustomerID], [ShipCountry] FROM [Orders] WHERE ([CustomerID] = @CustomerID)" |
runat="server"> |
<SelectParameters> |
<asp:ControlParameter |
ControlID="RadDock1$C$RadGrid1" |
DefaultValue="ALFKI" |
Name="CustomerID" |
PropertyName="SelectedValue" |
Type="String" /> |
</SelectParameters> |
</asp:SqlDataSource> |
</form> |
</body> |
Let us know if you need further assistance.
Petko
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0

A Caruso-Howatt
Top achievements
Rank 1
answered on 07 Oct 2008, 01:48 PM
Petko,
Yes, the solution that you provided was correct. Thanks...
Your prompt and correct reply is one of the reasons why we continue to use your products and plan to purchase additional products from you as our projects progress.
annette caruso
Yes, the solution that you provided was correct. Thanks...
Your prompt and correct reply is one of the reasons why we continue to use your products and plan to purchase additional products from you as our projects progress.
annette caruso