Jump to content

DBGrid Problem


dionel1969

Recommended Posts

I have a form with 5 Edits and 1 DBGrid. The property of TabStop of first 3 Edits and the DBGrid is off, because I need that the user navigate only with Tab or Enter key through the last two Edits, and when the user clicks on the DBGrid it will be selected. Any way when the user exit from last edit the dbgrid become selected.

 

post-125-0-47764900-1312904670_thumb.png

Link to comment
Share on other sites

  • Administrators

Something like this:

 

function doNextTab(sender, e)
{
  var c=null; 
  var a=e.getCharCode(); 
  if (a==9) {
       c=sender.nextSibling();
       while (c && !c.events['keypress'])  {
               c=c.nextSibling();
       }
  } 
  if (c) c.focus();
}

 

 

For each Editable Control add below to OnKeyPress client event:

 

function OnKeypress(sender, e)
{
  doNextTab(sender, e);
}

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...