Click here to Skip to main content
15,908,661 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
I used asp:update panel a


XML
<asp:UpdatePanel ID="GetUpdDet"  runat="server" UpdateMode="Conditional">
  <ContentTemplate>



XML
<asp:CheckBoxList ID="chkCountries" runat="server" AutoPostBack="true"  OnSelectedIndexChanged="Country_Selected">
                                <asp:ListItem Text="rating 5" Value="5"><span class="Fivestar_ft"></span></asp:ListItem>
                                <asp:ListItem Text="rating 4" Value="4"><span class="Fourstar_ft"></span></asp:ListItem>
                                <asp:ListItem Text="rating 3" Value="3"><span class="Threestar_ft"></span></asp:ListItem>
                                <asp:ListItem Text="rating 2" Value="2"><span class="Twostar_ft"></span></asp:ListItem>
                            </asp:CheckBoxList>



<asp:listview ID="ProductListList" runat="server" >



</ContentTemplate>
         </asp:UpdatePanel>



in above if i click checkbox , i call OnSelectedIndexChanged="Country_Selected" function, and filter listview and listview.datasource and databind
, and updatepanelid.update();


in page_load , i use

if (!ispostback) listview.datasource and databind



but , when i click checkbox , page doesnot refresh and i see filtered value in listview , then when i refresh page manually, checkbox is unchecked , and listview shown is original without filters..

pls advice, what to do to keep checkbox as checked ,and gridview filtered , when page refresh with updatepanel ,
Posted

1 solution

hi yes if u use update panel,checked mark will be erased ,i.e what u get when page load event it goes like,so remove update panel and try to use client side coding without page refresh u need to get check box checked id and filter and show in listview
 
Share this answer
 
Comments
maulikshah1990 4-Feb-14 6:58am    
hi
pls give proper example code...
Aravindba 4-Feb-14 21:50pm    
remove update panel,try to get checked box in java script or jquery,and based on checked box u need to filter and show in list view all are need in client side,search how to get checked box in client side and process ans so on...
maulikshah1990 4-Feb-14 22:55pm    
Hi
can u give example source code ....
i tried ajax jquery, using web method, but that cannot get listview id...

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