Feb 24, 2015, 8:15 PM
[CLOSED] X.MultiCombo() in Grid
Hi, i am using a X.MultiCombo() in grid. While populating data in the grid store i am setting the values as comma separated string of IDs like - "1,2". But the items are not getting selected in the MultiCombo, rather "1,2" is coming as display on the MultiCombo.
Can you please guide me to resolve this -
Can you please guide me to resolve this -
X.GridPanel()
.ID("gridSelected")
.Width(470)
.Height(275)
.Title("Selected Programs")
.Margins("2 2 2 2")
.Store(X.Store()
.ID("selectedStore")
.Model(X.Model()
.Fields(
new ModelField("ProgramID", ModelFieldType.String) { Mapping = "ProgramID" },
new ModelField("ProgramName", ModelFieldType.String) { Mapping = "ProgramName" },
new ModelField("ProgramTypeName", ModelFieldType.String) { Mapping = "ProgramTypeName" },
new ModelField("ProgramCategoryName", ModelFieldType.String) { Mapping = "ProgramCategoryName" },
new ModelField("ShiftsAssociated", ModelFieldType.String) { Mapping = "ShiftsAssociated" }
)
)
)
.ColumnModel(
X.Column().Text("ID").DataIndex("ProgramID").Hidden(true),
X.Column().Text("Name").DataIndex("ProgramName").Flex(1),
X.ComponentColumn()
.Editor(true)
.DataIndex("ShiftsAssociated")
.Text("Shift")
.Component(X.MultiCombo()
.Store(
X.Store()
.Model(X.Model()
.IDProperty("ID")
.Fields(
new ModelField("ShiftID", ModelFieldType.Int) { Mapping = "ShiftID" },
new ModelField("ShiftName", ModelFieldType.String) { Mapping = "ShiftName" }
)
)
.DataSource(Model.ShiftList)
)
.DisplayField("ShiftName")
.ValueField("ShiftID")
),
X.Column().Text("Type").DataIndex("ProgramTypeName").Width(60),
X.Column().Text("Category").DataIndex("ProgramCategoryName").Width(60)
)
.SelectionModel(X.RowSelectionModel().Mode(SelectionMode.Multi))
Last edited by fabricio.murta; Feb 28, 2015 at 4:38 PM.
Reason: [CLOSED]