Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 94379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T23:29:32+00:00 2026-05-10T23:29:32+00:00

How to handle click event of the linkbutton in gridview in vb.net (windows application

  • 0

How to handle click event of the linkbutton in gridview in vb.net (windows application )

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T23:29:33+00:00Added an answer on May 10, 2026 at 11:29 pm

    You need to consume the DataGridView.CellClick Event and just check that you’ve got the correct column index. You can do it with the following steps:

    Create a new Windows Forms application

    Drag a DataGridView onto the screen

    In the design time properties, add a column to your grid of type DataGridViewLinkColumn

    Make the DataPropertyName property to "Link" (no quotes).

    In your forms constructor, paste this code under the call to InitializeComponent:

    Oh yeah, you’re doing it in VB.NET, so it would be:

    Dim data As New DataTable() data.Columns.Add(New DataColumn("Link", Type.GetType("System.String"))) Dim newRow As DataRow = data.NewRow() newRow("Link") = "http://www.stackoverflow.com" data.Rows.Add(newRow) DataGridView1.DataSource = data 

    Consume the DataGridView.CellClick event

    Private Sub DataGridView1_CellClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellClick     If (e.ColumnIndex = 0) Then         Dim link As String = DataGridView1(e.ColumnIndex, e.RowIndex).Value.ToString()         System.Diagnostics.Process.Start(link)     End If End Sub 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to attach a 'click' event handler to the first child of an
To create a new event handler on a control you can do this c.Click
I'm trying to handle Winsock_Connect event (Actually I need it in Excel macro) using
I'd like to add a click handler for a button using jQuery, but the
In Flex 3, buttons call their click handler when they are clicked on by
How to handle personal stress caused by utterly incompetent and lazy co-workers?
Given a handle of type HWND is it possible to confirm that the handle
Is it possible to handle POSIX signals within the Java Virtual Machine? At least
Does your software handle newline characters from other systems? Linux/BSD linefeed ^J 10 x0A

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.