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

custom combobox for editing gridview

14 Answers 145 Views
GridView
This is a migrated thread and some comments may be shown as answers.
steve
Top achievements
Rank 1
steve asked on 06 Jan 2010, 09:43 PM
I created a custom combobox that I want to use in the grid view during editing.  When the user is editing the data I want to allow then to beable to choose from a list of items, enter in new items (like a text box and save when done typing or lost focus) and also allow the user to click on an x next to an item and remove it from the list items.  Is this possible?  So, is it possible to customize the list itmes to have a image (x) and use a click event on the fire a method to delte the item?


Stephen

14 Answers, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 11 Jan 2010, 03:48 PM
Hello steve,

I am attaching a sample project which demonstrates how you can dynamically add an item to your RadComboBoxEditor. As to the image, you can insert a button next to the RadComboBoxEditor as shown in this knowledge base article. You need to delete the currently selected item of the opened editor in the Click event of the button.

If you have any additional questions, feel free to contact me.

Greetings,
Nikolay
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
steve
Top achievements
Rank 1
answered on 12 Jan 2010, 05:37 PM
Hey Nikolay,
That works great for my project except I think the users may find it a little confusing and a hostile if they want to delete more then one from the list.  Is it possible to add the item to the comboBox so that you can remove each item, instead of selecting an item then deleting it?  For example, if you go to google (I know this is a web app control) and type in "hello world" it is added to a list the drop down control binds to.  So that when you go back into the list the item is there.  The control also give you the option to delete that item from the list by including a image button for that item.  Is there a way to add a button to a comboBox RadItem?

Thanks Stephen.
0
Nikolay
Telerik team
answered on 13 Jan 2010, 03:51 PM
Hi steve,

I modified a bit my sample project and now it supports the desired functionality - each RadComboBoxItem has a Remove button. Similar functionality is demonstrated in this knowledge base article.

I hope this helps. If you have additional questions, feel free to contact me.

Greetings,
Nikolay
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
steve
Top achievements
Rank 1
answered on 13 Jan 2010, 03:59 PM
That is perfect.  Thank you.
0
paul
Top achievements
Rank 1
answered on 24 Jul 2010, 01:16 AM
Hi
Thanx this is exactly what I needed.
But if a user add a new Item and then leave the cell without pressing the enter
It wont add the new item in the combo cell of the gridview can you solve this please? 
0
Nikolay
Telerik team
answered on 29 Jul 2010, 02:50 PM
Hi paul,

The desired behavior cannot be achieved in the current version of RadGridView. We will try to address this case in Q2 2010 SP1.

If you have additional questions, feel free to contact me.

Regards,
Nikolay
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Jill-Connie Lorentsen
Top achievements
Rank 1
answered on 12 Oct 2011, 01:07 PM
I am also looking for a way to get this feature, and I hope there is a way.

I want the user to be able to enter a value and press TAB to go to the next cell in the row, but it is not possible. 

Any workaround?
0
Nikolay
Telerik team
answered on 13 Oct 2011, 03:50 PM
Hi Jill-Connie Lorentsen,

Our latest version Q2 2011 SP1 allows for creating a drop-down list editor that accepts custom values even when the TAB key is pressed. For additional information about the necessary approach, please refer to this documentation article.

Kind regards,
Nikolay
the Telerik team

Q2’11 SP1 of RadControls for WinForms is available for download (see what's new); also available is the Q3'11 Roadmap for Telerik Windows Forms controls.

0
Jill-Connie Lorentsen
Top achievements
Rank 1
answered on 14 Oct 2011, 01:34 PM
Thanks for your reply, but I don't get the behavior I want.

I've done what you show in the documentation article, but I can't get the text to "stick" in the cell after leaving it. The typed value is added to the data source, and appears in the combo box the next time the combobox column is visited, but after it is typed and the TAB og Enter key is pressed the text disappears.

Do you have a sample project that I can download and run?

Thanks!

Regards, Jill-Connie Lorentsen
0
Nikolay
Telerik team
answered on 19 Oct 2011, 04:05 PM
Hello Jill-Connie Lorentsen,

Thank you for writing back.

Please find attached a sample project based on the documentation article. I am also attaching a movie of the steps that I perform in the customized editor. You can watch the movie in a web browser with Flash plug-in installed. As you can see in the video, after pressing TAB the value is correctly saved in the cell. If you continue experiencing issue, please open a new support ticket and send me your sample project where it occurs. This will allow me to assist you further.

If you feel that the sample project differs from what is written in the documentation, please contact us accordingly. This will allow us to fill the missing gaps in the article.

All the best,
Nikolay
the Telerik team

Q2’11 SP1 of RadControls for WinForms is available for download (see what's new); also available is the Q3'11 Roadmap for Telerik Windows Forms controls.

0
Jill-Connie Lorentsen
Top achievements
Rank 1
answered on 21 Oct 2011, 12:18 PM
Thank you, it now works perfectly :)
0
Nikolay
Telerik team
answered on 21 Oct 2011, 03:50 PM
Hi Jill-Connie Lorentsen,

I am glad to hear that I was of help. If you have additional questions, feel free to write back.

All the best,
Nikolay
the Telerik team

Q2’11 SP1 of RadControls for WinForms is available for download (see what's new); also available is the Q3'11 Roadmap for Telerik Windows Forms controls.

0
Jill-Connie Lorentsen
Top achievements
Rank 1
answered on 01 Nov 2011, 01:34 PM
One more thing...

When the user starts typing in the text field of the combo box, - is it possible that the text of existing items appears as suggestions, as it is in i.e Excel?

I hope you understand what I mean.
0
Nikolay
Telerik team
answered on 03 Nov 2011, 03:46 PM
Hello Jill-Connie Lorentsen,

If I understand your requirement, you are after the AutoComplete functionality of our DropDownList. If this is the case, you can employ this feature in RadGridView by setting the AutoCompleteMode property of the GridViewComboBoxColumn, for example:

categoriesColumn.AutoCompleteMode = AutoCompleteMode.Suggest;

I hope this helps.

All the best,
Nikolay
the Telerik team

Q2’11 SP1 of RadControls for WinForms is available for download (see what's new); also available is the Q3'11 Roadmap for Telerik Windows Forms controls.

Tags
GridView
Asked by
steve
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
steve
Top achievements
Rank 1
paul
Top achievements
Rank 1
Jill-Connie Lorentsen
Top achievements
Rank 1
Share this question
or