Click here to Skip to main content
15,867,330 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi,
i have web form wich i use control of AjaxControlToolkit and i want t have gridview with fixed header when scrolling when i use function of jquery i have this error

The Controls collection can not be modified because the control contains code blocks (ie ie <% ...% > ) .


this ist part of my code


XML
<script src="Template/Scripts/jquery-1.4.1.min.js"></script>
    <script src="Template/Scripts/ScrollableGridPlugin.js"></script>
        <script type="text/javascript">
            $(document).ready(function () {
                $('#<%=GridView1.ClientID %>').Scrollable({
                    ScrollHeight: 500
                });
            });
</script>



XML
<asp:TextBox ID="txt_date_debut" runat="server"></asp:TextBox>
           <asp:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txt_date_debut"></asp:CalendarExtender>
           <asp:GridView ID="GridView1" runat="server"></asp:GridView>



but when i use web form whiteout AjaxControlToolkit i don't have eroor
plz help i need solution very quickly and thanks
Posted
Comments
Andy Lanng 17-Apr-15 12:15pm    
Try just changing the selector. Add a random class name to the GridView1 control and use that in your selector instead
$('.my-random-class-name-for-the-gridview').Scrollable( ...
Member 11573837 17-Apr-15 12:38pm    
hi Andy Lanng,
i didn't understanding you because of my bad english can you explain again and sorry

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900