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

Selecting text in GridViewTextBoxEditor

2 Answers 60 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Christopher
Top achievements
Rank 1
Christopher asked on 24 Oct 2008, 02:41 PM
Greetings,
  I am attempting to have the text in a GridViewTextBoxEditor selected when a user sets focus to a cell using that editor.

I'm not finding any access to the underling TextBox object (I am assuming there must be one) via either the GridViewTextBoxEditor or the Field object of a cell.

I was expecting to the standard selection and caret properties/method exposed via the GridViewTextBoxEditor.

Any ideas?

Thanks,
   Chris

2 Answers, 1 is accepted

Sort by
0
Accepted
Dimitar Dobrev
Telerik team
answered on 27 Oct 2008, 10:57 AM
Hi Chris,

In the attached archive you can find an example of a text editor that selects its text. I used four steps:

1. The class SelectedTextBoxEditor takes care of selecting the text;
2. SelectedTextBoxEditorSettings indicates, through its generic type parameter, the class from which to create an instance of the editor;
3. The columns using the modified editor need to be defined explicitly;
4. A simple control template for SelectedTextBoxEditor should also be defined.

In our Q3 release in November you will find this feature built-in.
Thank you for your question. We will be glad to be of further assistance if necessary.

All the best,
Dimitar Dobrev,
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Christopher
Top achievements
Rank 1
answered on 27 Oct 2008, 12:35 PM
Dimitar,
    Thanks for the information and the example.  I'll try this right away and update the thread as answered shortly.
Thanks,
   Chris



Tags
GridView
Asked by
Christopher
Top achievements
Rank 1
Answers by
Dimitar Dobrev
Telerik team
Christopher
Top achievements
Rank 1
Share this question
or