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

[Solved] Validation on Insert with Popup Edit FormTemplate

5 Answers 388 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Buffet
Top achievements
Rank 1
Buffet asked on 13 Jun 2008, 08:45 AM
Hi

I have a RequiredValidator attached to a RadTextBox in an Popup Edit FormTemplate to do Insert. When I click X (top right corner) to close the popup window, the form does the validation and raises error if the field is empty. This is not what I would like to happen.

How do I either (1) get rid of / hide the X button or make it behave like a Cancel LinkButton. The bottom line is it should not do validation upon cancelation.

Please help.
Thanks

5 Answers, 1 is accepted

Sort by
0
Nikita Gourme
Top achievements
Rank 1
answered on 16 Jun 2008, 01:38 PM
Buffet, you will observe the same behavior when you clear the UnitPrice textbox editor in this online demo and then attempt to close the edit form. This will probably happen even if you place a textbox with RequiredFieldValidator attached inside asp Panel and show/hide the panel dynamically switching its Visible property on button click.

A possible solution for your case might be to set the EnableClientScript property of the required validator to false.

Nikita
0
Buffet
Top achievements
Rank 1
answered on 16 Jun 2008, 10:24 PM
Hi Nikita

Thanks for your help.

...but wouldn't it defeat the whole purpose of providing a responsive feedback UI?
0
Nikita Gourme
Top achievements
Rank 1
answered on 17 Jun 2008, 06:57 AM
Well, you are probably right, Buffet, however if the case with asp panel holding textboxes and validators exhibits the same behavior, I suppose that this is more ASP.NET framework-related than grid's stuff. Would you agree?

Nikita
0
Buffet
Top achievements
Rank 1
answered on 20 Jun 2008, 05:56 PM
Hi Nikita

Yes I would agree that it is more with the framework but...don't we all program to and with the framework?

I think it's more like a Telerik bug than a feature. I had a similar issue with the Cancel command, posted here, which I had to workaround (not nice but hey...it's not an ideal world).

Thanks for your help really. I think we have to come to the Telerik Support team's rescue. They have been responsive but this issue!

S.O.S...urgently.... please Telerik.

Thanks
0
Sebastian
Telerik team
answered on 23 Jun 2008, 07:13 AM
Hi Buffet,

I think that as Nikita stated this is more like ASP.NET framework pecularity than RadGrid specific behavior we face here. Do you confirm that you observe the same behavior with the plain ASP.NET Panel control and the textboxes/validators?

I suppose that if you implement the behavior you request in this common scenario, we will gladly help you port it for the RadGrid edit form. Let us know what your findings are.

Best regards,
Stephen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Grid
Asked by
Buffet
Top achievements
Rank 1
Answers by
Nikita Gourme
Top achievements
Rank 1
Buffet
Top achievements
Rank 1
Sebastian
Telerik team
Share this question
or