I'm creating a web application that will allow editing of a database table using ASP.NET.

I've got all the functionality in the application, and everything is working fine. However, now the specification has changed and I need to have multiple gridview's showing different database tables. So, I've implemented jquery and a dropdown menu that'll only show certain div's depending on the value chosen in the dropdown menu.

This is well, I only display the gridview I want to depending on the value I have chosen. Although, when trying to edit the gridview, the gridview disappears; this only happens since implementing the jquery.

I can display the gridview again when I choose a different option in the dropdown menu and then choose the option I want.

This is stange because the edit button should not effect the value I have chosen on a drop down menu.

Could anyone help please?

jQuery:

<script type="text/javascript">
        $(document).ready(function () {
            $('.group').hide();
            $('#no_option_selected').show();
            $('#DropDownList1').change(function () {
                $('.group').hide();
                $('#' + $(this).val()).show();
            })
        });
</script>

Related posts

Recent Viewed