By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,609 Members | 3,766 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,609 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
May 8 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On May 8, 11:35 am, Rich <R...@discussions.microsoft.comwrote:
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

May 8 '07 #2

P: n/a
Thanks.

"rowe_newsgroups" wrote:
On May 8, 11:35 am, Rich <R...@discussions.microsoft.comwrote:
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

May 11 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.