对于那些试图了解jqGrid自定义编辑类型的人...
我创建了一个多复选框表单元素,并认为我会分享.这是使用3.6.4版本构建的.如果有人有更有效的解决方案,请传递它.
在colModel中,相应的编辑字段如下所示:
edittype:'custom'
editoptions:{ custom_element:MultiCheckElem, custom_value:MultiCheckVal, list:'Check1,Check2,Check3,Check4' }
Run Code Online (Sandbox Code Playgroud)
以下是javascript函数(顺便说一句,当复选框列表在DIV块中时,它也有效 - 经过一些修改):
//————————————————————
// Description:
// MultiCheckElem is the "custom_element" function that builds the custom multiple check box input
// element. From what I have gathered, jqGrid calls this the first time the form is launched. After
// that, only the "custom_value" function is called.
//
// The full list of checkboxes is in the jqGrid "editoptions" section "list" tag (in the options
// parameter).
//————————————————————
function MultiCheckElem( value, options …Run Code Online (Sandbox Code Playgroud) 我不是网络管理员,我是IIS的新手.所以,我正在寻求建议.
我的MVC应用程序(例如fooapp)是我网站的默认应用程序(例如foo.bar).我使用IIS管理器将站点添加到IIS7.当我导入应用程序时,IIS管理器希望将它放在它自己的目录(/ foo)中,并告诉我不应该将它放在基本(站点)目录中.这意味着要进入我的默认MVC视图,我必须输入URL http://foo.bar/fooapp/.不用说,我想通过它到达那里http://foo.bar/
我看到两种可能的解决方案
我的IIS7知识有限.我玩过一些选项(比如HTTP Redirect).由于没有任何改变,我显然不明白我在做什么.
无论如何,如果有一些被认为是"最佳实践"和/或其他建议,请告诉我.
我有一个正确呈现的aspx网页.当转换为剃刀时,它不会.这是一个简化的例子(剥离所有无关的东西).
ASPX:
<asp:Content ID="indexContent" ContentPlaceHolderID="ToolContent" runat="server">
<% string test = "<div><b>Tag Test</b></div>"; %>
<h2><%= test %></h2>
</asp:Content>
Run Code Online (Sandbox Code Playgroud)
剃刀:
@section ToolContent {
@{ string test = "<div><b>Tag Test</b></div>"; }
<h2>@test</h2>
}
Run Code Online (Sandbox Code Playgroud)
aspx按预期呈现.剃刀只在标头标签中显示"test"(<div> <b>标签测试</ b> </ div>)的内容.
我认为我对剃刀的理解是有缺陷的.如果有人能够启发我和/或向我展示解决方案/解决方案,我将非常感激.
asp.net ×1
asp.net-mvc ×1
checkboxlist ×1
deployment ×1
iis-7 ×1
jqgrid ×1
msdeploy ×1
multi-select ×1
razor ×1