Restrict clicking child datagrid columns

K

Kenneth Bohman

A windows form contains
a parent datagrid (let's say order)
a child datagrid (let's say order details)

One user prefers to use the mouse to navigate between the data grids. When
stressed the same user often clicks any column in the child datagrid and
starts typing away. Trying for example to type the article number in the
units column.

How can I restrict so that whenever the user clicks a new (blank) row in the
child datagrid the leftmost column gets the focus?
How can I even check when that a new (blank) row has been activated? As far
as I can see, the events for the datagrid fire only when the row has
actually been added to a datagrid

Or is there a better solution. Validation events only annoys the user and
this question has become kind of a political issue now. So I would be
grateful for any help.


Kind regards,

Kenneth Bohman
 
K

Ken Tucker

Hi,

See below.

Kenneth Bohman said:
A windows form contains
a parent datagrid (let's say order)
a child datagrid (let's say order details)

One user prefers to use the mouse to navigate between the data grids. When
stressed the same user often clicks any column in the child datagrid and
starts typing away. Trying for example to type the article number in the
units column.
http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp#q755q

How can I restrict so that whenever the user clicks a new (blank) row in the
child datagrid the leftmost column gets the focus?
How can I even check when that a new (blank) row has been activated? As far
as I can see, the events for the datagrid fire only when the row has
actually been added to a datagrid
http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp#q823q

Or is there a better solution. Validation events only annoys the user and
this question has become kind of a political issue now. So I would be
grateful for any help.


Kind regards,

Kenneth Bohman

Ken
 
K

Kenneth Bohman

Thanks,

So I'll create a custom style column. Would you suggest using the
click/double click events or would any of the other mouse events be better?

Yes, PositionChanged should work. I already use it for retrieving data for
the current record. What I can't figure out is why PositionChanged (or is it
CurrentChanged) fires not once, but several times. But that goes for some
other events as well. Which leads me to one more question about new rows and
the leave event, but I'll post that one seperately

Regards,

Kenneth
 

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