views:

32

answers:

1

i have an html table in my asp.net mvc view an i am running into some real estate issues with screen space.

I think in one area of my view i am going to have a button in a column of an html table that says "Details" which, when clicked, loads up some dialog ui. what i am trying to get my head around is that i want the fields in the dialog to also be part of data binding object in the overall form which i am passing to the controller when i submit the form.

is there anything that i should be worried about or anything that you need to do special if you have a form where inside your form you have a button that create a popup with some more details elements. I am just trying to see from a data binding view if there are any issues.

also any examples of doing anything similar would be great.


EDIT

So i tried doing this an ran into a binding issue. i have a follow up question with the specifics about this binding issue with jquery ui dialog here:

http://stackoverflow.com/questions/2077196/why-does-jquery-ui-dialog-break-the-default-model-binding

+1  A: 

There shouldn't be any issues if you are binding elements from your popup dialog to corresponding hidden elements in your main view. These hidden elements will bind correctly like any other control in your main form.

Of course, you might be POSTing the form elements from your popup form to its own controller method directly, and that is also a perfectly good approach.

Robert Harvey
i wouldn't want my popup form to itself post to a controller method ( think :) ). i essentially want it to simple add extra elements to my object that i am binding to. any dialog recommendations?? . . .
ooo
You probably want something like this: http://jqueryui.com/demos/dialog. Click on the link to the right that says "Modal Form". Source code is available.
Robert Harvey
i have updated the question as i am running into an issue where it doesn't seem to work .. . here is my follow up question: http://stackoverflow.com/questions/2077196/why-does-jquery-ui-dialog-break-the-default-model-binding
ooo