Change the comma (,) to dash (-) in RadComboBox?

2 posts, 0 answers
  1. Lars J.
    Lars J. avatar
    1 posts
    Member since:
    Feb 2016

    Posted 18 Feb Link to this post

    Hi,

    I am using RadComboBox with checkbox as in http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/checkboxes/defaultcs.aspx

    Is there a way to change the separator comma (,) to dash (-).

    Regards,

    Lars

  2. Nencho
    Admin
    Nencho avatar
    1457 posts

    Posted 22 Feb Link to this post

    Hello,

    You can achieve the desired functionality, using the OnClientItemChecked client-side event of the RadComboBox and the Client Api of the control. Please refer to the following article, providing more information on the Client Api of the control:

    http://docs.telerik.com/devtools/aspnet-ajax/controls/combobox/client-side-programming/objects/radcombobox-object

    However, please keep in mind that such altering is not a supported functionality.

    In the attachment you can find an example on how this could be achieved. You can use the first and last index of the checked items collection, in order to get the text of those items and set the text of the combobox. In addition, I would suggest you to store the text of the combobox, after the alternation, in a hidden field, in order to re-set it in the OnClientLoad of the control and thus make sure that the text is persisted after a postback on the page.

    Regards,
    Nencho
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top