Monday 15 March 2010

asp.net mvc - Can a partial view be used to do Ajax item updates? -


I have a table built from a list of fault tables.

Can each part of a row be loaded with the submit sub-table item button?

Sample table:

  & lt; Table & gt; & Lt; Tr & gt; & Lt; Th & gt; Code & lt; / Th & gt; & Lt; Th & gt; Details & lt; / Th & gt; & Lt; Th & gt; Affect your customers & lt; / Th & gt; & Lt; Th & gt; Impact for your colleagues & lt; / Th & gt; & Lt; Th & gt; Save & lt; / Th & gt; & Lt; Th & gt; Save Errors & lt; / Th & gt; & Lt; / Tr & gt;  

Where the first 2 columns come from the lookup table, and the next 3 columns are a form, so that the user can set the values ​​or update them with previous values.

Can I embed 3 TD items in the form of a line as a hidden value with a private AGX form code ID? What will be my exact type of footage? External layer IEnumerable & lt; DefectDTO & gt; Will there be an aspiration of , and partial ideas will be succes to the AssessmentDTO type?

Here is the real table that I am trying to work with:

  & lt; Table & gt; & Lt; TR & gt; & Lt; Th & gt; Code & lt; / Th & gt; & Lt; Th & gt; Details & lt; / Th & gt; & Lt; Th & gt; Document & lt; / Th & gt; & Lt; Th & gt; Required customer contact for resolution & lt; / Th & gt; & Lt; Th & gt; Associate Diversity & lt; / Th & gt; & Lt; Th & gt; Shareholder diversity & lt; / Th & gt; & Lt; Th & gt; Consumer diversity & lt; / Th & gt; & Lt; Th & gt; Regulatory Diversity & lt; / Th & gt; & Lt; Th & gt; Root reason & lt; / Th & gt; & Lt; Th & gt; Investor Requirements * & lt; / Th & gt; & Lt; / TR & gt; & Lt;% foreach (different items in model model) {%> & Lt; TR & gt; By using & lt;% (Ajax.BeginForm ("Create", New AjaxOptions ()), {%> & lt; TD & gt; & lt;% = Html.Encode (item.Code)% & gt; & Lt; / td> gt; & lt;% = html.encode (item description)%> & lt; / td> & lt;% html.reenderpartial ("create ", Blank, viewdata);%  <%}%> <> & lt; / tr & gt; & lt;%}% & Lt; / table & gt;  

  & lt; % Foreach (different items in the model. DefectCodes) {%> using <%> & lt; tr & gt; <(Ajax.BeginForm ("Create", New AjaxOptions ()) {%> & Lt This should be easy! - & Gt; & lt;! - ur codeid -> <% = Html.HiddenFor (modelItem = & gt; item.coidid)%> gt; & lt; TD & gt; & lt;% = Html.Encode (Item.Code)% & gt; & lt; / TD & gt; & lt; TD & gt; & lt;% = Html.Encode (item description)%> & lt; / td & gt; Lt;% HtmlRenderPortial ("Create", blank, Viewed);% & gt; & lt ;! - This is where the form is - & gt; & Lt;%}% & gt; & Lt; / TR & gt; & Lt;%}% & gt; & Lt; / Table & gt;  

Its just fixes its hidden value! Problem ..

You do not need to put it in a TD because it has to be hidden, so it will still get value for u, but will not show in the form In the table or in the view .. In this way you can put 3 TD and you can get more value than shown on the form.


No comments:

Post a Comment