1
我正在開發使用JQGrid的MVC應用程序。在JQGrid中,我需要顯示國家/地區名稱,但我已保存國家/地區ID當數據來自數據庫時,國家/地區屬性爲空。JQGrid DropDownListing
public partial class
{
public int ID { get; set; }
public string Name { get; set; }
public string Code { get; set; }
public int CountryID { get; set; }
public Nullable<System.DateTime> CreatedOn { get; set; }
public Nullable<System.DateTime> UpdatedOn { get; set; }
public string Description { get; set; }
public virtual Country Country { get; set; }
}
在JavaScript
colModel: [
{ key: true, hidden: true, name: 'ID', index: 'ID', sorttype: 'int' },
{ name: 'Name', index: 'Name', editable: true, inlineEditing: { keys: true }, minlength: 6 },
{ name: 'Description', index: 'Description', editable: true, inlineEditing: { keys: true } },
{ name: 'Country.Name', index: 'Country.Name', CountryID: 'name', editable: true, edittype: "select", editoptions: { value: citySelect() } },
],
它不工作更新您的山坳模型。 –
它如何不工作?你能詳細解釋一下嗎? –