Home All Groups Group Topic Archive Search About

DataGrid Events - How to mark all row when user uses the keyboard

Author
5 Oct 2005 9:22 AM
Gidi
Hello,

I have a dataGrid that contains customers details, i made an event that when
the DataGrid is loaded the first row is marked or when some row is clicked
this row is marked, how can i do that when the user uses the Up and Down
arrows, it will mark the row that the user is on now. i tried to use the key
event but it wasn't good. is there any other way to do it? or if that's the
only way how can i do it right?

I looked at the Windows Forms FAQ, and didn't find the answer there.
There must be a way to do it....
Thank you very much,
Gidi

Author
5 Oct 2005 9:31 AM
Cor Ligthert [MVP]
Gidi,

Use for your selecting the currencymanager position, that makes it a lot
easier.
(For the Main table, with a related detail table this can AFAIK not be used
with a datagrid).

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformscurrencymanagerclasspositiontopic.asp

I hope this helps,

Cor
Are all your drivers up to date? click for free checkup

Author
5 Oct 2005 8:50 PM
Gidi
Thanks Cor ,

Can u explain me more about it, the msdn doesn't explain much about it.

Thanks again,


Show quoteHide quote
"Cor Ligthert [MVP]" wrote:

> Gidi,
>
> Use for your selecting the currencymanager position, that makes it a lot
> easier.
> (For the Main table, with a related detail table this can AFAIK not be used
> with a datagrid).
>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformscurrencymanagerclasspositiontopic.asp
>
> I hope this helps,
>
> Cor
>
>
>
Author
6 Oct 2005 9:23 AM
Cor Ligthert [MVP]
Gidi,

This is a sample how to use the currencymanager. You can replace the
textboxes in that by one datagrid to get the same effect.

If this does not help, than feel free to reply (in this newsgroup)

http://www.windowsformsdatagridhelp.com/default.aspx?ID=c6c7d9a8-7511-41a1-a488-2e91e5295e7c

I hope this helps,

Cor
Author
6 Oct 2005 10:18 AM
Cor Ligthert [MVP]
Doh,

I thought I was answering this from General. (I know not the first time)

Therefore if that VBNet code is unreadable for you, than respond. Than I
will give another answer using C#.

Sorry

Cor

Bookmark and Share