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
  1. Home
  2. General Programming
  3. C#
  4. DatagridView Custom Column Events

DatagridView Custom Column Events

Scheduled Pinned Locked Moved C#
tutorialhelpquestion
2 Posts 2 Posters 0 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.
  • I Offline
    I Offline
    Itanium
    wrote on last edited by
    #1

    Hi All, I have created a custom datagridviewColumn control containig a TextBox+Button. I want to access the events of these controls directly, for example TextBox_textChanged, Button_MouseHover.i have found that In DataGridViewButtonColumn we have to access the button through Cell_Click event, but this doesn't resolve my problem. Can someone please tell me how to access the events of controls contained in DataGridViewColumns? Thanks

    sorry for my bad English.

    N 1 Reply Last reply
    0
    • I Itanium

      Hi All, I have created a custom datagridviewColumn control containig a TextBox+Button. I want to access the events of these controls directly, for example TextBox_textChanged, Button_MouseHover.i have found that In DataGridViewButtonColumn we have to access the button through Cell_Click event, but this doesn't resolve my problem. Can someone please tell me how to access the events of controls contained in DataGridViewColumns? Thanks

      sorry for my bad English.

      N Offline
      N Offline
      Nader Elshehabi
      wrote on last edited by
      #2

      Hello If you've created that custom control then you control its events. You can do this in two approaches: 1- Make a custom event in your custom control. Handle whatever events you want to handle of the button and textbox private inside your control. From these handlers, fire the public event. Now handle that public event in your form. 2- Just declare your button and textbox as public members of your control. Then you will have access to their events as well. Programatically only of course -ie. you may not access their events using the PropertyGrid by default-. Regards:rose:

      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