Here's the format of a sample page :
*Validation Summary*
Label : [input]
Label : [input]
###############
# RadGrid #
###############
###############
# RadGrid #
###############
Label : [input]
[save button]
1st version :
- When I push the save button, the whole page reloads. The validation summary is filled with errors (or not) and the input that are in error are shown in red.
- When I open a RadGrid (custom edit template), the whole page reloads and the save button is desactivated.
- Problem : The whole page is reloaded when we open a grid and it's uhh... not what the customer wants...?
2nd version :
- We have put radAjaxPanel around the radgrids, so when you open a grid, only the grid reloads. Problem : The save button is not desactivated anymore.
- If I click the save button, the whole page still reloads.
3rd version :
- We added a radAjaxPanel to the save button and a line (see footnote) to reload this radAjaxPanel when a RadGrid is opened or closed
- Now the button is activated/desactivated properly.
- Problem : When I push the save button, only the button reloads and if there are error on some fields, they are not turned to red. The validation summary still work.
4th version :
- Added a line (foot note) to reload the whole page when the save button is pushed.
- now the field in error are turned to red
- Problem : this extra postback make the validation summary dissapear.
So, any ideas on how could I have all these options working together?
The easy way out would be to convince the customer to abandon radAjaxPanel (because I feel we use them incorrectly anyway and it brings little advantages).
The whole project architecture is somewhat complex (we emulate .net mvc with webforms (!)) and I feel like code would just add cluttering to the questions, but if you think some specific parts would need more details/code, feel free to ask.
MainRadAjaxPanel.ResponseScripts.Add(string.Format("$find('{0}').ajaxRequest();", MainRadAjaxPanel.ClientID));