+1-888-365-2779
Try Now
More in this section

Forums / Sitefinity SDK / List Selection Button on Control Designer

List Selection Button on Control Designer

2 posts, 0 answered
  1. WhiteHawksan
    WhiteHawksan avatar
    1 posts
    Registered:
    08 Nov 2011
    29 Nov 2011
    Link to this post
    I have a custom control designer and was trying to implement a button to select a list, as implemented in the built in list content. This may be rather simple, but I cannot for the life of me work it out, any help would be appreciated.
  2. Stanislav Velikov
    Stanislav Velikov avatar
    1113 posts
    Registered:
    30 Nov 2016
    02 Dec 2011
    Link to this post
    Hello Whitehawksan,

    I suggest referring to this blog post if you encounter a problem implementing functionality with the control designer.
    Place the checkboxes on the designer similar to:
    <form id ="form1">
    <input type="checkbox" name="check1">
    <input type="checkbox" name="checkk2">
    </form>
     
    //the checkbox that will select them all calls a function
    <input type='checkbox' name='checkall' onclick='checkedAll(frm1);'>
    <script type="text/javascript">
    checked=false;
    function checkedAll (frm1) {
        var aa= document.getElementById('form1');
         if (checked == false)
              {
               checked = true
              }
            else
              {
              checked = false
              }
        for (var i =0; i < aa.elements.length; i++)
        {
         aa.elements[i].checked = checked;
        }
          }
    </script>


    All the best,
    Stanislav Velikov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

2 posts, 0 answered