RadComboBox EmptyMessage on page load

21 posts, 0 answers
  1. Philip
    Philip avatar
    70 posts
    Member since:
    Apr 2008

    Posted 13 Apr 2009 Link to this post

    Can someone please tell me how to enable the emptymessage to show in a radgridcombobox on page load?

    I am binding the data from a datasource, and can not seem to get the "Please Select..." to show on page load.

    I have tried setting the me.radcombobox1.selectedindex to -1 or .text =  me.radcombobox1.emptymessage in every place I could think of.

    Any help would be greatly appreciated.
  2. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 13 Apr 2009 Link to this post

    Hello Philip,

    The EmptyMessage property can be used when the AllowCustomText property is set to True.

    More information is available in our help topic: Appearance and Styling > Using the EmptyMessage Property

    Regards,
    Veselin Vasilev
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jon
    Jon avatar
    813 posts
    Member since:
    Oct 2008

    Posted 18 Apr 2009 Link to this post

    Hi Philip sorry to hijack your thread but I'm having the same issue....

    No disrespect to the developers at Telerik as in the main it's a great product but this is a rubbish situation.

    Looking back at the forums, it seems that for ages (years!) people have been asking to be able to have a drop down box that is initially showing a blank top item so it looks like this

    ---> 
           Value 1
           Value 2
           etc

    Now the 'blank' row could have empty text - but you shouldn't have to enable the AllowCustomText property to do it.  Enabling that property is just plain stupid as it results in the user being able to put in any old rubbish and then find that the form fails validation... (given that the drop down will normally be bound to an INT in the database.

    Hopefully I'm wrong and have just made a complete arse out of myself but if not please come up with a decent workaround.  Apologies in advance if I am wrong ;)

    Also please put a full blown solution for this in the pipline for a future release (sooner the better).

    Regards,

    Jon
  5. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 20 Apr 2009 Link to this post

    Hi Jon,

    We usually recommend this approach when in need of "choose value" item in RadComboBox.
    I have logged this as a feature suggestion (ShowEmptyText not to require AllowCustomText).

    Regards,
    Albert
    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.
  6. Jon
    Jon avatar
    813 posts
    Member since:
    Oct 2008

    Posted 23 Apr 2009 Link to this post

    Hi Albert,

    Thanks for that - I'll have a look at this today now that I'm back on the programming.

    That is a very good looking Panel, you should look at using some of the features in that for the round panel control that you'll be adding sometime in the future.  Especially if you can integrate the heading and heading image functionality into the one control!

    Best Regards,

    Jon
  7. Servando
    Servando avatar
    18 posts
    Member since:
    Oct 2012

    Posted 19 Jun 2009 Link to this post

    I've just on the same problem, and I need also to unselect an item (usually it's done setting selectedIndex=-1). So I need to append  an "empty item"!!!

    I've noted also that setting the selectedValue to an unexisting one there is no reaction from de RadComboBox (no error, no unselection...).
  8. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 24 Jun 2009 Link to this post

    Hello Servando,

    There are two cases here:

    1. ReadOnly mode - setting the SelectedIndex to -1 does not work because you should always have a selected item in this mode. This is how the standard DropDownList control works.

    2. AllowCustomText is True - then the user can type anything in the combo input area. To clear the selection I suggest calling the ClearSelection() method of the combo and set its Text property to string.Empty.


    Kind regards,
    Veselin Vasilev
    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.
  9. Jason
    Jason avatar
    5 posts
    Member since:
    Oct 2008

    Posted 27 Jan 2010 Link to this post

    I just want to chime in and agree with the other Telerik users here that have the same problem I have. You should not have to mark AllowCustomText for the EmptyMessage to be available. Regardless of why it is like this, it should not be. Please fix in future version
  10. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 28 Jan 2010 Link to this post

    Hi Jason,

    Thank you for your input.

    We have this feature logged and will implement it in future versions of RadComboBox.

    All the best,
    Simon
    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.
  11. Stephen Braich
    Stephen Braich avatar
    5 posts
    Member since:
    Nov 2008

    Posted 11 Feb 2010 Link to this post

    I agree with the others.  Quite honestly this should be like the first feature any 3rd party combo box control should offer.  It is ridiculous that I should have to do a radcombo.Items.Add(new RadComboBoxItem("[Select Something]").  
  12. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 16 Feb 2010 Link to this post

    Hi guys,

    We already added this as a feature request in our public issue tracking system. Please go vote for it here.

    Greetings,
    Veskoni
    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.
  13. Vance Smith
    Vance Smith avatar
    36 posts
    Member since:
    Jun 2012

    Posted 06 Jun 2011 Link to this post

    So is this feature availabe yet?
  14. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 08 Jun 2011 Link to this post

    Hi Vance,

    Unfortunately the feature has not been implemented yet. We are working on some other additions (CheckBox support) and fixes to RadComboBox so it is coming after them.

    Regards,
    Simon
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  15. Jason
    Jason avatar
    1 posts
    Member since:
    Dec 2010

    Posted 09 Jun 2011 Link to this post

    It’s obvious that Telerik really only gives lip service to correcting this. Many of us have wanted this for years and it should be an easy fix. They just plain don’t care.....

  16. Jon
    Jon avatar
    813 posts
    Member since:
    Oct 2008

    Posted 14 Jun 2011 Link to this post

    Hi Simon,

    I'm just working on some issues with some old combo boxes of mine.  I've come across an issue whereby my validation fails because of having to use this awful work around and it's something that I'm sure that others have come across.

    Basically because of the work around you have to provide extra validation on each and every combo box - not just the required fields.  The non-required combos need to be checked to ensure that they have a valid entry as opposed to some user typed in text.  Also the required combos need the same check - most of the time.

    Come on, for the sake of a very simple addition to the combo box you'd save us all a lot of extra effort.  To make things simpler, create a new EmptyMessageString var or something to handle the new functionality so nothing breaks.

    Please try and whip this in for the July update - it's a simple addition!!!  And if you can't include it in time PLEASE add it in the next incremental update.

    Regards,

    Jon
  17. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 15 Jun 2011 Link to this post

    Hi Jason, Jon,

    The reason we were postponing this fix/feature was that we wanted to make other major refactoring of the whole 'empty message' idea and not simply change the way the message is rendered. Additionally this would take a considerable amount of time and that's why we couldn't fit it in our plans. 

    Still both of you are right - we have been holding off this fix/feature for quite some time and it is indeed useful and even required in some setups. We will change our plans and implement just what the PITS items says for the next Q (Q2 2011).

    Regards,
    Simon
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  18. Jon
    Jon avatar
    813 posts
    Member since:
    Oct 2008

    Posted 16 Jun 2011 Link to this post

    Hi Simon,

    Sounds great!  I look forward to seeing it.  I'd say that roughly half of the drop downs in my setup are cascading and they all require the empty message so this will be very well received!

    Best Regards,

    Jon
  19. Cmdr. Beavis
    Cmdr. Beavis avatar
    1 posts
    Member since:
    Aug 2011

    Posted 07 Feb 2012 Link to this post

    "2. AllowCustomText is True - then the user can type anything in the combo input area. To clear the selection I suggest calling the ClearSelection() method of the combo and set its Text property tostring.Empty."

    Just wanted to say that the above worked perfectly for me.  Before I knew about 'EmptyMessage' et al, I was setting the Text property to a hard-coded string, which affected the control's behavior in a negative way.  (didn't highlight said text so that I could type in something new and have the existing/highlighted text go away.)

    Thanks!
    -Scott
  20. Nicoleta
    Nicoleta avatar
    3 posts
    Member since:
    Sep 2012

    Posted 14 Aug 2012 Link to this post

    Thank you Veselin, it works perfectly!
  21. Ashish
    Ashish avatar
    12 posts
    Member since:
    Aug 2012

    Posted 07 Sep 2012 Link to this post

    Hello Telerik Team,

    I have used RadCombox in my site extensively, and also I have used the “EmptyMessage” property. Recently I have updated the Telerik version to “2012.2.724.35” and after that i am facing too many issues related to RadCombox.

    Older Version we were using: 2011.1.519.35
    New Version currently we are using: 2012.2.724.35

    In Telerik “2012.2.724.35” version, i have used the following RadComboBox In my web page. Now the issue is, if I do not change the default selection of following ddlStatus i.e. the ddlStatus is set to “-Select One-” and when I trying to access the “SelectedItem” property of ddlStatus from code behind, then it gives a null value whereas with the previous telerik version (2011.1.519.35), if the ddlStatus is set to default selection i.e. “-Select One-” and if I trying to access the “SelectedItem” property of ddlStatus then it gives the object of 0th position item i.e. <telerik:RadComboBoxItem Text="" Value="0" />. Besides that, in “2012.2.724.35” version, for the default selection of ddlStatus, the ddlStatus.SelectedValue property gives the Empty string where as in older version(2011.1.519.35) it gives the value of 0th element i.e. "0".   

    <telerik:RadComboBox ID="ddlStatus" runat="server" Width="60px" EmptyMessage="-Select one-">

           <Items>

                  <telerik:RadComboBoxItem Text="" Value="0" />

                  <telerik:RadComboBoxItem Text="No" Value="1" />

                  <telerik:RadComboBoxItem Text="Yes" Value="2" />

           </Items>

    </telerik:RadComboBox>

     

    This changed behavior of RadComboBox encounters so many issues in my website. Is there any generic way to resolve this issue?

    Please suggest the workaround to resolve this issue.

    Thanks,
    Ashish

     

  22. Ivana
    Admin
    Ivana avatar
    657 posts

    Posted 10 Sep 2012 Link to this post

    Hello Ashish,

    At its current state, RadComboBox does not require an extra item for its EmptyMessage functionality to work properly. In fact, setting the EmptyMessage property is sufficient.

    Having in mind this major difference in the EmptyMessage functionality in both versions explains a lot on the matter why in the version of 2011 the RadComboBox property SelectedItem returns an actual item and in the version of 2012 the SelectedItem property of RadComboBox returns null.
    The version of RadControls for ASP.NET AJAX of 2012 represents the correct behavior of the EmptyMessage functionality, whiles the older one seems more like a temporary workaround.

    I understand this must have caused you a huge inconvenience, but I recommend to go trough your code and make the necessary changes so it applies the current setup of EmptyMessage functionality of RadComboBox.

    I am really sorry for the inconvenience caused!

    Regards,
    Ivana
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017