This is a migrated thread and some comments may be shown as answers.

Cycle through images in ComboBox within GridView

3 Answers 69 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Adriana
Top achievements
Rank 1
Adriana asked on 16 Jul 2009, 03:07 PM
Hello,
  I am new to Telerik winforms controls. I have a RadGridView consisting of  a GridViewComboBoxColumn. I want to display images
within the combo-box, and when a selection is made, I want the selection text box of the combo-box to also display the image, not
just the text associated with it.

Also, I want to be able to implement the DblClick on the combo-box so that the images will rotate through the list
of images.

Can I accomplish this using a GridViewComboBoxColumn, or do I have to add a custom element to the grid cells?
I have been combing through the examples and forums, but have not been successful in implementing this functionality.

Thanks in advance,

Adriana

3 Answers, 1 is accepted

Sort by
0
Victor
Telerik team
answered on 21 Jul 2009, 01:31 PM
Hello Adriana,

Thank you for writing.

I am afraid that the editor you described requires a custom implementation, there is no "out of the box" way to achieve this behavior. I have attached a sample application which demonstrates a similar behavior.

Please note that the example does not compile with Q1 2009 version of the controls as there are some major changes in the way the editors work in RadGridView hence you must upgrade to Q2 2009 version.

I strongly recommend that you think of a way to provide this functionality with the means that RadGridView currently provides. Custom editors such as this one are not guaranteed to work in all cases and are therefore discouraged.

Please write back if you have questions.

Kind regards,
Victor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Adriana
Top achievements
Rank 1
answered on 22 Jul 2009, 07:32 PM
Victor,
  Thank you for your example. This is the functionality that I was looking for. The combo-box behaves the way that I want it to when it is in edit mode. However, is there a way to retain the image within the grid cell when that cell is not in edit mode?

Thanks,

Adriana
0
Victor
Telerik team
answered on 23 Jul 2009, 08:27 AM
Hi Adriana,

Thank you for the question. The editor in the example is not a combo box, it is a LighVisualElement which contains an ImagePrimitive and a TextPrimitive, this is how the text and images are displayed. The dropdown button is a sibling to this LightVisualElement and is used to simulate the button of the combo box.

You probably noticed that all the functionality is handled by the developer, there is no single component which implements the required behavior.

I strongly recommend that you figure out how to display the data to your users using the already provided functionality of RadGridView. Should you decide to create custom editors such as this one, you must be prepared to spend a lot of time and effort which could be impractical.

Write again if you have other questions.

Greetings,
Victor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
GridView
Asked by
Adriana
Top achievements
Rank 1
Answers by
Victor
Telerik team
Adriana
Top achievements
Rank 1
Share this question
or