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

Hot to use RadComboBox's EmptyMessage Property inside a GridTemplateColumn (without empty items)?

4 Answers 87 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Carlos Contreras
Top achievements
Rank 1
Carlos Contreras asked on 27 Jul 2010, 06:49 PM
Hi Everybody!

I have a MultiColumn RadComboBox (3 Columns) inside a GridTemplateColumn, and I'd want to use it's EmptyMessage Property only during insert mode. In fact, I'd like to replicate the RadComboBoxProduct's behavior in this Demo. I mean, when the Field is Required and we want to avoid the idea of inserting an empty item in CodeBehind .

Thus far, I've only got that behavior when the Field is NOT Required, inserting an empty item as first element, because if I don't do that, the first element is always selected during Insert Mode.

So, I'm wondering if it's possible to do the same thing illustrated on the demo?


Thanks!

4 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 28 Jul 2010, 09:03 AM
Hello Carlos,


One suggestion is accessing the RadComboBox in insertform and setting the EmptyMessage to it. You can do it in ItemCreated event of grid. Here is the docuemnataion which shows how to distinguish edit/insert mode on ItemCreated/ItemDataBound

Access the RadComboBox using FindControl() method of GridItem. More information about accessing cells and rows can be found here:
Accessing cells and rows


Let us know whether you need further assistance.

[Sorry, I can't access to the demo that you referred to.]

-Shinu.
0
Carlos Contreras
Top achievements
Rank 1
answered on 28 Jul 2010, 04:43 PM
OOPPSS!! My Mystake!
 
I'm so sorry Shinu. I included my local url for Telerik demos instead of the online one!

But I've already fixed it. I hope you could check it out to understand what kind of behavior I want for my RadComboBox.

My apologies.
0
Carlos Contreras
Top achievements
Rank 1
answered on 02 Aug 2010, 11:32 PM
Maybe Shinu is very busy! :(
0
Mira
Telerik team
answered on 05 Aug 2010, 01:10 PM
Hello Carlos,

Have you tried the approach suggested by Shinu? He explained how to set empty message of the combo in the edit form of the grid.

If you want to validate the comboboxes, I recommend that you examine the following help topics:
Validation
Validate Combobox by Value

I hope this helps.

Greetings,
Mira
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
Tags
Grid
Asked by
Carlos Contreras
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Carlos Contreras
Top achievements
Rank 1
Mira
Telerik team
Share this question
or