The new project needs to use a appendgrid-like control, but of course the beginning is not aware of the control, and the beginning is to make the following
This is actually Bugfree's search bar, and I also said that I do not want to do this thing should be called, in general can be said to add or delete a set of input control, I use the MVC framework, because the level of limited, time is limited, so the first thought is the jquery plug-in, the Internet search, Because I do not know what keywords to search more accurate, so I just a one to see, see a lot of not suitable, and later in the Chinese Open Source community (Http://www.oschina.net/p/appendgrid) saw this plugin, although and I began to want to do not the same, But the function is the same.
Can be implemented dynamically add and delete input boxes, specific access to this plugin's official website http://appendgrid.apphb.com/
Trial, the front desk is good to say, how to back to the background data bothered me for a while, and finally used the official website of the server-side handling, combined with the stack overflow on this article http://stackoverflow.com/ Questions/22376112/jquery-appendgrid-with-mvc4-controller,
The reception of the method as follows, is the use of JS serialization, and then Post mode to submit form, backstage in accordance with the official website said to do can receive data
<script type= "Text/javascript" >$ (' #dialog_Save-button '). button (). Click (function () { var oData = $ ( Document.forms[0]). Serialize () alert (oData); $.ajax ({ type: ' Post ', URL: "/configuration/newfilter", Data:odata, success:alert ("Record Udpatesucessfully. ")}); </script>
If you are interested in my article welcome message, if there is a better solution welcome to guide
Use of Appendgrid