Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
300
RowEditTemplate & EnableAllowFocusChange
posted

Hi,

I am using an UltraWinGrid with a RowEditTemplate in a form. When the user clicks the edit button the RowEditTemplate appears. It contains two fields, a Name and Description for a data bound object. The Name is a required field. 
I have replaced the auto generated proxy fields in the RowEditTemplate with my own UltraTextEdit fields which i bind with my underlying object. I also have an ErrorProvider control on the form. When the RowEditTemplate appears i clone the row's underlying object and bind the controls of the RowEditTemplate with the cloned object. I would like to update the row cells only when the user clicks ok button by copying the cloned object's properties to the initial object properties.
The problem is that when the user deletes the name on the RowEditTemplate and tries to nagigate away from the control, it cannot loose focus. The ErrorProvider correctly shows the required message but Name control cannot loose focus. The AutoValidate on the form is set to EnableAllowFocusChange.
I did also try to create two UltraTextEdit controls out of the RowEditTemplate, on the same form, bound to the same object like the controls on the Template. Validation works as expected on these controls and Name control can loose focus.It seems like RowEditTemplate ignores the AutoValidate Property of the form even when the bound object is not this of the edited row but a cloned one.

I would like the user to be notified of the Error on the appropriate control on the RowEditTemplate and the same time to allow the user to navigate to another control on the RowEditTemplate. Any ideas?

Parents Reply Children
No Data