When I edit a text in the text box and then press the button the text in the text box doesn't get updated , the text box doesn't lose focus on the button click...
So for example : when the form loaded the text box contains text "AAA". I click on the text box and start changing the text to "BBB", then (without diselecting the text box) I click "PRINT" button - the printed value would be "AAA" and not "BBB"
7 Answers, 1 is accepted
You can try to execute the RadGridView.CommitEdit method just before printing the value.
I hope this helps.
the Telerik team
Unfortunately it hasn't resolved the issue
I added RadGridView.CommitEdit() on PRINT button's click, but nothing has changed. After the click the text boxed still continued to keep the focus and remains editable....
Here is a video to illustrate the issue
I don't think it shoud be expected as a standard behaviour.When another control (button in this case) is clicked , the text box should lose the focus and commit any performed changes. The workaround we've implemented so far is to use a regular text box control inside of RAD datacolumn with PropertyChanged for UpdateSourceTrigger...
I am glad to hear that you could resolve the problem by yourself.
the Telerik team
has this functionality been implemented yet or is it still a bug in the system. As pointed above, the expected behaviour should be lose focus and I was wondering that its been 6 years since an issue was reported and whether it has been incorporated in Radgrid yet?
The focus is not lost when you click the button because the RadGridView control was designed this way. Basically, nothing can get the focus until the currently edited cell exit the edit mode. This was implemented to avoid invalid data back to the model and therefore the validation to work properly.
To achieve the behavior asked in the original post of this reply, you can manually commit the edit when the button gets clicked. I've attached a small example showing this approach. I hope it helps.