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

Input problem editing controls in the datagrid

2 Answers 9 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Theo
Top achievements
Rank 1
Theo asked on 20 Feb 2014, 09:01 AM
http://www.telerik.com/forums/gridview-templateselectors-and-converters

The code in the above thread works now, but a new problem has arisen.
In our code we are using different templates. When you edit a field with a textbox and press enter, it will go to the next field and open a text box for editing. As we have different templates for different input types this is a problem when the next field has a dropdownlist control or a numeric updown control. It is suddenly possible to write a text string to these controls which of course thrown an exception. When selecting the controls with the mouse this problem doesn't occur.

How can I disable this behavior?

2 Answers, 1 is accepted

Sort by
0
Accepted
Dimitrina
Telerik team
answered on 24 Feb 2014, 12:09 PM
Hi,

I was able to reproduce the issue as you described it.
Please set IsReadOnly="True" for the column with the CellTemplateSelector and you should not experience the problem any more.

Let me know how this works for you.

Regards,
Didie
Telerik
0
Theo
Top achievements
Rank 1
answered on 24 Feb 2014, 03:45 PM
It works, although i had to change the string input fields from TextBlock to TextBox, as the textblock fields because read only too.

Thanks
Tags
GridView
Asked by
Theo
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Theo
Top achievements
Rank 1
Share this question
or