0

I've build a custom header for a datagridview that allows me to easily search through the data. In this custom header, I've created controls that allow you to click and drag to resize the datagridview columns. My column resizing code works just fine, but I would really like to see if it's possible to call the method(s) used when you click and drag a divider within the datagridview itself.

Is it possible to do that?

Victor Zakharov
  • 25,801
  • 18
  • 85
  • 151
TACHEON
  • 67
  • 1
  • 2
  • 6
  • I've searched through all of the IntelliSense options under my datagridview object to see if there's any type of method to call, but I haven't found one. I'm assuming there is some sort of system method that can be called, but I have no clue where to look for it. – TACHEON Feb 01 '13 at 16:00
  • so you have a data into your `datagridView`. but how did you bind this data to your `datagridView`? – spajce Feb 01 '13 at 16:11
  • I set datagridview.datasource = datatable that contains my query results. – TACHEON Feb 01 '13 at 16:39
  • Are you trying to isolate an event which is raised when clicking and dragging a divider? – djv Feb 01 '13 at 16:43
  • Dan - (I apologize if my terminology is off) I would like to call the same methods that are called on mousedown/mouseup/etc on the datagridview column dividers. This would allow me to assign those methods to the mousedown/mouseup/etc events on my own controls. I want to be able to assign them to the objects I'm using as dividers in my custom header if that is possible. – TACHEON Feb 01 '13 at 17:00
  • i deleted my answer, as you stated from your comment. _"I want to assign to my own control events the methods that the datagridview uses to resize columns"_ hope it helps you this [link](http://msdn.microsoft.com/en-us/library/c316f119(v=vs.71).aspx) – spajce Feb 01 '13 at 17:11

1 Answers1

0

The most simple solution for you is to use 3rdpaty datagrid control with open source code. There are many free alternatives for datagridview. Some of them is more simple and much faster then standart datagridview. In any way i can't find a reason to become a digger of fine working compiled codes.