Last Reply on Feb 22, 2012 01:51 PM By jj297

Views: 399   Replies: 22  Answers: 1


jj297

94 Points
Novice
Joined: Jan 20, 2012 11:10 AM
Replies: 82
on Feb 17, 2012 10:52 PM

What's the best way to handle three radio buttons on a page and when they are clicked the gridview will populate?  I only want to use one gridview.



You are viewing reply posted by: jj297 on Feb 22, 2012 01:51 PM. Show All

jj297

94 Points
Novice
Joined: Jan 20, 2012 11:10 AM
Replies: 82
0
Permanent Link on Feb 22, 2012 01:51 PM

Okay I'm confused...

I added the radiobuttonlist

 <span class="style1"><strong>                 <br />
                 <asp:RadioButtonList ID="Pending" runat="server" AutoPostBack="True">
                     <asp:ListItem Value="300">Over 300</asp:ListItem>
                     <asp:ListItem Value="350">Over 350</asp:ListItem>
                     <asp:ListItem Value="400">Over 400</asp:ListItem>
                 </asp:RadioButtonList>        <br />
        DDS Pending Cases over 250 Days 
                 based on File Date<br />
        </strong></span>          <%--
        <span class="style4"><span class="style1"><strong>Total Pending:</strong></span> </span>
      <asp:Label runat="server" id="CountLabel" Font-Bold="True" class="style2" CssClass="style1" />
--%> <br /> 
         <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataSourceID="SqlDataSource7" EnableModelValidation="True" Width="331px" 
        CaptionAlign="Top" Height="126px" BackColor="White" BorderColor="#DCBE68" 
             BorderStyle="Solid" BorderWidth="1px" CellPadding="4" 
              HorizontalAlign="Center" CellSpacing="2" Font-Names="Arial" 
     AllowSorting="True">                           <Columns>
                               <asp:BoundField DataField="Doc" HeaderText="DDS" SortExpression="Doc" />
                               <asp:TemplateField HeaderText="Total Pending" SortExpression="cnt">
                                    <ItemTemplate>
                           <asp:HyperLink ID="HyperLink1" runat="server" 
                            NavigateUrl='<%# "PendingDDS.aspx?doc=" & Eval("doc") %>' 
                            Text='<%# Eval("cnt") %>'></asp:HyperLink>
                        </ItemTemplate>                                 
                                   <HeaderStyle Wrap="False" />
                               </asp:TemplateField>
                           </Columns>
                          <FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
        <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" 
            VerticalAlign="Top" Font-Size="Medium" />
        <PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" />
        <RowStyle BackColor="White" BorderStyle="Double" ForeColor="#330099" 
                  HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
    </asp:GridView>   

 

Then I added this:


  Protected Sub Pending_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles Pending.SelectedIndexChanged
        If Pending.SelectedItem.Value = "300" Then            GridView1
        ElseIf Pending.SelectedItem.Value = "350" Then            GridView1
        ElseIf Pending.SelectedItem.Value = "400" Then            GridView1
        End If    End Sub

What do I add where Gridview is located?


© 2012 www.aspforums.net All rights reserved. Powered by Excelasoft Solutions.  Excelasoft Solutions

Disclaimer: This site is started with intent to serve the ASP.Net Community by providing forums (question-answer) site where people can help each other. The content posted here is free for public and is the content of its poster. The site does not provide any warranties for the posted content. If you feel any content is violating any terms please contact.