EditMode rewrites first character

8 posts, 0 answers
  1. beavisCZ
    beavisCZ avatar
    21 posts
    Member since:
    May 2007

    Posted 14 Dec 2010 Link to this post

    Hello,
    I have RadGridView and there one editable numeric column. If I'm on editable cell and I want to enter for example number "635", when I press "6" column enter to edit mode and highlight previous number and then next numbers are entered, so If user enters 635 then in final there is only 35 in this cell. Is it possible to set somehow that first pressed key is also entered? Users want same functionality as in excel so enter numbers and then pres down and go to next cell. I'm not able to make this work in radgrid.
  2. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 14 Dec 2010 Link to this post

    Hello,

    I'm not sure if I underatand your issue. A RadGridView with a GridViewDecimalColumn will have a spin editor as its editor. Please could you explain in more detail and if possible include any supporting screenshots.

    Thanks
    Richard
  3. UI for WinForms is Visual Studio 2017 Ready
  4. beavisCZ
    beavisCZ avatar
    21 posts
    Member since:
    May 2007

    Posted 14 Dec 2010 Link to this post

    For example, run RadControls Demo, GridView, Manipulate Data, Expressions.
    I want change cell in column Decimal. For example I want enter number 50, so I press "5" and "0" and "Enter". I include image after each key pressed.

    Result is 0 in this cell instead 50.
  5. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 14 Dec 2010 Link to this post

    Hello,

    Thanks. I understand what you mean now. However, I'd ask what version of the controls you are using? I've tried this in teh latest version of the control in the demo (same place) and it works as expected.

    Richard
  6. beavisCZ
    beavisCZ avatar
    21 posts
    Member since:
    May 2007

    Posted 14 Dec 2010 Link to this post

    Q3 2010
  7. beavisCZ
    beavisCZ avatar
    21 posts
    Member since:
    May 2007

    Posted 14 Dec 2010 Link to this post

    It is important not enter into edit mode by F2 or Enter but by entering numbers. If I press F2 or Enter before entering, all wokrs ok. But I want to enter numbers without enabling editmode by F2 or Enter.
  8. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 14 Dec 2010 Link to this post

    Hello,

    Yes, I see the issue. I'll see if I can find a workaround for you as soon as possible, but I'd say this was a bug as you've suggested.
    Richard
  9. Svett
    Admin
    Svett avatar
    728 posts

    Posted 20 Dec 2010 Link to this post

    Hello beavisCZ,

    The scenario that you have experienced is a known issue. I am glad to inform you that the issue has been addressed in Q3 2010 SP1 that we have just released. In the meantime, you can subscribe to the KeyPress event where your can change the selection position of the editor:

    private void radGridView1_KeyPress(object sender, KeyPressEventArgs e)
    {
        GridSpinEditor spinEditor = this.radGridView1.ActiveEditor as GridSpinEditor;
     
        if (spinEditor == null)
        {
            return;
        }
     
        GridSpinEditorElement editorElement = (GridSpinEditorElement)spinEditor.EditorElement;
        editorElement.TextBoxItem.SelectionStart = 1;
        editorElement.TextBoxItem.SelectionLength = 0;
    }

    I hope this helps.

    Greetings,
    Svett
    the Telerik team

     

    Check out the Q1 2011 Roadmap for Telerik Controls for Windows Forms.
Back to Top
UI for WinForms is Visual Studio 2017 Ready