Checkboxes feature is not working in RadComboBox 2011.2.712.40

11 posts, 0 answers
  1. Sunil Kumar
    Sunil Kumar avatar
    5 posts
    Member since:
    Sep 2010

    Posted 05 Oct 2011 Link to this post

    Hi!
      I am using Telerik ASP.NET Ajax Controls  2011.2.712.40 on .NET 4.0 framework. In that I am facing an issue while using new feature of RadComboBox as Checkbox for multiple selection. It doesnt work fine on many browsers as I am unable to check check boxes. Below is the code snippet.


    (In .aspx Page)

    <telerik:RadComboBox ID="rdcmb" CheckBoxes="true" runat="server"
     EmptyMessage="Status"  DropDownWidth="200px"
     MaxHeight="140px"  Width="200px">
     </telerik:RadComboBox>

    (In .aspx.cs)

    if (rdcmb.CheckedItems != null)
                {
                    status = string.Empty;
                    var sb = new StringBuilder();
                    var collection = rdcmb.CheckedItems;
                    foreach (var item in collection)
                        sb.Append(item.Value + ",");
                    String ApplicationVariable= sb.ToString();
                }
  2. Kalina
    Admin
    Kalina avatar
    918 posts

    Posted 10 Oct 2011 Link to this post

    Hello Sunil Kumar,

    The issue that you describe is quite strange.

    I used your code to create a sample test page and observed the RadComboBox behaviour under IE, Firefox and Chrome - the control with CheckBoxes feature enabled works properly on my side with Telerik.Web.UI version 2011.2.712.40.  
    Please take a look at the demonstration video that I’ve recorded for you.
    Additionally I am attaching here the sample page - please download it and give it a try.

    Regards,
    Kalina
    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Thad
    Thad avatar
    106 posts
    Member since:
    Sep 2010

    Posted 11 Oct 2011 Link to this post

    Hi Sunil,

    I might be misreading your email, but is the problem that you can see the checkboxes, but not click on them in some browsers?

    If so, your problem is actually caused because other items on your page (a menu or something) has a higher z-index than the combobox.  Try setting the z-index of your RadComboBox to 99999 or some other crazy big number and see if that fixes the problem.

    Hope that helps,
    Thad
  5. Sunil Kumar
    Sunil Kumar avatar
    5 posts
    Member since:
    Sep 2010

    Posted 13 Oct 2011 Link to this post

    Hey thanx kalina & Thad for your reply.
    But still problem is present with check boxes, here is something interesting out of which something can heppen. While working around for this problem, I deleted JavaScript code present above over checkbox element, surprisingly my check box started working.. After putting back that code below that control I again encountered with same problem of Checkbox as it is not working.
    I checked my JavaScript code block, there was a code which used to run while every page load. Now what i think on page load Checkbox also peforming some action which due to my written JavScript Function on load is over writting. It is just a guess but it works fine when I delete my JavaScript block.
    I am attaching code snippet of .aspx  page for reference.

    In .aspx page
    <script type="text/javascript">
                Sys.Application.add_load(SelectFirstCandidate);
                var applicationID;
                var candidateID;
                var jobPostingID;
                var counter = 1;
                  
                function SelectFirstCandidate() {
                    if (counter == 1) {
                        var grid = $find("<%= rdGridCandidate.ClientID %>");
                        var masterTable = grid.get_masterTableView();
                        var itemcount = masterTable.get_dataItems().length;
                        if (itemcount > 0) {
                            masterTable.selectItem(0);
                            $('.dvCandidateDetails').removeClass("vh");
                            $('.dvCandidateDetails').addClass("vv");
                        }
                        else {
                            $('.dvCandidateDetails').removeClass("vv");
                            $('.dvCandidateDetails').addClass("vh");
                        }
                        counter++;
                    }
                }
                function GetSelectedResumeID() {
                    var selectedresumes = '';
                    var rowSelected = $find("<%= rdGridCandidate.MasterTableView.ClientID %>").get_selectedItems().length;
                    if (rowSelected != 0) {
                        for (var i = 0; i < rowSelected; i++) {
                            var firstDataItem = $find("<%= rdGridCandidate.MasterTableView.ClientID %>").get_selectedItems()[i];
                            selectedresumes = selectedresumes + ',' + firstDataItem.getDataKeyValue("CandidateResumeID");
                        }
                    }
                    else {
                        return false;
                    }
                    return selectedresumes;
                }
     
                function GetSelectedApplication() {
                    var selectedapplications = '';
                    var rowSelected = $find("<%= rdGridCandidate.MasterTableView.ClientID %>").get_selectedItems().length;
                    if (rowSelected != 0) {
                        for (var i = 0; i < rowSelected; i++) {
                            var firstDataItem = $find("<%= rdGridCandidate.MasterTableView.ClientID %>").get_selectedItems()[i];
                            selectedapplications = selectedapplications + ',' + firstDataItem.getDataKeyValue("AppliedJobPostingID");
                        }
                    }
                    else {
                        return false;
                    }
                    return selectedapplications.substring(1, selectedapplications.length);
                }
            </script>
    <div>
     <telerik:RadComboBox ID="CMBBox" runat="server" CheckBoxes="true" EmptyMessage="Status"
                         DropDownWidth="200px"
                         MaxHeight="140px" Width="200" >
                        </telerik:RadComboBox>
    </div>

    I hope this is enough to find solution..
  6. Kalina
    Admin
    Kalina avatar
    918 posts

    Posted 14 Oct 2011 Link to this post

    Hi Sunil Kumar,

    I am afraid that I do not understand correctly what you mean by "Checkbox as it is not working".
    Could you please be more specific about this?
    Can you see the checkboxes when you open the RadComboBox dropdown?
    Can you check them and what text appears in the RadComboBox input after you check a checkbox?
    Are there any JavaScript errors at your page?

    Regards,
    Kalina
    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
  7. Sunil Kumar
    Sunil Kumar avatar
    5 posts
    Member since:
    Sep 2010

    Posted 15 Oct 2011 Link to this post

    Hi!
     See the problem is that when RadComboBox dropdown is open I can see check boxes but when I check (Select) them no text appers in RadComboBox input and at server side it shows no check box value is selected.
     But after removing java script block above as I said in my last post it works fine, As i can see text in Input when I check/Select checkboxes  and at server side it give selected values properly.
     It shows me error in Javascript (as i observed in Firebug) as "d is null". I am attaching screenshot of webpage along with firebug error.
  8. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1266 posts

    Posted 19 Oct 2011 Link to this post

    Hello Sunil,

    I've inspected the java script that you have provided, but I'm unable to define what in this script might affect the check boxes of the combobox.

    Since you claim that the problem is related to the above mentioned script and that without it the check boxes are working properly, please try to provide a live URL to the page so I could examine the problem.

    Regards,
    Dimitar Terziev
    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
  9. Sunil Kumar
    Sunil Kumar avatar
    5 posts
    Member since:
    Sep 2010

    Posted 21 Oct 2011 Link to this post

    Hi!
     I am giving you live URL of application so that you can check problem. It will require LoginID and Password. I have created an account for you to test application.

    Url: http://resumes.jobs4hunt.com/report/CandidateStatusReport.aspx?ref=mp_men

    LoginID:    telerik
    Password: telerikpassword

    On successfull login, you will see report page, select first RadGridColumn and click on link "Refine Search", it will open a search panel where you can select Status Field to search results.

    For your knowledge I have attached snapshot of steps to follow after successfull login.
  10. Kalina
    Admin
    Kalina avatar
    918 posts

    Posted 26 Oct 2011 Link to this post

    Hi Sunil Kumar,

    Thank you for the live URL and detailed instructions provided - we succeeded to reproduce the issue.
    However I am still not able to find out why it occurs.
    Do you use the RadComboBox feature MarkFirstMatch? I am afraid that simultaneous usage of CheckBoxes and MarkFirstMatch is not supported.

    I can suggest you make a test – temporary change the way your page works. Please do not show the refined search panel upon a button click - just set the panel to be initially visible.
    Please let me know if the JavaScript error persists.

    Regards,
    Kalina
    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
  11. Sunil Kumar
    Sunil Kumar avatar
    5 posts
    Member since:
    Sep 2010

    Posted 31 Oct 2011 Link to this post

    Thanks Kalina for your reply.
      I reviewed report web page and I didnt use RadComboBox feature MarkFirstMatch. As you said to make panel always visible, I tried that and it started working but it is giving me problem in Internet Explorer 8 both in normal and compatible mode.
      Its gonna good if it also start working in IE if Panel is always visible.
    Thank you.
  12. Kalina
    Admin
    Kalina avatar
    918 posts

    Posted 02 Nov 2011 Link to this post

    Hi Sunil Kumar,

    I logged in your web site again and I tried to investigate the issue - however I was not able to reproduce it.
    Please take a look at the demonstration video that I've recorded. Maybe I miss something?

    Greetings,
    Kalina
    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