Results 1 to 7 of 7

Thread: [RESOLVED] how get value column in GridView

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2010
    Posts
    313

    Resolved [RESOLVED] how get value column in GridView

    hi, i have hyperlink in gridview i need get value column ID when click on link in the same row i think need activating property autopostback for gridview.

    my case for clarification

    ID BookName Description Link ViewNo
    1 mmm dsfsdf Download 0
    2 kkk ddd Download 0

    i need get row ID to calculate the times seen for the file.

    please help me
    thanks in advance

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2010
    Posts
    313

    Re: how get value column in GridView

    This is very important i am finished the website returned this point please help any idea

  3. #3
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: how get value column in GridView

    Hello,

    To be clear...

    Are you saying that on each row of the GridView, you have a HyperLink, and within the navigation url for that HyperLink, you want to add the value of the ID Column, so that it looks something like:

    http:///www.somedomain.com?id=1

    If so, take a look at the RowDataBound event of the GrdView. This will give you access to the controls within the GridView, including the HyperLink, and from there, you can alter the NavigateUrl property to be whatever you need it to be.

    Gary

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2010
    Posts
    313

    Re: how get value column in GridView

    i need when click on hyperlink get ID On the same row Such as in the Button Edit and delete

  5. #5
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: how get value column in GridView

    Hey,

    Ok, so this is what I suggested. Have a look at the RowDataBound event.

    Gary

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2010
    Posts
    313

    Re: how get value column in GridView

    thank u for interest, i try use RowDataBound event but I think I need a property autopostback in gridview and It is not available

  7. #7
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: how get value column in GridView

    Hey,

    Why do you need an AutoPostBack property?

    Can you show the code that you are already using? I think all you need to do is alter the property of the HyperLink on each row to direct to the ID that you need.

    Gary

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width