Changing databound gridview field to hyperlink- need 2 more params

Discussion in 'ASP .Net Datagrid Control' started by RJ, Aug 29, 2006.

  1. RJ

    RJ Guest

    Please help...
    I am trying to make a databound field in a datagrid link to another page
    that expects 3 parameters. 2 parameters are in the URL (constant from
    datagrid to new page), and the other is in the datasource and should pass the
    ID of the record they click. My research so far says to use parameters from
    the datasource... Is there a way to reference the URL parameters in the
    DataNavigateUrlFields/DataNavigateUrlFormatString instead of having to add
    them to my datagrid's datasource?
    --
    Thanks,
    RJ - VS 2005 Newbie
    RJ, Aug 29, 2006
    #1
    1. Advertising

  2. RJ

    JeffP@Work Guest

    RJ,

    I'm not sure if your issue is exactly where I'm at, but it appears that it
    is similar to your question.

    I'm using using in the dg, DataKeyField="UserID" that is not shown in the dg
    and also a hidden column for any other needed but not displayed info to
    manage dg events.

    I too need more than just an index field to go onto the nxt step as well as
    beging able to program a "Back" button, javaScript goBackHistory(-1)on our
    phones is unreliable.

    Then in the .vb to get the userID (always unique) for the sProc rather than
    the StaffFullName which is displayed and may not be unique....

    Dim UserID As String = dg.DataKeys(e.item.ItemIndex)

    Then to get the next step, I've suffixed the commands
    CommandName="SomedgSMFC" for SalesManager datagrid, FutureCalls, which
    SalesPerson is the UserID.

    Dim sCoMander as string = rith(e.CommandName,4)

    HTH

    JeffP.....

    "RJ" <> wrote in message
    news:...
    > Please help...
    > I am trying to make a databound field in a datagrid link to another page
    > that expects 3 parameters. 2 parameters are in the URL (constant from
    > datagrid to new page), and the other is in the datasource and should pass
    > the
    > ID of the record they click. My research so far says to use parameters
    > from
    > the datasource... Is there a way to reference the URL parameters in the
    > DataNavigateUrlFields/DataNavigateUrlFormatString instead of having to add
    > them to my datagrid's datasource?
    > --
    > Thanks,
    > RJ - VS 2005 Newbie
    JeffP@Work, Sep 12, 2006
    #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. Carlos
    Replies:
    1
    Views:
    8,882
    PeterKellner
    Jun 8, 2006
  2. Replies:
    5
    Views:
    656
  3. rodchar
    Replies:
    0
    Views:
    392
    rodchar
    Nov 26, 2007
  4. Manu
    Replies:
    0
    Views:
    164
  5. Barry
    Replies:
    9
    Views:
    443
    Ara.T.Howard
    Sep 15, 2005
Loading...

Share This Page