Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 20th, 2008, 02:40 PM
Authorized User
 
Join Date: Jun 2006
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Default Filter results by value in a gridview field

Hi,
What is the simpliest way to click a button that open up another page whose rescords displayed and datasource is filtered based on the record ID value stored in page 1.

What I have done so far:
1) created a query with all the fields I need.
2) created a custom gridview:
           <asp:GridView ID="GridView1" runat="server" AllowSorting="True" AutoGenerateColumns="False" EmptyDataText="There is not any data.">
            <Columns>
                <asp:BoundField DataField="LineNumber" />
                <asp:TemplateField HeaderText="Employee ID">
                    <ItemTemplate>
                        <asp:TextBox ID="employeeID" runat="server" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Visa ID">
                    <ItemTemplate>
                        <asp:TextBox ID="viaID" runat="server" />
                    </ItemTemplate>
                </asp:TemplateField>
                   <asp:TemplateField HeaderText="Job">
                    <ItemTemplate>
                        <asp:TextBox ID="Job" runat="server" />
                    </ItemTempleate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>

3) I am using the custom grid because I want to add an add record button to the grid latter.

Thank you in advance,


 
Old February 20th, 2008, 03:31 PM
Authorized User
 
Join Date: Jun 2006
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Update: I know I can do this using the Navigate URL Field in the grid view, but, I just want the button to only appear once.

 
Old February 20th, 2008, 11:39 PM
Authorized User
 
Join Date: Jun 2006
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Resolved






Similar Threads
Thread Thread Starter Forum Replies Last Post
Filter double search results ABplace Beginning VB 6 3 June 28th, 2007 08:11 AM
Gridview Losing Filter on Edit mikeymikey ASP.NET 2.0 Professional 1 January 28th, 2007 05:55 AM
Filter grid view results by range of values srinredd59 ASP.NET 2.0 Professional 0 December 27th, 2006 03:55 PM
Filter GridView Results by date range srinredd59 ASP.NET 2.0 Basics 0 December 27th, 2006 03:53 PM
Gridview won't show results fizzerchris ASP.NET 2.0 Basics 0 September 22nd, 2006 06:20 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.