so that when a user clicks or double clicks on a datagridview row,
private void dataGridView1_RowEnter(object sender, DataGridViewCellEventArgs
e) {}and
private void dataGridView1_CellContentClick(object sender,
DataGridViewCellEventArgs e){}
handle any incoming events in a reliable and consistent manner.
Requirements:
1. no actions are performed in these event handlers during the
datagridview intialization.
2. the ability to select a single row only after the datagridview has been
initialized and displayed.
(given dataGridView1.SelectionMode =
DataGridViewSelectionMode.FullRowSelect; )
3. the double click event action is not pre-empted by a single event.
Thank you, -Greg
hazz - 14 Feb 2006 20:30 GMT
ok. I want cellclick and doublecellclick. Now I have to find out how to not
have the cellclick fire (when calling another method) and still have the
doublecellclick event fire. -hazz
> so that when a user clicks or double clicks on a datagridview row,
> private void dataGridView1_RowEnter(object sender,
[quoted text clipped - 15 lines]
>
> Thank you, -Greg
hazz - 15 Feb 2006 00:39 GMT
I had to use RowHeaderMouseClick and CellDoubleClick as below to get the
separation of click and doubleclick actions.
They use different Event Handlers
this.dataGridView1.CellDoubleClick += new
System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellDoubleClick);
this.dataGridView1.RowHeaderMouseClick += new
System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dataGridView1_RowHeaderMouseClick);
> so that when a user clicks or double clicks on a datagridview row,
> private void dataGridView1_RowEnter(object sender,
[quoted text clipped - 15 lines]
>
> Thank you, -Greg