Kendo UI ComboBox using angularjs takes time to display value on preview - angularjs

We are working with kendo ComboBox using angular js. We bind value to ComboBox using angularjs scope. On preview event, when we assign value on load time (fetched from database) to ComboBox, it takes time to display value on front side in ComboBox. As we marked on preview time, first it binds data to ComboBox and then display value. Is there any solution to display selected value/text on front side, whether the ComboBox get bound or not?

Yes you can do it by applying value in the modal and setting the text accordingly.
Like Your model is countryId and have text value as countryName and name of the combobox is countryComboBox then you can use it like below:
$scope.countryId = 1 (id of which you want to be displayed at first)
$scope.countryComboBox.value(1)
$scope.countryComboBox.text('INDIA')
it will initially set the text to INDIA.

Related

Combobox List passing string

I have a VB6 application that has been running for quite sometime. Currently I'm trying to update one of the form that has a combobox 2.0. Because the combobox is populated with hundreds of items - I'm trying to update it so that users are able to click on a look up button next to it, where another window opens up with all the items from the combobox. User will be able to search by keyword and/or select an item and double click on it and have it appear in the combobox. The issue I'm having is with trying to pass no value or "" when CANCEL is clicked. I'm able to pass the value if I in the properties window my STYLE Is set to COMBO rather than list. However, the issue I come across is that with COMBO the value (text) in the combobox sometimes is not aligned properly. Is there a way to pass a "" value to a combobox 2.0 without changing the style to COMBO?
If they hit cancel set the ListIndex of your combo to -1 rather than setting the text property. This is the value for no item being selected.

How to call propertychange with combobox using customeditors in propertygrid ext js

In ext js propertyGrid,I have customeditor with combobox. I want to enter my own text in combo box rather than selecting from picklist. Then how to retain the entered text in combo and can we apply propertychange to it?
We can just select the value from the dropdown list of the combobox. But we cannot pass the value by manually entering the value the textfield of combobox. The above implementation will not be possible according to the framework available today

How to change value kendo grid row items using some data from external combobox?

I have a kendo grid in which I am using the roweditor function to allow user to change values of networks listed as network1, network2, network3 lets call it as gridNetwork.
I have a combobox on the same page having networks listed same as network1, network2, network3 what was there in grid. The user can select values from this combobox let us call it as comboNetwork.
Based on the selection made in the comboNetwork, the value of the selected row(s) network should also change in gridNetwork.
Any suggestions?
I have created a jsfiddle,give a try:
http://jsfiddle.net/Sowjanya51/a2agwrf5/2/
What you want is on-change function bound to your comboBox that will update your underlying data model that you have bound to your grid.
In that function, update the model, the refresh the grid's datasource that the model is populating.

kendo combobox reset after loading back view from controller

I have a kendo combobox
#(Html.Kendo().ComboBox()
.Name("ddSystems")
.Filter("contains")
.Placeholder("-- Select --")
.BindTo((IEnumerable<SelectListItem>)ViewBag.systemList)
)
Onchange, a textbox is loaded in ajax. A submit button posts the textbox value and combobox value to the controller. When I get back to the view, I need ddSystems to be reset to empty. I used
$('#ddSystems').data('kendoComboBox').value(null)
and
$('#ddSystems').data('kendoComboBox').text('')
but it always retains the previously selected value. Since I use ajax, this will not display the textbox and I am stuck. Please help.
This will clear the combo box and disable it
Google is your best friend....
var combobox = $("#comboBox").data("kendoComboBox");
combobox.value();
combobox.enable(false);

extJS combobox setValue() but post ID

I have a combo populated with names - each with a unique ID that is not shown - just the name is rendered.
When I manually select from the combo and submit - the form POST's the ID of the name which is perfect.
However I need to set the value of the combo dynamically under some circumstances and do by calling setValue('Name') but when I POST the ID value is coming out as the string name set by setValue()
How do I set the name (or the ID) but POST the ID and show the name in the combo?
I have tried calling setRawValue() while passing the ID in hopes the control would translate and show the textual form - but no dice :(
You have setValue() and setRawValue() backwards. Use setValue('id') to set the combobox value, it should automatically update the display value if you are using a renderer in the combobox config.
Think of setRawValue() as setDisplayValue().

Resources