Simple: passing multiple variables into a datagrid hyperlinkcolumn?

Discussion in 'ASP .Net' started by Roy, Jul 20, 2005.

  1. Roy

    Roy Guest

    I'm assuming this is amazingly simple and I'm just missing the boat.

    On the html side of an asp.net page I have a datagrid, a "search"
    button, and 8 text boxes for search criteria. A user enters in varying
    search criteria, hits "search", info is passed to a stored proc,
    results return and displayed in the datagrid.

    Every field in the datagrid is numeric (indicative of a certain sum or
    total) data but also functions as a hyperlinkcolumn. So when joe bloe
    clicks on the number "3" in column 7, another page will pop up with the
    3 records associated with that record. Make sense? Basically it's a
    reports page with drill-down functionality.

    Problem: how can I pass all 8 of the search criteria along to the
    drill-down page? I know how to send info in this fashion:

    <asp:HyperLinkColumn DataTextField="adj" DataNavigateUrlField="voydoc"
    datanavigateurlformatstring="adj.aspx?Id={0}"
    Target="_blank" HeaderText="Adjusted Booking"
    HeaderStyle-HorizontalAlign="Center" ItemStyle-Font-Bold="true">

    But this only grabs data from within the datagrid itself. I'll need to
    pass info from the vb code-behind. I'm trying to avoid using session
    variables if at all possible.

    Anyone have any tips or links?

    Thanks very much.
    Roy, Jul 20, 2005
    #1
    1. Advertising

  2. Roy

    Roy Guest

    I guess there isn't a way to accomplish this.
    It would appear I would have to use a templatecolumn and a hyperlink
    within. Only problem there is I'd lose the functionality of displaying
    actual data from a result set. Adding hyperlinkcolumn's on the fly in
    the code-behind seems a non-workable option as the datagrid columns are
    arranged according to overlord request and I can't seem to set where in
    the datagrid column index I want added columns to appear.

    Gah. Sometimes it's just not my day. ;)




    Newsgroups: microsoft.public.dotnet.framework.aspnet
    From: "Roy" <> - Find messages by this author
    Date: 20 Jul 2005 15:25:19 -0700
    Local: Wed,Jul 20 2005 6:25 pm
    Subject: Simple: passing multiple variables into a datagrid
    hyperlinkcolumn?


    I'm assuming this is amazingly simple and I'm just missing the boat.


    On the html side of an asp.net page I have a datagrid, a "search"
    button, and 8 text boxes for search criteria. A user enters in varying
    search criteria, hits "search", info is passed to a stored proc,
    results return and displayed in the datagrid.


    Every field in the datagrid is numeric (indicative of a certain sum or
    total) data but also functions as a hyperlinkcolumn. So when joe bloe
    clicks on the number "3" in column 7, another page will pop up with the

    3 records associated with that record. Make sense? Basically it's a
    reports page with drill-down functionality.


    Problem: how can I pass all 8 of the search criteria along to the
    drill-down page? I know how to send info in this fashion:


    <asp:HyperLinkColumn DataTextField="adj" DataNavigateUrlField="voydoc"
    datanavigateurlformatstring="a­dj.aspx?Id={0}"
    Target="_blank" HeaderText="Adjusted Booking"
    HeaderStyle-HorizontalAlign="C­enter" ItemStyle-Font-Bold="true">


    But this only grabs data from within the datagrid itself. I'll need to
    pass info from the vb code-behind. I'm trying to avoid using session
    variables if at all possible.


    Anyone have any tips or links?


    Thanks very much.
    Roy, Jul 21, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. vtreddy
    Replies:
    0
    Views:
    2,053
    vtreddy
    Nov 6, 2003
  2. Replies:
    2
    Views:
    3,449
  3. Jl_G_0
    Replies:
    3
    Views:
    4,678
    Jl_G_0
    Sep 13, 2006
  4. vtreddy

    Adding Multiple values to DataGrid HyperLinkColumn dynamically

    vtreddy, Nov 6, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    148
    vtreddy
    Nov 6, 2003
  5. Replies:
    1
    Views:
    1,094
    Teemu Keiski
    May 12, 2007
Loading...

Share This Page