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

[Solved] Grid possible malfunction when placed inside a form in IE 7+

7 Answers 209 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Daniel
Top achievements
Rank 1
Daniel asked on 16 Sep 2010, 04:48 PM
When I put the grid inside a form (I use grid with Ajax Mode and the Html.BeginForm-Html.EndForm for form) it presents a malfunction when performing some action on it (refresh, filter, add, edit, etc.).

In IE7 multiply rows appears when I perform some action.
In IE8 the grid is cut in two.
In Mozilla Firefox work fine.

If I put the grid out the form, It's work fine. For while I put the grid out the form, but in some cases I need put the grid inside the form.

Any Solution?

I attach images.

7 Answers, 1 is accepted

Sort by
0
Accepted
Atanas Korchev
Telerik team
answered on 17 Sep 2010, 07:06 AM
Hi Daniel,

This is not supported. An editable grid (or grid with a delete command) renders a form by itself. HTML does not support nested forms hence there are such rendering problems. I recommend you move the grid out of the form.

Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Joan Vilariño
Top achievements
Rank 2
answered on 17 Sep 2010, 10:46 AM
Strange... I do that all the time and I haven't got any issue... most of complicated forms are made of a master view that has a form with a TabStrip inside that loads several .ascx views. Lots of that views have editable Telerik's grids inside and they work like a charm.
0
Daniel
Top achievements
Rank 1
answered on 17 Sep 2010, 03:40 PM
@Atanas.

Thanks for the advice.


@ Joan.

Yes, here we also work with multiple .acsx views. The problem is that one of them it loads an HTML form and inside i put a grid.
0
Rick
Top achievements
Rank 1
answered on 10 Mar 2011, 03:24 PM
hmm .. telerik mvc grid generates its own form ???  Where is this major drawback documented?  Who would expect an "html helper" component to generate a form, how could telerik possibly think this was a 'good idea'?
 
Is there any plan to fix this major flaw in the product? 
Also, could you tell me if there are any other components that exhibit this bizarre behaviour?

"move your grid out of the form"  is a very easy thing for a support person to say, but it just may mean a redesign of an entire suite of pages. We have a "wizard" style of multi-page guided tasks, the 'form' element is in the layout .. suffice to say that "moving the grid out of the form" is not really possible ..

quite disappointed,
Rick.
0
Atanas Korchev
Telerik team
answered on 10 Mar 2011, 03:42 PM
Hi Rick,

 The grid must generate a form because of the built-in editing feature - input elements need a form. If you don't have editing enabled or a delete command column (which also needs a form in order to POST) you can embed the grid inside a form.

 We do not consider this a "major" drawback as forms are the only way to post data to the server when JavaScript is not enabled. Thus the Telerik MVC Grid will always generate a form when editing is enabled. 

Regards,

Atanas Korchev
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
James
Top achievements
Rank 1
answered on 16 Apr 2012, 03:16 PM
Hi
is this still the case with the latest version of the MVC controls?
I've hit this issue where I've a scenario where on screen I'm displaying the master record in panels (e.g. a person), within one panel there are child details (e.g. status information on past addresses) which has a telerik grid to display (and allow edit / update of) the address details.

This works in Firefox, though in IE 8 after an initial post back if there are validation errors I can see nested Form tags and the page no longer works.

cheers
0
Kenneth
Top achievements
Rank 1
answered on 15 Jun 2012, 04:42 PM
@James

Yes, it's still an issue.  It's frustrating as most browsers are OK with it, but I'm getting issues with IE8, when using Document Mode IE8 Standards.  Hats off to IE actually conforming to standards, but this is actually a time when it's not a good idea!  =)

@Atanas

I understand it's part of the html specs, but does Telerik really think that their grids will never be used within a form?  I agree with @Rick on this issue.

At least in the case of using GridEditMode.InCell for the grid.  Why does the Delete command button generate a form element if I'm using batch-editing?  There's no POSTing of information going in this situation, the deleted item just gets documented in the grid's client side object.
Tags
Grid
Asked by
Daniel
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Joan Vilariño
Top achievements
Rank 2
Daniel
Top achievements
Rank 1
Rick
Top achievements
Rank 1
James
Top achievements
Rank 1
Kenneth
Top achievements
Rank 1
Share this question
or