|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
TAB (key) to next control instead of next column (in datagrid)I have datagrid. I found code to select all row in data grid (by mouse or arrow keys). This works great - user can select row and... ....and I want to go to next control. For example: User writes something in textbox - then hits TAB to go to datagrid... ....in data grid user choose row by arrows (up and down) and he want to go to next control (for example combobox)... ....user hits TAB but it comes to next column in datagrid... WHAT SHOULD I DO TO GO OUT FROM DATAGRID WITH TAB KEY? I have tried to use keypress or something like that, but: -maybe I did it wrong (then please show short code how to do that) -or maybe DATAGRID.KEYPRESSED doesn't work when I have some cell selected... ....I don't know how to explain what am I talking about... is it possible that CELLS in DATAGRID are like little controls? and when I press TAB in datagrid then I press TAB in cell not in datagrid? I want use all datagrid like one big control (like big listbox for example) : previous control --> TAB --> DATAGRID --> TAB --> next controlHi,
Have a look at this: http://www.syncfusion.com/faq/winforms/search/836.asp Download their example from the link at the bottom of the answer and have a look how they do it. Regards, -Adam. chreo wrote: Show quoteHide quote > Hello. > > I have datagrid. > I found code to select all row in data grid (by mouse or arrow keys). > This works great - user can select row and... > > ...and I want to go to next control. > > For example: > User writes something in textbox - then hits TAB to go to datagrid... > ...in data grid user choose row by arrows (up and down) and he want to go to > next control (for example combobox)... > ...user hits TAB but it comes to next column in datagrid... > > WHAT SHOULD I DO TO GO OUT FROM DATAGRID WITH TAB KEY? > > I have tried to use keypress or something like that, but: > -maybe I did it wrong (then please show short code how to do that) > -or maybe DATAGRID.KEYPRESSED doesn't work when I have some cell selected... > ...I don't know how to explain what am I talking about... > is it possible that CELLS in DATAGRID are like little controls? and when I > press TAB in datagrid then I press TAB in cell not in datagrid? > > I want use all datagrid like one big control (like big listbox for example) > : > previous control --> TAB --> DATAGRID --> TAB --> next control > > Hi,
If you type the datagrid name in code, put the period after it and hit CTRL-SPACE to get your options dropdown menu, there is a method which allows you to jump to the next control. It is labeled "SelectNextControl". Capture the keyboard input in the Datagrid control such that when one presses the TAB key, you fire the method I just showed. eg: DataGrid1.SelectNextControl() Fire that method on the TAB key capture. Hope this helps... Glenn Show quoteHide quote "chreo" <ch***@gazeta.pl> wrote in message news:d38c45$e3k$1@inews.gazeta.pl... > Hello. > > I have datagrid. > I found code to select all row in data grid (by mouse or arrow keys). > This works great - user can select row and... > > ...and I want to go to next control. > > For example: > User writes something in textbox - then hits TAB to go to datagrid... > ...in data grid user choose row by arrows (up and down) and he want to go to > next control (for example combobox)... > ...user hits TAB but it comes to next column in datagrid... > > WHAT SHOULD I DO TO GO OUT FROM DATAGRID WITH TAB KEY? > > I have tried to use keypress or something like that, but: > -maybe I did it wrong (then please show short code how to do that) > -or maybe DATAGRID.KEYPRESSED doesn't work when I have some cell selected... > ...I don't know how to explain what am I talking about... > is it possible that CELLS in DATAGRID are like little controls? and when I > press TAB in datagrid then I press TAB in cell not in datagrid? > > I want use all datagrid like one big control (like big listbox for example) > : > previous control --> TAB --> DATAGRID --> TAB --> next control > > Hi,
Even better yet, I've since noticed that as parameters of the "SelectNextControl" you specify that you desire it to be fired on TAB as one option. You also specify which control to go to next as the first parameter. Simply read the parameter list for the "SelectNextControl" method and you will see where you specify the next control to go to and the key or condition of which to go to the specified control. Helpful? Hopefully! Glenn Show quoteHide quote "chreo" <ch***@gazeta.pl> wrote in message news:d38c45$e3k$1@inews.gazeta.pl... > Hello. > > I have datagrid. > I found code to select all row in data grid (by mouse or arrow keys). > This works great - user can select row and... > > ...and I want to go to next control. > > For example: > User writes something in textbox - then hits TAB to go to datagrid... > ...in data grid user choose row by arrows (up and down) and he want to go to > next control (for example combobox)... > ...user hits TAB but it comes to next column in datagrid... > > WHAT SHOULD I DO TO GO OUT FROM DATAGRID WITH TAB KEY? > > I have tried to use keypress or something like that, but: > -maybe I did it wrong (then please show short code how to do that) > -or maybe DATAGRID.KEYPRESSED doesn't work when I have some cell selected... > ...I don't know how to explain what am I talking about... > is it possible that CELLS in DATAGRID are like little controls? and when I > press TAB in datagrid then I press TAB in cell not in datagrid? > > I want use all datagrid like one big control (like big listbox for example) > : > previous control --> TAB --> DATAGRID --> TAB --> next control > >
arraylist copy
Why do we need Namespace and Module? How can I let the internet explorer start to navigate in the same windwo? Multi-dimensional array with variable number of elements in last dimension Easiest way to generate XML in VB.NET Excaping recursive functions Legacy Client <--> DotNet Listener Possible values of DTE.ActiveDocument.Kind ? How do you force a thread to run on a specific processor? Unable to start debuging on the web server |
|||||||||||||||||||||||