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 8732843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:31:01+00:00 2026-06-13T09:31:01+00:00

I have a question for the DataGridView in vb.net (making a form). I have

  • 0

I have a question for the DataGridView in vb.net (making a form).

I have a button that is disabled. This button should only be enabled when a row in this list is marked/selected/highlighted. How can i write this? A doubleclick on the DataGridView gives me

Private Sub My_Grid_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles My_Grid.CellContentClick

End Sub

This only works on some of the cells and does not do any thing if i click on the * to the left where i select and highlight this row.

How do i do this?

  • 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. Editorial Team
    Editorial Team
    2026-06-13T09:31:02+00:00Added an answer on June 13, 2026 at 9:31 am

    SelectedIndexChange event can be selected as shown

    You need to change the Event name to Handles My_Grid.SelectedIndexChanged

    So the full Sub would be something like

    Private Sub My_Grid_CellContentClick(ByVal sender As Object, ByVal e As EventArgs) Handles My_Grid.SelectedIndexChanged
         'Your code that handles this event here.
        End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Question should be self explanatory. I have a datagridview which has a column whose
This is a Winform C# question. I have a customized datagridview which is bound
This will be a stupid question but I have a datagridview with a BindingSource
This is a C# Winform question. I have a DataGridView which is bounded to
I have a datagrid that displays a list of custom objects. This list contains
I have a DataGridView in C# (.NET 2.0) with a few read-only cells (3
I have a question on how to bind data to a datagridview in C#
I have question. I have some app on facebook and getting this error Fatal
I have Question and QuestionTypes. In Question table there is a foreign key that
I have a C# .NET 3.5 app that I have incorporated the DragDrop event

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.