1
我想在Jtable中的选项“添加新记录”JTable和项目列表中创建列表框。高级JTable数据列表
我的模型:
namespace CRM.ViewModels.Administrator.Dictionary.OfferNewInformation
{
public class DictionaryNewInfoListModel : DictionaryListModel
{
public string Description { get; set; }
public bool IsActiveYN { get; set; }
public bool CPGroupType { get; set; }
public bool TCPGroupType { get; set; }
public bool CCGroupType { get; set; }
public bool HOGroupType { get; set; }
public bool TSGroupType { get; set; }
public int CityId { get; set; }
public List<DictionaryNewInfoSupportList> DeestynationName { get; set; }
// public IList<SelectListItem> DestinationList { get; set; }
}
}
重要的东西(这个类有列表编号和名称):
public List<DictionaryNewInfoSupportList> DeestynationName { get; set; }
类
public class DictionaryNewInfoSupportList
{
public int Id;
public string Name;
}
在查看我秀例如:
fields: {
Id:
{
key: true,
create: false,
edit: false,
list: false
},
Description: {
title: 'Treść'
}/*,
DeestynationName: {
title: 'Treść'
}*/,
CPGroupType: {
title: "CP",
edit: true,
type: 'checkbox',
values: { 'false': 'Nie', 'true': 'Tak' }
},
TCPGroupType: {
title: "TCP",
edit: true,
type: 'checkbox',
values: { 'false': 'Nie', 'true': 'Tak' }
},
CCGroupType: {
title: "CC",
edit: true,
type: 'checkbox',
values: { 'false': 'Nie', 'true': 'Tak' }
},
HOGroupType: {
title: "Centrala",
edit: true,
type: 'checkbox',
values: { 'false': 'Nie', 'true': 'Tak' }
},
TSGroupType: {
title: "Kasjer",
edit: true,
type: 'checkbox',
values: { 'false': 'Nie', 'true': 'Tak' }
}
但正如你所看到的,我不知道如何声明DeestynationName。项目
列表(例如 - 我需要什么)
if(DeestynationName.id==model.id) show list of Name
在“添加新记录”我需要列表框与在此列表中的元素(例如 - 我需要什么):
@Html.DropDownListFor(m => m.CurrentVoucher, new System.Web.Mvc.SelectList(Model.DictionaryNewInfoSupportList, "Id", "Name"), new { style = "width:140px" })