Content feed Comments Feed

The Official ASATO Site

Hi, welcome to my blog. ASP,asp.net,Health,Javascript,JQUERY

Uisng Jquery select DataGrid CheckBox Multiple Rows Column

Posted by admin On March - 30 - 2009

Multiple Rows selection in a web is a requirement. and in asp.net web you can using checkbox(runnet-server) control,A checkbox column must of course be accompanied with a CheckAll / UnCheckAll functionality.

we can ussing Jquery select CheckBox Multiple Rows Column.
here is the code:

<script src="js/jquery-1.3.2.min.js" type="text/javascript"></script><script type="text/javascript">
<!--
    $(function(){
      $("#chk").click(function(){

                if($(this).attr(“checked”)==true){
                    $(“input[name='chk_list']“).each(function(){
                        $(this).attr(“checked”,true);
                    });
                }
                else{
                   $(“input[name='chk_list']“).each(function(){
                        $(this).attr(“checked”,false);
                    });
                }
            });
        });
     });
// –></script>


<asp:TemplateColumn>
          <HeaderTemplate>
                    <input type=checkbox id="chk" />check all
                </HeaderTemplate>
       <HeaderStyle Width="10%" CssClass="zi1B" BackColor="#EFEFEF" Height="22"></HeaderStyle>
       <ItemTemplate>
        <asp:CheckBox  id="chk_list" name="chk_list" Runat="server"  value='<%# DataBinder.Eval(Container.DataItem, "SchemeID") %>'></asp:CheckBox>
       </ItemTemplate>
       <ItemStyle HorizontalAlign="Center" />
      </asp:TemplateColumn>

you must pay attention the red color words.

9 Responses to “Uisng Jquery select DataGrid CheckBox Multiple Rows Column”

  1. mark says:

    Thanks for the review!

  2. viagra says:

    viagra I rarely comment on blogs but yours I had to stop and say Great Blog!!

  3. John1085 says:

    Very nice site!

  4. da best. Keep it going! Thank you

Leave a Reply