Requirements |
|
RadControls version |
|
.NET version |
|
Visual Studio version |
|
programming language |
|
browser support |
all browsers supported by RadControls |
PROJECT DESCRIPTION
I'm using the Batch Update feature of the Grid.
In the Grid, I have added a combobox with certain values. The value of the combobox can be null.
When I select a value from the combo box, the value displayed in the grid after selection is the id and not the name.
How can I get the name displayed after combobox value selection instead of its id.
Here is the code of the grid which I created
@(Html.Telerik().Grid<
CleaningEntitySearchResults>()
.Name(
"Grid")
.DataKeys(keys =>
{
keys.Add(s => s.SRNo);
})
.Columns(columns =>
{
columns.Bound(x => x.SRNo).Title(
"SR#").HeaderHtmlAttributes(new { style = "width:5px" }).ReadOnly();
columns.Bound(x => x.BldgNo).Title(
"BLDG#").Width(5).ReadOnly();
columns.Bound(x => x.StreetNo).Title(
"Street").Width(50).ReadOnly();
columns.Bound(x => x.Boro).Title(
"Boro").Width(0).ReadOnly();
columns.Bound(x => x.Zip).Title(
"Zip").Width(0).ReadOnly();
columns.Bound(x => x.CmmunityBoard).Title(
"CB").Width(0).ReadOnly();
columns.Bound(x => x.SanDistrict).Width(0).Title(
"SD").ReadOnly();
columns.Bound(x => x.GS).Width(50).Title(
"GS").ReadOnly();
columns.Bound(x => x.CleaningEntityName).Width(10).Title(
"Cleaning Entity").ReadOnly();
columns.Bound(x => x.CO).Width(50).Title(
"CO").ReadOnly();
columns.Bound(x => x.CleaningMethod).Width(0).Title(
"FGF Cleaning Method").ReadOnly();
columns.Bound(x => x.OnGroundFloor).Title(
"On Ground Floor").ReadOnly()
.HeaderHtmlAttributes(
new { style = "height:100px;width:5px;align:center" });
columns.Bound(x => x.OnRollDownGate).Width(40).Title(
"On Roll-Down Gate").ReadOnly();
columns.Bound(x => x.Resolution).Width(200).Title(
"Resolution Action");
columns.Bound(x => x.AffectedDate).Width(130).Title(
"Affected Date").Format("{0:d}");
columns.Bound(x => x.Paint).Width(5).Title(
"Paint")
.ClientTemplate(
"<input type='checkbox' disabled='disabled' name='Paint' <#= Paint? checked='checked' : '' #> />")
.HtmlAttributes(
new { style = "text-align:center" });
columns.Bound(x => x.Powerwash).Width(5).Title(
"Powerwash")
.ClientTemplate(
"<input type='checkbox' disabled='disabled' name='Powerwash' <#= Powerwash? checked='checked' : '' #> />")
.HtmlAttributes(
new { style = "text-align:center" });
})
.DataBinding(dataBinding => dataBinding.Ajax()
.Update(
"UpdateRecords", "UpdateCompletedSites"))
.Editable(editing => editing.Mode(
GridEditMode.InCell))
.ToolBar(commands =>
{
commands.SubmitChanges();
})
.Sortable()
.EnableCustomBinding(
true)
.Pageable(o => o.PageSize(20))
.ClientEvents(events => events.OnDataBinding(
"onGridBinding")))
-------------------------------------------------------
And this is the combobox which I created
@(Html.Telerik().ComboBox()
.Name(
"Resolution")
.DataBinding(binding => binding.Ajax().Select(
"_SelectRA", "UpdateCompletedSites")))
-------------------------------------------------------
Please suggest what thing am I missing?
Thanks a lot