This question is locked. New answers and comments are not allowed.
Environment:
ASP.NET MVC 3
C#
Razor ViewEngine
Telerik MVC v.2011.2.712.340
I'm using the below code to set a combobox (within a form) text via a value when a page is loaded
This work fine. Ths issue is when the form is submitted and I return the view with errors the combobox just has the value in the combobox field instead of the text.
If I comment out the above like below then when I return the view with errors the comobox has the text in instead of the vaule, which is correct. But when the page is loaded the combobox has no vaul/text:
ASP.NET MVC 3
C#
Razor ViewEngine
Telerik MVC v.2011.2.712.340
I'm using the below code to set a combobox (within a form) text via a value when a page is loaded
@(Html.Telerik().ScriptRegistrar().Globalization(
true
).DefaultGroup(group => group.Combined(
true
).Compress(
true
)).OnDocumentReady(@<text>
//Select EU
var Ticket_EndUserID = $(
"#Ticket_EndUserID"
).val();
var TicketEU = $(
'#TicketEU'
).data(
'tComboBox'
);
var selectEUItem = function (dataEUItem) {
return
dataEUItem.Value == Ticket_EndUserID;
}
TicketEU.fill(function () {
//binds the combobox
TicketEU.select(selectEUItem);
})
</text>))
This work fine. Ths issue is when the form is submitted and I return the view with errors the combobox just has the value in the combobox field instead of the text.
If I comment out the above like below then when I return the view with errors the comobox has the text in instead of the vaule, which is correct. But when the page is loaded the combobox has no vaul/text:
@(Html.Telerik().ScriptRegistrar().Globalization(
true
).DefaultGroup(group => group.Combined(
true
).Compress(
true
)).OnDocumentReady(@<text>
@*
//Select EU
var Ticket_EndUserID = $(
"#Ticket_EndUserID"
).val();
var TicketEU = $(
'#TicketEU'
).data(
'tComboBox'
);
var selectEUItem = function (dataEUItem) {
return
dataEUItem.Value == Ticket_EndUserID;
}
TicketEU.fill(function () {
//binds the combobox
TicketEU.select(selectEUItem);
})*@
</text>))