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

EditFormSetting should not get close after validation message.

1 Answer 54 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Manoj
Top achievements
Rank 1
Manoj asked on 15 Dec 2010, 07:56 AM
Hi friends,
I have a radgrid in and editformsetting for adding and editing the rows in radgrid, but the problem is that whenever user does not select any checkbox and directly hit the add or update button i display message for selection, after clicking ok button in message box my editformsetting get close and user have to again click on add or edit and have to enter\edit the values which is quite uncomfortable, how can i stop editformsetting from getting close after clicking ok button in messagebox my message box is of internet explorer i.e Page.RegisterstartUpscript.

Please help.

Thanks in advance.

Manoj Gupta

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 15 Dec 2010, 12:22 PM
Hello Manoj,


One suggestion is attaching "OnClientClick" method to "OK" button and checking for whether the CheckBox is cehcked or not. You need to add the "onclick" event by accessing the controls in ItemCreated event. Pass the CheckBox ClientID as parameter to event handler. Now if the cehckbox is not checked, then cancel the event using the code "return false;".

Hope the suggestion helps.


-Shinu.
Tags
Ajax
Asked by
Manoj
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or