Hi,
This is probably a stupid question and I am obviously missing something but I cannot seem to filter a grid from a panelbar. The panel bar is being populated by an sql datasource and this works fine, however getting the accompanying grid to list the appropriate item(s) from the database is causing me some confusion. I got this to work with a dropdownlist but the panelbar seems to be a different animal altogether. I have included the panelbar control and the grid control below. I have searched thoroughly through all forums and help documentation and can't find anything that offers some help here so any help with this would be much appreciated :)
The RadPanelBar:
<telerik:RadPanelBar runat="server"
id="LayoutPanelBar"
Width="100%"
Height="100%"
ExpandMode="FullExpandedItem"
DataSourceID="LayoutPanelDataSource"
DataValueField="HashTableID"
Skin="Telerik"
DataFieldID="HashTableID"
DataTextField="hashText">
</telerik:RadPanelBar>
<asp:SqlDataSource ID="LayoutPanelDataSource"
runat="server"
ConnectionString="<%$ ConnectionStrings: [omitted] %>"
SelectCommand="SELECT [HashTableID], [hashText], [sortOrder] FROM [tblHashTable] WHERE [Category] = 'Layouts' ORDER BY [sortOrder] ASC">
</asp:SqlDataSource>
The RadGrid:
<telerik:RadGrid ID="LayoutGridDetails"
runat="server"
DataSourceID="LayoutGridDataSource"
GridLines="None"
AllowPaging="true"
PageSize="25">
<PagerStyle Mode="NumericPages" />
<MasterTableView TableLayout="Fixed">
<ItemTemplate>
<b>LayoutId:</b><%# Eval("LayoutId")%>
<br />
<b>LayoutName:</b><%# Eval("LayoutName")%>
<br />
<b>LayoutDescription:</b><%# Eval("LayoutDescription")%>
</ItemTemplate>
</MasterTableView>
</telerik:RadGrid>
<asp:SqlDataSource ID="LayoutGridDataSource"
runat="server"
ConnectionString="<%$ ConnectionStrings:[omitted] %>"
SelectCommand="SELECT [LayoutId], [LayoutName], [LayoutDescription], [LayoutCategory] FROM [tblLayouts] WHERE [LayoutCategory] = @LayoutCategory">
<SelectParameters>
<asp:ControlParameter Name="LayoutCategory" PropertyName="DataTextField" ControlID="LayoutPanelBar" />
</SelectParameters>
</asp:SqlDataSource>
I want to be able to filter the records in the tblLayouts.LayoutCategory based on the DataTextField="hashText" selected in the RadPanelBar. The hashText field from tblHashTable is nvarchar(50) and the LayoutCategory from tblLayouts is the same so there is no problem here. The DataField="HashTableID" is an Int32.
Any advice here would be appreciated, thank you.
Grant