Question

I had a comboBox and loading the datadynamically from the server. i need to display the first value in comboBox as a selected value and based on the value data should be populated on the grid. Please send me a sample example on the same if nay one knows.

thanks, Ravi

Was it helpful?

Solution

Another way to make sure that you have data is add a ChangeWatcher to the dataProvider, so that you will be notified when new data is bound. Then you can simply traverse the data and select whichever one you want, in your case selectedIndex=0;

OTHER TIPS

You can select the first value by setting: selectedIndex=0 or set the selectedItemproperty.

But you should make sure that there is an item which you can select. This could be for example done in the setter of the dataProvider.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top