Displaying checked items in CheckedComboBox in DevExpress using C#.net - devexpress

My current CheckedComboBox has a large list of items. I need to have selected list out of those items checked when the drop down is clicked. e.g CheckedComboBox will have P,Q,R and S as the itmes. But only P will have a tick in front of it.
Is there a property for this defined already?
Thanks

The CheckedComboBox control does not provide the CheckedItems (or SelectedItems) property .Use the editor's EditValue property to determine which Items are selected.

Related

Flex: Combobox creating dropdown with less values

I have an object that inherits from combobox. This is done so I can use a custom framework for creation and value setting and uses a 'id' / 'description' set for the dataprovider. When I set the value, i set the 'id' and the custom object looks through the dataprovider to find the matching id to find the index. When setting the value, I don't know the 'dscription', that is what the row source is for.
My problem is in that I need to display 'old' values when I first set the value through code, but I don't want to allow the user to see the 'old' value in the dropdown and allow them to select it.
Now, I've been trying to chase down the best way to do this. I'm assuming I need to either interrupt the creation of the dropdown dataprovider and populate it with a smaller list(using my own 'hideFromDropdown' property) or find out if there is a way to add a property to my dataprovider that causes the item to not be rendered by the dropdown. Perhaps eich 'item' in the dropdown has a visible property?
I was able to trace down to the combobox.getDropdown method, which creates a new dropdown from the dropdownfacrory. Unfortunatly, this is private so I can't override it to pass a partial rowsource. Now, all the dropdownfacory seems to do is return a basic list. Unfortunately I keep getting lost tracking down to find the place in the list or listbase objects where the individual item in the dataprovider gets rendered(or not). I believe I have traced to listContent:ListBaseContentHolder in ListBase which contains the data, but am constantly getting lost in the ambiguities.
I am using Flex SDK 3.6A in Adobe Flex Builder 3(built on the Eclipse engine)
You can use filterfunction on the dataProvider like arrayList/arraycollection. Checkout the example here
http://kirill-poletaev.blogspot.com/2011/07/arraycollection-in-flex-part-4.html

Flex - Show/Hide ComboBox based off selection

Is it possible to show or hide a comboBox based off the selection made in another comboBox. I have been looking for documentation on this to no avail.
Thanks
Yes, in a Change handler of ComboBox1 set ComboBox2's visible property to false based on the selected item.
Along with setting the combobox's visible property, if you want the form to act as if the combobox is not there, also set the includeInLayout property.

Checkboxlist latest checked/unchecked item

I have a need to get the latest checked or unchecked item from a checkboxlist. Basically I need to detect any change in the list and perform some action on that.
I found the solution for latest checked item but couldn't find one for the latest unchecked item.
Is it possible to do that with the checkboxlist or I will have to go with another control?
I know this thread is old...but might as well throw an answer out there. One option is to create a datatable for the selected items in the CheckBoxList(CBL) on databind, scrub that table against the selected items in the CBL, and find the difference.

ItemRenderer Vs ItemEditor

What is the Difference between ItemRenderer and ItemEditor?
And When ItemRenderer is initializing and loading?
Regards,
Ravi
ItemRenderer is for configuring how something will look in a list control (i.e. a Picture + text might be a use case for an ItemRenderer). Thus "Render", how it will display (read-only).
ItemEditor is used when you want to override how the user might change the value in the list (assuming that you've set all the requisite editable properties on the controls in question to allow edits). A good example could be a date column. Perhaps you want a DataGrid to show a date as 12/28/2009 in the list, but when the user clicks on it, they get a DateChooser control to set a new date.

Flex Combobox - Edit/Delete an option

I'm using a combo box control and the dataprovider is set as an XML.
After the dataprovider is set, I want to edit the text of the first option and also I need to insert an item in the second position.
How can I do this? Using an ItemRenderer?
Please give your suggestions.
You should edit the dataProvider itself. Make it an ArrayCollection (or something else that implements IList) and your combobox will automatically update as you make changes. Also make sure that the array collection is full of bindable objects.
Changing ArrayCollection is easy. You can just say dataProvider.getItemAt(0).labelProperty = "whatever" -- this assumes you have an object with a property of "labelProperty" and your combobox's labelField is set to it.
To add an item just use dataProvider.addItemAt(item, 1)

Resources