This question is locked. New answers and comments are not allowed.
I was having a problem with an MVC grid in Cell Edit mode. If I use the toolbar commands SubmitChanges.. it properly posts the grid info to my specified Ajax().Update method.
However, I don't want to use the built in controls, so I am calling the grids client side submittChanges() method. However, this POSTs back the form rather than just doing an Ajax submit.
I have found that if the grid is not in the form tags, then it does an ajax post properly from the API just like the command buttons do.
Is this a bug, or a limitation of the grid?
BOb
However, I don't want to use the built in controls, so I am calling the grids client side submittChanges() method. However, this POSTs back the form rather than just doing an Ajax submit.
I have found that if the grid is not in the form tags, then it does an ajax post properly from the API just like the command buttons do.
Is this a bug, or a limitation of the grid?
BOb
4 Answers, 1 is accepted
0
Hello Bob,
The submitChanges method is used internally by the toolbar command click handler so there shouldn't be any difference. The form will be posted if the button type is not explicitly set to "button" as by default it is "submit".
Also, the Grid should be moved out of the form. When editing is enabled the Grid will generate its own form and nested forms are not supported by browsers.
Regards,
Daniel
the Telerik team
The submitChanges method is used internally by the toolbar command click handler so there shouldn't be any difference. The form will be posted if the button type is not explicitly set to "button" as by default it is "submit".
Also, the Grid should be moved out of the form. When editing is enabled the Grid will generate its own form and nested forms are not supported by browsers.
Regards,
Daniel
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.
0
Bob
Top achievements
Rank 1
answered on 05 Jun 2012, 02:19 PM
>The submitChanges method is used internally by the toolbar command click handler so there shouldn't be any difference.
Yes, but there is. I didn't make this up and tried it several times. Did you try it?
>The form will be posted if the button type is not explicitly set to "button" as by default it is "submit".
Which is why I wasn't using a submit button. I'm 99% sure it had type=button... that was the first thing I checked since I thought this was what was happening.
>Also, the Grid should be moved out of the form. When editing is enabled the Grid will generate its own form and nested forms are not supported by browsers.
Is that documented somewhere?
BOb
Yes, but there is. I didn't make this up and tried it several times. Did you try it?
>The form will be posted if the button type is not explicitly set to "button" as by default it is "submit".
Which is why I wasn't using a submit button. I'm 99% sure it had type=button... that was the first thing I checked since I thought this was what was happening.
>Also, the Grid should be moved out of the form. When editing is enabled the Grid will generate its own form and nested forms are not supported by browsers.
Is that documented somewhere?
BOb
0
Accepted
Hello again Bob,
I tried to reproduce the issue on my side but to no avail. I am attaching a sample project with Grid in a form which uses external button and the submitChanges method. Could you check it and let me know if I am missing something?
Regarding your other question - we don't have official documentation regarding nested forms as this is general topic.
Regards,
Daniel
the Telerik team
I tried to reproduce the issue on my side but to no avail. I am attaching a sample project with Grid in a form which uses external button and the submitChanges method. Could you check it and let me know if I am missing something?
Regarding your other question - we don't have official documentation regarding nested forms as this is general topic.
Regards,
Daniel
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.
0
Bob
Top achievements
Rank 1
answered on 08 Jun 2012, 03:34 PM
Ok thanks. I decided to go another way and do my own AJAX so stuff is saved as it is edited rather than batching it.
BOb
BOb