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
725
selectAllText when entering in editMode
posted

Hi.

I'm using infragistics for windows UI; to program some apps for the windows RT so :

i have a xamGrid and i use the XamNumericInput in each cell; when i enter in edit mode i want to selectall text in the cell

I tried this code :

private void dataGrid_CellEnteredEditMode(object sender, EditingCellEventArgs e)
{
var txt = e.Editor as Infragistics.Controls.Editors.XamNumericInput;
if (txt != null)
{
  txt.SelectAll();
}
}

May be something is wrong.

can you help me to resolve that please.

thx

Parents
  • 16495
    Verified Answer
    Offline posted

    Hello Lahmar,

     

    Thank you for your post.

     

    I have been looking into it and the code snippet that you have provided. What I can suggest is to handle the GotFocus event of  XamNumericInput and create your logic in its event  handler. I created a short sample application based on your scenario to show you how you can implement the functionality that you want to achieve. In the sample I handled the GotFocus of XamNumericInput. In the handler I get the XamNumericInput and set it`s  SelectAll method to achieve the behavior that you want.

     

    Please let me know if you need any further assistance on the matter.

    SelectAllInEditMode.zip
Reply Children