This question is locked. New answers and comments are not allowed.
Hi,
We're changing from the normal MVC helpers to telerik MVC and I have to question:
1. How do I add a 'default' empty first value (like Please Select) - in the normal HTML helper we did it via via :
@Html.DropDownListFor(model => model.FieldNameHere, (SelectList)ViewData["FieldList"], "--- Please select a value ---", new { Id = "Selection", @class = "classname" })
I can't find the corresponding one in the Telerik documentation.
2. Also, can I 'reset'/'clear the values of several comboboxes. In our page, we have 5 cascading comboboxes and when we select the new values for the upper comboboxes, the ones below needs to be cleared as the selection will be reset. Example, select new value for first combobox, we need to clear the second to fifth combox (and refresh second combo with new data if applicable). If the normal Html.DropDownListFor, we just use one jQuery like this :
$('#Selection2,#Selection3,#Selection4,#Selection5').empty();
I tried $('#Selection2,#Selection3,#Selection4,#Selection5').data('tComboBox').close() but I get an error (not sure if this is the correct command).
Thanks.
We're changing from the normal MVC helpers to telerik MVC and I have to question:
1. How do I add a 'default' empty first value (like Please Select) - in the normal HTML helper we did it via via :
@Html.DropDownListFor(model => model.FieldNameHere, (SelectList)ViewData["FieldList"], "--- Please select a value ---", new { Id = "Selection", @class = "classname" })
I can't find the corresponding one in the Telerik documentation.
2. Also, can I 'reset'/'clear the values of several comboboxes. In our page, we have 5 cascading comboboxes and when we select the new values for the upper comboboxes, the ones below needs to be cleared as the selection will be reset. Example, select new value for first combobox, we need to clear the second to fifth combox (and refresh second combo with new data if applicable). If the normal Html.DropDownListFor, we just use one jQuery like this :
$('#Selection2,#Selection3,#Selection4,#Selection5').empty();
I tried $('#Selection2,#Selection3,#Selection4,#Selection5').data('tComboBox').close() but I get an error (not sure if this is the correct command).
Thanks.