This is a migrated thread and some comments may be shown as answers.

Empty Listbox on Transfer

1 Answer 11 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Thomas
Top achievements
Rank 1
Thomas asked on 03 Jan 2014, 04:02 AM
How do I determine if a radlistbox is empty using javascript?

Thanks
Thomas

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 1
answered on 03 Jan 2014, 05:13 AM
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.
Tags
ListBox
Asked by
Thomas
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 1
Share this question
or