I'm having trouble understanding just how to use the selected value of a Combobox to display the correct data in a grid.
I have worked through this example but still my code is missing something:
http://www.telerik.com/DEMOS/ASPNET/Prometheus/Controls/Examples/Integration/GridComboAjax/DefaultCS.aspx?product=grid
It only works if I define a default value in the SQLDataSource's wizard.
Any ideas?
Here is my code:
I have worked through this example but still my code is missing something:
http://www.telerik.com/DEMOS/ASPNET/Prometheus/Controls/Examples/Integration/GridComboAjax/DefaultCS.aspx?product=grid
It only works if I define a default value in the SQLDataSource's wizard.
Any ideas?
Here is my code:
| <telerik:radcombobox id="cboTime" runat="server" skin="Vista" DataSourceID="SqlTime" DataTextField="sTimeId" AutoPostBack="True"> |
| <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> |
| </telerik:radcombobox> |
| <telerik:RadGrid ID="grdGrid" runat="server" DataSourceID="Sqlgrid" GridLines="None" Skin="Vista" AllowSorting="True" AllowPaging="True"> |
| <MasterTableView DataSourceID="Sqlgrid"> |
| <RowIndicatorColumn Visible="False"> |
| <HeaderStyle Width="20px" /> |
| </RowIndicatorColumn> |
| <ExpandCollapseColumn Resizable="False" Visible="False"> |
| <HeaderStyle Width="20px" /> |
| </ExpandCollapseColumn> |
| <EditFormSettings> |
| <PopUpSettings ScrollBars="None" /> |
| </EditFormSettings> |
| </MasterTableView> |
| <ClientSettings> |
| <Selecting AllowRowSelect="True" /> |
| </ClientSettings> |
| </telerik:RadGrid> |
| <asp:SqlDataSource ID="Sqlgrid" runat="server" ConnectionString="<%$ ConnectionStrings:MyDbConnectionString %>" |
| SelectCommand="Get_TimeTest" SelectCommandType="StoredProcedure"> |
| <SelectParameters> |
| <asp:ControlParameter ControlID="cboTime" Direction="InputOutput" |
| Name="sTimeId" PropertyName="SelectedValue" Type="String" /> |
| </SelectParameters> |
| </asp:SqlDataSource> |
| <asp:SqlDataSource id="SqlTime" runat="server" SelectCommand="SELECT [sTimeId] FROM [Times]" |
| ConnectionString="<%$ ConnectionStrings:MyDBConnectionString2 %>"> |
| </asp:SqlDataSource> |
| </asp:Content> |