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

RadComboBox FormatString Not Working?

3 Answers 245 Views
ComboBox and ListBox (obsolete as of Q2 2010)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Tom Chien
Top achievements
Rank 1
Tom Chien asked on 13 Jul 2009, 05:10 PM
I'm trying to create a control with formatted entry and a drop-down suggestions list, specifically an am / pm time field with seconds with a list of suggested but not mandatory times.  I'm trying to use a RadComboBox and setting its FormatString Property to do this.  I couldn't find any docs on this Property so I tried using the Mask characters from the RadMaskedEditBox docs.  I've tried "HH:mm:ss tt" and simply "##:##:## LL".  In neither case did it restrict values to the specified format or move the cursor to next wildcard section when I tried to type or right-arrow past non-wildcard characters of the mask or press space in front of non-wildcard characters like RadMaskedEditBox does.  I've tried setting FormattingEnabled to True and False.  Any ideas?  Thanks.

BTW, what are the DisplayMember and ValueMember Properties for?

3 Answers, 1 is accepted

Sort by
0
Boryana
Telerik team
answered on 14 Jul 2009, 02:57 PM
Hello Tom Chien,

Thank you for contacting us.

In order to demonstrate the desired behavior of the radComboBox I have prepared a sample project. The radComboBox is bound to a database and the FormatString property is set to "T". Please, have a look at the attached file.
 
The easiest way to change the FormatString is to select the FormatSrting property in Design Time and click the button that will appear on the right. It opens a Format String Dialog which previews the FormatStrings. You can find more information on the FormatString topic here. The purpose of DisplayMember and ValueMember properties is briefly explained in this article. I hope this is helpful. If you encounter any difficulties setting your radComboBox, please let me know. I will be glad to assist you.

 
Kind regards,
Boryana
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
Tom Chien
Top achievements
Rank 1
answered on 24 Jul 2009, 08:26 PM
Boryana, thanks for the code example.  However, I was unable to open the Project.  I got an error titled "Microsoft Visual Studio" saying "Unable to read the project file 'radComboBox.csproj'.  C:\Documents and Settings\tchien\My Documents\Docs\Telerik\RadComboBox\radComboBox\radComboBox.csproj(107,11): The imported project "C:\Mircrosoft.CSharp.targets" was not found.  Confirm that the path in the <Imort> declaration is correct, and that the file exists on disk." with an "OK" Button.  I normally use VB on VS 2005, so an example in that language / version would be appreciated.  Thanks.

Telerik Q1 2009 (v2009.1.9.414), VS 2005 (v8.0.50727.762 SP.050727-7600), XP SP3 on Core2Duo 2.99GHZ with 3GB.

0
Boryana
Telerik team
answered on 27 Jul 2009, 10:55 AM
Hello Tom Chien,

I am sorry for the inconvenience. I have attached the same sample project now written in VB, VS 2005. Please, let me know if you still experience any difficulties to open the project.

All the best,
Boryana
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
ComboBox and ListBox (obsolete as of Q2 2010)
Asked by
Tom Chien
Top achievements
Rank 1
Answers by
Boryana
Telerik team
Tom Chien
Top achievements
Rank 1
Share this question
or