selecting multiple item in radcombobox without checkbox option

7 posts, 0 answers
  1. Subramanian
    Subramanian avatar
    8 posts
    Member since:
    Sep 2010

    Posted 24 Nov 2010 Link to this post

    Hello experts..

    I have a scenario in my application where end users can send mail to multiple users with seperator ' ; ', they can select from combo items(contact name) or they can enter a new contact's email id. when they enter mail id which is not in the combo list item, i shoud popup the add contact modal popup and once they add it, i will bind the added user and they can select it from combo. so when user sends the mail, i need to get selected contact's contact id and send the mail to those id's

    I was able to achieve the above functionality with few issues,
    they are
    1. when user type a text 'Ra' and combo lists the 'Raja', if user uses keyboard and presses END button and ' ; ', my code assumes it as some text entered other than item frm combo, if user presses 'Ra' and user selects the Raja using mouse and presses ';' means my code works fine.
    2. when users enters mail id alone and not entering ';' means, i cant prompt user to add contact.
    3. Im storing the contact id in hidden field and when i click send button I'm retrieving it.

    I used radcombo, binding its data from web method as follows

     

     

    <telerik:RadComboBox ID="rdCombotxtToUser" runat="server" Width="397px" Height="140px" Enabled="false"

     

     

     

    EmptyMessage="Please enter your contacts (e.g John Doe;Jane Doe)" AllowCustomText="true" AutoCompleteSeparator=";" EnableAutomaticLoadOnDemand="true" EnableItemCaching="true" MarkFirstMatch="true" OnClientKeyPressing="OnClientKeyPressing">

     

     

     

    <WebServiceSettings Method="GetContactName" Path="~/WebServices.asmx" />

     

     

     

    </telerik:RadComboBox>

    When users enters ; im firing following below javascript

     

     

     


    function
    OnClientKeyPressing(sender, e)

     

    {

     

     

     

    var strSelecteditem

     

     

     

    if (e._domEvent.keyCode == "186")

     

    {

     

     

    var combo = $find("<%= rdCombotxtToUser.ClientID %>");

     

    strSelecteditem = combo._selectedItem;

     

     

    if (strSelecteditem == null) {

     

     

     

    var mdlPopup = $find("mdladdContactPopupBId");

     

    document.getElementById(

     

    "<%=txtName.ClientID %>").value = combo._filterText;

     

    mdlPopup.show();

    }

    }

    Can anyone suggest me any other method or solution to prompt user only when mail id or items not in combo is entered.

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 25 Nov 2010 Link to this post

    Hello Subramanian,


    Give a try with following approach:

    1) You can check for whether an item is already there in RadComboBox when typing in input box (when pressing Enter). If not found cancel the click event.
    Use the findItemByText() method by passing the entered text, if it returns null, means no item with such text.


    2) If item is not there with entered text and if it is in e-mail format, then prompt user to add new contact (Use the step.1 technique to check whether item there).

    3) Access the corresponding item (using findItemByText method) and get the value of the item to use it.


    Hope this suggestion helps.


    -Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Cori
    Cori avatar
    562 posts
    Member since:
    Jul 2010

    Posted 26 Nov 2010 Link to this post

    Hello Subramanian,

    This demo should be of use:

    http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/autocompleteclientside/defaultcs.aspx

    It uses the separator to split muliple selections.

    I hope that helps.
  5. Sabaratnam
    Sabaratnam avatar
    10 posts
    Member since:
    Dec 2010

    Posted 17 May in reply to Shinu Link to this post

    Hello,

    How do I enable "Ctl+Click" selection of multiple RadComboBox items without the "CheckBox".

    Is multiple selection possible without the "CheckBoxes"?

  6. Ivan Danchev
    Admin
    Ivan Danchev avatar
    829 posts

    Posted 18 May Link to this post

    Hello,

    Multiple selection in the ComboBox is possible only with CheckBoxes enabled.

    Regards,
    Ivan Danchev
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  7. pankaj
    pankaj avatar
    1 posts
    Member since:
    Sep 2016

    Posted 28 Sep in reply to Ivan Danchev Link to this post

    Hi Ivan, 

    Why we can't use "ctrl+click" for selecting mutiple values from RadCombobox without "checkbox"? Can we not achieve this with jquery or some other scripting language?

     

    Thanks, 

    Pankaj Joshi

     

  8. Ivan Danchev
    Admin
    Ivan Danchev avatar
    829 posts

    Posted 03 Oct Link to this post

    Hello Pankaj,

    Multiple selection without enabling the CheckBoxes functionality is not supported. By design with CheckBoxes disabled only a single item can be selected and this behavior cannot be changed with jQuery.

    Regards,
    Ivan Danchev
    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017