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' , 60, hidden:true },
{ field: 'Name' , title: 'NameLabel' , 120,sortable:true },
{ field: 'Country' , title: 'CountryLabel' , 100,sortable:true }
]]
});
});
效果如图: