datagrid top left corner cell - selects All - what event is fired?

G

Guest

Hello,

When clicking on the top left corner of a datagridview - then entire
contents of the datagridview is selected. When clicking on that cell - what
event gets triggered/fired? I tried RowHeaderCell, ColumnHeaderCell, but
none of these events fired when I click on the top left corner cell of the
datagrid. I was hoping to do something like

console.WriteLine(e.ColumnIndex.ToString)

and maybe that would return -1, but I am not able to locate what event fires
when clicking on the Select All cell. Any suggestions appreciated.

Thanks,
Rich
 
R

rowe_newsgroups

Hello,

When clicking on the top left corner of a datagridview - then entire
contents of the datagridview is selected. When clicking on that cell - what
event gets triggered/fired? I tried RowHeaderCell, ColumnHeaderCell, but
none of these events fired when I click on the top left corner cell of the
datagrid. I was hoping to do something like

console.WriteLine(e.ColumnIndex.ToString)

and maybe that would return -1, but I am not able to locate what event fires
when clicking on the Select All cell. Any suggestions appreciated.

Thanks,
Rich

AFAIK SelectionChanged is the only event that will fire, but it will
fire more than just when you click the "select all" cell. Perhaps you
could subclass the control and add in your own event that fires only
on that cell.

Thanks,

Seth Rowe
 
G

Guest

Thanks.

rowe_newsgroups said:
AFAIK SelectionChanged is the only event that will fire, but it will
fire more than just when you click the "select all" cell. Perhaps you
could subclass the control and add in your own event that fires only
on that cell.

Thanks,

Seth Rowe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top