Hi,
I have a Grid with a DropDownList column and another TextFields with ClientTemplate. The DropDownList shows a Spinner where I can select the ID of list, and when the field lost focus, shows a text with the text field of list.
I need that when I click on column, show me the DropDownList, not a Spinner.
Regards,
Daniel
I have a Grid with a DropDownList column and another TextFields with ClientTemplate. The DropDownList shows a Spinner where I can select the ID of list, and when the field lost focus, shows a text with the text field of list.
I need that when I click on column, show me the DropDownList, not a Spinner.
@(Html.Kendo().Grid(Model.Contacts)
.Name("Contacts")
.ToolBar(tools => tools.Create().Text("Agregar nuevo contacto"))
.Editable(editable => editable.Mode(GridEditMode.InCell).CreateAt(GridInsertRowPosition.Bottom))
.Columns(columns =>
{
columns.Bound(p => p.Name).ClientTemplate("#= Name #" +
"<
input
type
=
'hidden'
name
=
'Contacts[#= indexContactsBasic(data)#].Name'
value
=
'#= Name #'
/>"
);
columns.Bound(p => p.CellPhone).ClientTemplate("#= CellPhone #" +
"<
input
type
=
'hidden'
name
=
'Contacts[#= indexContactsBasic(data)#].CellPhone'
value
=
'#= CellPhone #'
/>"
);
columns.Bound(p => p.Email).ClientTemplate("#= Email #" +
"<
input
type
=
'hidden'
name
=
'Contacts[#= indexContactsBasic(data)#].Email'
value
=
'#= Email #'
/>"
);
columns.Bound(p => p.Occupation).ClientTemplate("#= Occupation #" +
"<
input
type
=
'hidden'
name
=
'Contacts[#= indexContactsBasic(data)#].Occupation'
value
=
'#= Occupation #'
/>"
);
columns.ForeignKey(p => p.ThirdPartyId, ViewBag.EmployeeInformationId as SelectList, "Value", "Text").Width(100);
columns.Command(command => command.Destroy()).Width(100);
})
.DataSource(dataSource => dataSource
.Ajax()
.Model(model =>
{
model.Id(p => p.Id);
})
.ServerOperation(false)
)
)
Regards,
Daniel