Can any one help me how to retain the value which I can select the from the RadGridViewComboBox column.
As, in my application when I select a value from the dropdown and move to the next field, the value in the Combobox field is blank.
Any sample code which will help to resolve this solution will be highly appreciated.
Thanks & Regards,
Hirak
9 Answers, 1 is accepted
Firstly, you may take a look at our online documentation and demos for a reference on the usage of the GridViewComboBoxColumn. Furthermore, you may run through this troubleshooting article in case it covers your scenario. If none of those helps, I would need a bit more details about your particular settings, the definition of the column and the declaration of your business objects - both for the grid and the column.
Maya
the Telerik team

My requirement is :
1) The values in the RADGridViewComboBoxColumn should retain its value after selecting from the drop down.
2) When, I select an item from the 1st drop down the value in the 2nd drop down should get changed.
Any sample code in this regard will be highly helpfull as I could not relate my requirement to any references which you have mentioned in your post.
Please send me the sample code for this case.
Thanks & Regards,
Hirak
You may take a look at this blog post for a reference.
Maya
the Telerik team

The sample code given in the blog when I executed in my local machine it worked fine.
But, when I used the same code syntax in my application it is throwing an exception in the below mentioned line:
this.AddHandler(RadComboBox.SelectionChangedEvent, new Telerik.Windows.Controls.SelectionChangedEventHandler(comboSelectionChanged));
The exception is:
Error 15 'Telerik.Windows.Controls.SelectionChangedEventHandler' does not contain a constructor that takes 1 arguments D:\CFUNDProj\StrategicSolutions\StrategicSolutionsPortal-VS2008-Structured-v1-CODEREVIEW_9_1_2010\PresentationTier\Windows\SSG_Trade_Express\UserControls\ContributionAndWithdrawal.xaml.cs 103 64 SSG_Trade_Express
Please, suggest me a quick solution to the above problem.
Looking forward to your early reply.
Thanks & Regards,
Hirak
As you are working with WPF RadGridView, you have to use the System.Windows.Controls.SelectionChangedEventHanlder. I am sending you the sample project but targeting WPF platform. Please take a look at it and let me know if you need further assistance.
Maya
the Telerik team

I have declared the same namespace and checked the dll versions for Telerik.Windows control both are same.
But still it throws the same exception as mentioned below:
Error 16 The type or namespace name 'SelectionChangedEventHandler' does not exist in the namespace 'Telerik.Windows.Controls' (are you missing an assembly reference?)
Is there any work around to this issue.
Looking forward to your early reply.
Thanks & Regards,
Hirak
Please try the suggestion above - to use the System.Windows.Controls.SelectionChangedEventHanlder as there is slight difference between Silverlight and WPF.
- Silverlight - Telerik. Windows.Controls.SelectionChangedEventHandler;
- WPF - System.Windows.Controls.SelectionChangedEventHanlder
Maya
the Telerik team

Finally I was able to retain the value in the GridViewComboBox column.
But, now I have one more problem when I move out of the row the entire data goes off.
My requirement is after adding all the dropdown values, I will have to save the records entered in that row in the database and display it in the RadGridView control.
How do I achieve this.
Please, suggest me with some simple sample code for reference as quickly as possible.
Thanks & Regards,
Hirak
May you provide a bit more details about the exact behavior you experience and the one you want to get ? Do the values inside the GridViewComboBoxColumn disappear on losing focus similar to the scenario in this article ? Or you want to be able to add new items to the source of the column like it is demonstrated in the attached sample project ?
Maya
the Telerik team