html代码:
<div class="item-label">@Html.L("Name"):</div>
<input id="Id" name="Id" value="">
页面加载后绑定数据源:
$(function ()
{
$(‘#Id‘).combogrid({
panelWidth:450,
idField:‘Id‘,
textField:‘Name‘,
url:‘/Contact/Default/List‘,
columns:[[
{ field: ‘Id‘ , title: ‘Id‘ , width: 60, hidden:true },
{ field: ‘Name‘ , title: ‘NameLabel‘ , width: 120,sortable:true },
{ field: ‘Country‘ , title: ‘CountryLabel‘ , width: 100,sortable:true }
]]
});
});
效果如图:
时间: 2024-11-13 10:01:57