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

[Solved] Grid breaks sibling form

3 Answers 89 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Alex
Top achievements
Rank 1
Alex asked on 20 Mar 2012, 04:32 PM
Using 2012 Q1 release. I have an ajax form Ajax.BeginForm with a submit button.  Below, on the same page, but outside the form I have an InLine editable grid.  I can change the input values in the form and submit OK in IE compatibility mode, but doesn't work in non-compatibility mode, Chrome, or Safari.  When I change the input values in the form I get the following errors in the browser Console:

IE:
SCRIPT5007: Unable to get value of the property 'call': object is null or undefined
asset.axd?id=_QAAAB-LCAAAAAAABADsvQdgHEmWJSYvbcp7f0r1StfgdKEIgGATJNiQQBDswYjN5pLsHWlHIymrKoHKZVZlXWYWQMztnbz33nvvvffee--997o7nU4n99__P1xmZAFs9s5K2smeIYCqyB8_fnwfPyJ-8Uezjx597xd_tPro0Uevp3WxapuPRh-d82dL-qzNy7wu3o6n1WJRLcc_jW-rjx7t_JJR-H2bv2sn1TvbYLfb4KIuZvbbPfPtT_-idV5fjy-zsphlbW4b3Iu-ns-Ktlhe2Fb7v-T7v-T7o4-mLTd819796ewya3gU1OCSPt3b2d0b7473dvfpgykN9d6n9-mXjx619Tr_Jf9PAAAA__-9AyQn_QAAAA%3d%3d, line 31 character 260

 Chrome:
Uncaught TypeError: Cannot call method 'call' of undefined
c.extend.checkasset.axd:32
c.extend.elementasset.axd:27
c.extend.defaults.onkeyupasset.axd:22
aasset.axd:24
c.extend.validateDelegateasset.axd:53
f.event.dispatchjquery-1.7.1.min.js:3
f.event.add.h.handle.i

Submitting the form fails as well.

I have another page in my application that has a form and editable grid, but the form and grid are loaded through separate ajax calls and the form works fine on that page.

Any suggestions for fixing, troubleshooting?

3 Answers, 1 is accepted

Sort by
0
Roger
Top achievements
Rank 1
answered on 22 Jun 2012, 01:20 AM
I have exactly the same issue - had to back out the ajax form component e.g. Ajax.BeginForm and move to manual Jquery JSON submit.
There seems to be a clash with the grid component when you have .Editable(editing => editing.Mode(GridEditMode.InCell)) and a ajax submit form on the same page - remove the edit and the form works...remove the form and the grid edit works.
Jquery 1.7.2
Telerik MVC 2012.1.214.340 
0
Roger
Top achievements
Rank 1
answered on 09 Jul 2012, 03:51 AM
Update: 
Manual jquery submission of the form still doesn't resolve the issue.
Does anyone have a possible solution or work around to this?
thx
0
Roger
Top achievements
Rank 1
answered on 09 Jul 2012, 04:50 AM
this seems to be the fix:
http://stackoverflow.com/questions/7283022/telerik-mvc-window-jquery-validator-issue 

It seems that the version of telerik jquery and jquery validation must be used or this problem occurs..

I had to do the following - in this order at the top of the page:
 @(Html.Telerik().ScriptRegistrar().Globalization(true).jQuery(true).jQueryValidation(true)
                                    .DefaultGroup(group => group
                                        .Enabled(true)
              // .Combined(true).Compress(true)
                                    )
                                    )

    <!--script src="@Url.Content("~/Scripts/jquery-1.7.2.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script-->
    
    <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.min.js")" type="text/javascript"></script>
 
Tags
General Discussions
Asked by
Alex
Top achievements
Rank 1
Answers by
Roger
Top achievements
Rank 1
Share this question
or