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?
It's pretty tough to guess why this isn't working without seeing exactly what you are doing. Could you reproduce this in a small sample project?
Hi Mike,
I have a grid with 4 columns. I am creating Rowedittemplate in runtime. I want to bind an user control for a cell. Is it possible?
I tried the following code to bind.
dim loCell as new uiTextcontrol
loCell.DataBindings.Add(
"Text", uiRowEditTemplate, QbGrid.DisplayLayout.Bands(0).Columns(lnCnt).Key)
My usercontrol having 3 controls. 2 label controls and a text box. I have a property "Text" & "Value" for the user control which actually gives/sets the value or text to the textbox inside the usercontrol.
The usercontrol is displaying on the row edit template. But the value is not coming from the grid cell and viceversia. Please guide me?. Whether i have to set any property?
Hi Kostas,
I think you will be receiving a notification from Developer Support soon, if you have not already, but I just wanted to let you know that we have resolved the issue here.
This turns out not to be a bug, per se. What's happening is that you are setting the AutoValidate property on the main form in your application to EnableAllowFocusChange. But this has no effect on the RowEditTemplate, because theRowEditTemplate is not on this form. The RET creates it's own dialog to display itself and no one is setting AutoValidate on this RET form.
So, you can easily work around this issue by setting AutoValidate on the dialog that is created by the RET. Like so:
private void BusinessObjectsGrid_AfterRowEditTemplateDisplayed(object sender, AfterRowEditTemplateDisplayedEventArgs e) { Form form = e.Template.FindForm(); if (form != null && form != this) { form.AutoValidate = AutoValidate.EnableAllowFocusChange; } }
This was pretty tough to figure out, though. So to make things easier, we will be adding an AutoValidate property to the DialogSettings of the RET. This will be in the next service release.
Note that this property cannot be exposed in the property grid at design-time for v9.2 and v10.1, since this would cause issues with backward compatibility. So the property is available in those (older) versions only at run-time. In v10.2 and up, the property will display in the property grid as normal.
Hi Konstantinos,
I have created a support case with number CAS-44479-0LGXFV. If you have any further questions please update them to the created case or if you want to check the progress of this issue.
Best Regards,
Stefaniya
Developer Support Engineer
Infragistics, Inc
http://ko.infragistics.com/support
Thank you Mike,
Please update this post when you have something new.