Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. DataGrid RowHeaderClick Event

DataGrid RowHeaderClick Event

Scheduled Pinned Locked Moved Visual Basic
tutorialquestion
2 Posts 2 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    ColdWaterBlue
    wrote on last edited by
    #1

    I'm trying to mimic the RowHeaderClick event whenever a row is click in a DataGrid. Does anybody know how to do it? Basically I just want to highlight the entire row. Also, is there a way to change either the font color or background color of different rows in a DataGrid?

    S 1 Reply Last reply
    0
    • C ColdWaterBlue

      I'm trying to mimic the RowHeaderClick event whenever a row is click in a DataGrid. Does anybody know how to do it? Basically I just want to highlight the entire row. Also, is there a way to change either the font color or background color of different rows in a DataGrid?

      S Offline
      S Offline
      Syed Abdul Khader
      wrote on last edited by
      #2

      Handle it in the MouseDown event like this. Dim ht As HitTestInfo = Me.HitTest(e.X, e.Y) If (e.Button = MouseButtons.Right) Then If ht.Type = DataGrid.HitTestType.Cell Then Me.Select(ht.Row) End If End If

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups