HyperLink column datagrid

Discussion in 'ASP .Net Datagrid Control' started by aspnetpal, Feb 11, 2005.

  1. aspnetpal

    aspnetpal Guest

    Hi every1, I have a hyperlink column in the datagrid and it is working
    fine.
    This column is also a primary key for that table.

    Problem on hand:
    When user click on a particular value (row) in that column a new window
    should open as a MS Word document (since that record should refer to
    that document).

    What I have so far is this.
    When user clicks on the link a new window opens as a windows explorer.
    What I want to do is this when user clicks on it, then it should open
    up that document. The document name should be primarykey.doc
    For example,

    Hyperlink column = 1019

    Document Name = 1019.doc

    Currently all documents located on local drive & I'm thinking to move
    them to webserver.

    Any suggestion would be highly appreciated.

    Thanks
     
    aspnetpal, Feb 11, 2005
    #1
    1. Advertising

  2. aspnetpal

    Riki Guest

    aspnetpal wrote:
    > Hi every1, I have a hyperlink column in the datagrid and it is working
    > fine.
    > This column is also a primary key for that table.
    >
    > Problem on hand:
    > When user click on a particular value (row) in that column a new
    > window should open as a MS Word document (since that record should
    > refer to that document).
    >
    > What I have so far is this.
    > When user clicks on the link a new window opens as a windows explorer.
    > What I want to do is this when user clicks on it, then it should open
    > up that document. The document name should be primarykey.doc
    > For example,
    >
    > Hyperlink column = 1019
    >
    > Document Name = 1019.doc
    >
    > Currently all documents located on local drive & I'm thinking to move
    > them to webserver.
    >
    > Any suggestion would be highly appreciated.


    Just set these properties for the hyperlink column:
    DataNavigateUrlFormatString="{0}.doc"
    Target="_blank"

    That's it.

    --

    Riki
     
    Riki, Feb 12, 2005
    #2
    1. Advertising

  3. aspnetpal

    aspnetpal Guest

    Hi Rikik, that did it.

    Thanks for your help....
     
    aspnetpal, Feb 12, 2005
    #3
    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. =?Utf-8?B?V2FyYW4=?=

    HyperLink Column and Button Column in a DataGrid

    =?Utf-8?B?V2FyYW4=?=, Aug 9, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    604
    =?Utf-8?B?V2FyYW4=?=
    Aug 9, 2005
  2. =?Utf-8?B?ZGF2aWQ=?=
    Replies:
    11
    Views:
    1,011
    deandany
    Jul 17, 2006
  3. davetichenor
    Replies:
    1
    Views:
    844
    Eliyahu Goldin
    Oct 30, 2006
  4. Keith G Hicks
    Replies:
    3
    Views:
    770
    Keith G Hicks
    Feb 18, 2008
  5. Dave
    Replies:
    0
    Views:
    957
Loading...

Share This Page