I have three dropdowns, one is populated, the other two I'm just putting in values myself (facility, year, month). I have a gridview running a stored procedure that is waiting for values from the dropdowns so it can populate the grid.
I'd like to wait to populate the grid until the user selects values and hits go, but for some reason, it's just populating automatically. I tried putting in a "Please Select" in one of them, but then it complains that my input value is not right.
All three dropdowns are autopostback = false (advice from someone else).
Is there a property in the gridview I need to set?
here's the gridview code
-
<asp:GridView ID="gv_cust1" runat="server" AutoGenerateColumns="False" DataSourceID="udsp_SCCust1" CellPadding="4" ForeColor="#333333" GridLines="None">
-
<Columns>
-
<asp:BoundField DataField="Measure1" HeaderText="Measure1" ReadOnly="True" SortExpression="Measure1" />
-
<asp:BoundField DataField="Measure2" HeaderText="Measure2" ReadOnly="True" SortExpression="Measure2" />
-
<asp:BoundField DataField="Score" HeaderText="Score" ReadOnly="True" SortExpression="Score" />
-
</Columns>
-
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
-
<RowStyle BackColor="#EFF3FB" />
-
<EditRowStyle BackColor="#2461BF" />
-
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
-
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
-
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
-
<AlternatingRowStyle BackColor="White" />
-
</asp:GridView>
-
here's the sql that it runs
- <asp:SqlDataSource ID="udsp_SCCust1" runat="server" ConnectionString="<%$ ConnectionStrings:Cypress_APPConnectionString %>"
-
SelectCommand="udsp_ScorecardQuarterly" SelectCommandType="StoredProcedure">
-
<SelectParameters>
-
<asp:ControlParameter ControlID="ddlQuarter" Name="qtr" PropertyName="SelectedValue"
-
Type="Int32" />
-
<asp:ControlParameter ControlID="ddlYear" Name="year" PropertyName="SelectedValue"
-
Type="Int32" />
-
<asp:ControlParameter ControlID="ddlFacility" Name="entID" PropertyName="SelectedValue"
-
Type="Int32" />
-
</SelectParameters>
-
</asp:SqlDataSource>
-
Any ideas?