This is a migrated thread and some comments may be shown as answers.

EditMode rewrites first character

7 Answers 103 Views
GridView
This is a migrated thread and some comments may be shown as answers.
beavisCZ
Top achievements
Rank 1
beavisCZ asked on 14 Dec 2010, 04:31 PM
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.

7 Answers, 1 is accepted

Sort by
0
Richard Slade
Top achievements
Rank 2
answered on 14 Dec 2010, 04:43 PM
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
0
beavisCZ
Top achievements
Rank 1
answered on 14 Dec 2010, 04:50 PM
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.
0
Richard Slade
Top achievements
Rank 2
answered on 14 Dec 2010, 04:56 PM
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
0
beavisCZ
Top achievements
Rank 1
answered on 14 Dec 2010, 04:56 PM
Q3 2010
0
beavisCZ
Top achievements
Rank 1
answered on 14 Dec 2010, 05:01 PM
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.
0
Richard Slade
Top achievements
Rank 2
answered on 14 Dec 2010, 05:28 PM
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
0
Svett
Telerik team
answered on 20 Dec 2010, 02:15 PM
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.
Tags
GridView
Asked by
beavisCZ
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
beavisCZ
Top achievements
Rank 1
Svett
Telerik team
Share this question
or