Hello,
is there a way to achieve a google-like suggestion dropdown list in Grid?
I have a normal grid, with a "Create" function in its toolbar. The column accepts any strings, which are saved in the database.
I attached a screenshot of the grid.
Is it possible to have a dropdown list under the cell, where the cursor is active?
The cell got to accept any strings, in case a Company name is not saved earlier in the database.
What I'm trying to achieve is to suggest the user what strings were saved in the form in the past.
The grid is nothing fancy:
@Html
.Label
(WorkPermitLabels
.NonContractedCompanyName
,
new
{
@class
=
"control-label"
})
@Html
.Hidden
(
"NonContractedCompany"
,
""
)
@
(Html
.Kendo
()
.Grid
(Model
.NonContractedCompanies
)
.Name
(
"nonContractedCompanies"
)
.Columns
(col =>
{
col
.Bound
(v => v
.Name
);
col
.Command
(v =>
{
v
.Edit
();
v
.Destroy
();
});
})
.Editable
(e => e
.Mode
(GridEditMode
.InLine
))
.HtmlAttributes
(
new
{
@class
=
"control-label col-sm-12 col-md-6"
})
.Sortable
()
.ToolBar
(toolbar => toolbar
.Create
())
.DataSource
(datasource =>
datasource
.Custom
()
.Schema
(schema => schema
.Model
(mod =>
{
mod
.Id
(v => v
.NonContractedCompanyID
);
mod
.Field
(v => v
.Name
);
})
)
))
@Html
.ValidationMessageFor
(m => m
.NonContractedCompanies
,
""
,
new
{
@class
=
"text-danger"
})
Thank you for your help.
Gábor