Author Topic: Datagridview problem  (Read 1753 times)

0 Members and 1 Guest are viewing this topic.

samideqlqpart

  • Newt
  • Posts: 40
Datagridview problem
« on: May 16, 2019, 02:31:29 PM »
hello
i got two datagridviews
the problem is with the first datagridview code.
nothing happens when i click with my mouse on the header .
but in the second one, the message  appear
 
How to solve this problem?

public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        private void dataGridView1_ColumnHeaderMouseClick(
    object sender, DataGridViewCellMouseEventArgs e)
        {
            MessageBox.Show("hello");
        }

        private void dataGridView2_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            MessageBox.Show("hello");
        }
    }
}


kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2121
  • class keyThumper<T>:ILazy<T>
Re: Datagridview problem
« Reply #1 on: May 16, 2019, 07:26:10 PM »

I can't reproduce this issue.
I assumed a windows desktop .NET Framework Form. VS2019 Net 4.7.2

What is your DataGridView.SelectionMode Property for the controls ( inBehaviour )

Perhaps you could build and post a zip of a minimal solution to demonstrate your problem.
Ditto if this is an AutoCAD plug-in.

 egards,
Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

samideqlqpart

  • Newt
  • Posts: 40
Re: Datagridview problem
« Reply #2 on: May 17, 2019, 04:12:17 AM »
Hi
Yes i'm using NET Framework VS2019 Net 4.7.2
i had NET Framework  VS2013 Net 4.5 and everything worked fine
how to cure it?

also DataGridViewCellPaintingEventArgs don't work now.
thanks


samideqlqpart

  • Newt
  • Posts: 40
Re: Datagridview problem
« Reply #3 on: May 17, 2019, 11:11:29 AM »
hi
in fact net Framework 4.7.2 is the problem!!!!
with framework 4.5 all is perfect.

now what can i do with framework 4.7.2?
is there any missed referencies?