Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
TAB changes need to happen on the ENTERKey
posted

I 've a scenerio that my client wants all the TAB changes need to happen on the ENTERKey.This is where two problems are arising for me

1)In a UltraWinGrid when i press enter I'm using sendkeys and move the cursor to the new location.its working for already updated rows,but its not working with the new row,in a new row its getting submitted if I press theENTER key(instead of moving to next location)
2)In a simple form if I have two Ultra textboxs then also the send keys is not working for ENTER key.I mean on Enter cursor should move to next text box,but its not moving and getting converted into a multinine text box.

and one more problem is in the application if I open more then two forms the I get
get Multi threaded exception which we cant even handle and the application is getting closed.

Plesae some one tell me how to achieve the above things and help me .I'm really begging help yare.I've till date wasted lot of time on R&D but could not find something yet.Plesae help me.

Parents
No Data
Reply
  • 2334
    posted
    1) Take a look at KeyActionMappings. KeyActionMappings basically allow you to change how certain Keys act when pressed in the grid
    http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=2028
    http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=1022

    2) I would handle the KeyDown or KeyPress events and if the Key is Enter key then do textBox.GetNextControl(textBox, true) to get the next control in the tab order and call ctl.Focus() to set input focus to the next control.

    3) This sounds like you are trying to update the UI from a non-UI thread. If this is the case I would recommend checking if control.InvokeRequired and using a delegate/anonymous method to call the code on the UI thread.

    Something like this:

    public void MethodThatUpdatesUI(string args)
    {
    if (this.InvokeRequired)
    {
    MethodInvoker mi = new MethodInvoker(delegate()
    {
    MethodThatUpdatesUI(args);
    }).Invoke();
    }
    else
    {
    // update ui
    }
    }
Children
No Data