TheSwamp

Code Red => .NET => Topic started by: samideqlqpart on May 16, 2019, 02:31:29 PM

Title: Datagridview problem
Post by: samideqlqpart 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");
        }
    }
}

Title: Re: Datagridview problem
Post by: kdub_nz 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,
Title: Re: Datagridview problem
Post by: samideqlqpart 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

Title: Re: Datagridview problem
Post by: samideqlqpart 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?