Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 20th, 2008, 02:40 PM
Authorized User
 
Join Date: Jun 2006
Location: , , .
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,


Reply With Quote
  #2 (permalink)  
Old February 20th, 2008, 03:31 PM
Authorized User
 
Join Date: Jun 2006
Location: , , .
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.

Reply With Quote
  #3 (permalink)  
Old February 20th, 2008, 11:39 PM
Authorized User
 
Join Date: Jun 2006
Location: , , .
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Resolved

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 08:09 AM.


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