Hi,
When I click a button on my form one of my text editors' text is set automatically like this:
myTextEditor.Text = DateTime.Now.ToString("dd.MM.yyyy HH:mm:ss") + " name of user";
This texteditor is bound to a dataset in designer. When I now want to save my changes by clicking another "save" button, the dataset does not have the text value of this texteditor.
Its only working if I really click into the text editor and put in text manuallybefore saving the ds.
So it seems that my text editor does not accept the automatic added text once I am saving the dataset.
Any ideas?
I try to reproduce your scenario in a small sample where I`m using UltraTextEditor, UltraGrid with DataSet which bind both controls.
In my test sample, the DataSet is updated from UltraTextEditor, so I just need to Refresh the UltraGrid. Other possible approach could be to set the Focus into UltraTextEditor befor set the Text property.
Please take a look at the attached video for more details and let me know if you think that I misunderstood your scenario or if you have any questions.
Regards
Hi Georgi,
Focus method before setting the text is working yes. But I found out what the problem is:
Data Source Update Mode is das efault set to "onValidation". Because of the fact, that I just write a string into the texteditor without enteruing the control, there is no validation. So I just changed the data source update mode in Data Bindings --> Advanced to "OnPropertyChanged" and everything is working fine.
Thanks,
Alex
Hello Alex,
Thanks for your response. Please feel free to write us if you have any further questions.