Empty Listbox on Transfer

2 posts, 0 answers
  1. Thomas
    Thomas avatar
    9 posts
    Member since:
    Apr 2012

    Posted 02 Jan 2014 Link to this post

    How do I determine if a radlistbox is empty using javascript?

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

    Posted 02 Jan 2014 Link to this post

    Hi Thomas,

    Please have a look into the following JavaScript to know whether the RadListBox is empty or not.

    JavaScript:
    <script type="text/javascript">
        function pageLoad() {
            var radlistbox = $find("<%=RadListBox1.ClientID %>");
            if (radlistbox.get_items().get_count() == 0)
                alert("List is Empty");
        }
    </script>

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top