Took the following sample code:
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/selectedvalue/defaultvb.aspx
And adapted it to mysql and my dB, can get grids one and two working as they should but grid 3 will not show any data. what am i doing wrong?
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/selectedvalue/defaultvb.aspx
And adapted it to mysql and my dB, can get grids one and two working as they should but grid 3 will not show any data. what am i doing wrong?
<telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> <ajaxsettings> <telerik:AjaxSetting AjaxControlID="RadGrid1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> <telerik:AjaxUpdatedControl ControlID="RadGrid2" /> <telerik:AjaxUpdatedControl ControlID="RadGrid3" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="RadGrid2"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadGrid2" /> <telerik:AjaxUpdatedControl ControlID="RadGrid3" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="RadGrid3"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadGrid3" /> </UpdatedControls> </telerik:AjaxSetting> </ajaxsettings> </telerik:RadAjaxManager> <strong>States:</strong> <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="true" PageSize="5" DataSourceID="SqlDataSource1" GridLines="None" width="95%"> <clientsettings allowkeyboardnavigation="true" enablepostbackonrowclick="true"> <Selecting AllowRowSelect="true" /> </clientsettings> <mastertableview datakeynames="State" /> <pagerstyle mode="NextPrevAndNumeric" /> </telerik:RadGrid><br /><br /> <strong>Companies:</strong> <telerik:RadGrid ID="RadGrid2" ShowStatusBar="true" runat="server" AllowPaging="True" PageSize="5" DataSourceID="SqlDataSource2" GridLines="None" width="95%" HorizontalAlign="NotSet"> <mastertableview width="100%" datakeynames="State" datasourceid="SqlDataSource2"> </mastertableview> <clientsettings allowkeyboardnavigation="true" enablepostbackonrowclick="true"> <Selecting AllowRowSelect="true" /> </clientsettings> <pagerstyle mode="NextPrevAndNumeric" /> </telerik:RadGrid><br /><br /> <strong>Records:</strong> <telerik:RadGrid ID="RadGrid3" ShowStatusBar="true" runat="server" AllowPaging="True" PageSize="5" DataSourceID="SqlDataSource3" GridLines="None" width="95%" HorizontalAlign="NotSet"> <mastertableview width="100%" datasourceid="SqlDataSource3"> </mastertableview> <clientsettings allowkeyboardnavigation="true" enablepostbackonrowclick="true"> <Selecting AllowRowSelect="true" /> </clientsettings> <pagerstyle mode="NextPrevAndNumeric" /> </telerik:RadGrid> <asp:SqlDataSource ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:connex %>" ProviderName="MySql.Data.MySqlClient" SelectCommand=" SELECT EMPLOYER_STATE AS State, COUNT(EMPLOYER_STATE) as 'Total Filings' FROM y2010 GROUP BY EMPLOYER_STATE ORDER BY COUNT(EMPLOYER_STATE) desc" runat="server"></asp:SqlDataSource> <asp:SqlDataSource ID="SqlDataSource2" ConnectionString="<%$ ConnectionStrings:connex %>" ProviderName="MySql.Data.MySqlClient" SelectCommand=" SELECT EMPLOYER_NAME AS Employer, EMPLOYER_STATE AS State, COUNT(EMPLOYER_NAME) as 'Total Filings' FROM y2010 WHERE EMPLOYER_STATE=@state GROUP BY EMPLOYER_NAME ORDER BY COUNT(EMPLOYER_STATE) desc" runat="server"> <SelectParameters> <asp:ControlParameter ControlID="RadGrid1" DefaultValue="CA" Name="State" PropertyName="SelectedValue" Type="String" /> </SelectParameters> </asp:SqlDataSource> <asp:SqlDataSource ID="SqlDataSource3" ConnectionString="<%$ ConnectionStrings:connex %>" ProviderName="<%$ ConnectionStrings:connex.ProviderName %>" SelectCommand="SELECT SOC_NAME, EMPLOYER_NAME AS Employer FROM y2010 WHERE (EMPLOYER_NAME = @Employer)" runat="server"> <SelectParameters> <asp:ControlParameter ControlID="RadGrid2" name="Employer" PropertyName="SelectedValue" Type="String" /> </SelectParameters> </asp:SqlDataSource>