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

pager template dropdown doesnt fire change event sometimes

2 Answers 56 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Krishna
Top achievements
Rank 1
Krishna asked on 13 Mar 2009, 11:52 PM
Hi,

I have a pager tamplate and there is  a dropdown in it.
some times the dropdown change event is not working..  i have the pager positioned on top and bottom.. when i chane the value in drop down it justs changes the value but not refreshes the grid..
below is my code please help


                 <PagerTemplate>
                                                 <span style="float: left;color:#333333">&nbsp;Total keywords:&nbsp;
                                                    <%# DataBinder.Eval(Container, "Paging.DataSourceCount")%></span>
                                                    <div id="pager">
                                                        <asp:Panel ID="PagerPanel" runat="server">
                                                        <div class="paginationdiv" >
                                                        <span style="position:relative;top:-2px;">Display per page</span>
                                                       <asp:DropDownList class="select" Width="50px" ID="ddlPageSize"  SelectedValue='<%# ((Telerik.Web.UI.GridPagerItem)Container).OwnerTableView.PageSize %>' runat="server" OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
                                                            <asp:ListItem Value="25"  Text="25"/>
                                                            <asp:ListItem Value="50"  Text="50"/>
                                                             <asp:ListItem Value="100"  Text="100"/>
                                                        </asp:DropDownList>
                                                       </div>
                                                    <div class="nextprevious">
                                <asp:LinkButton  ID="btnPrevious"  style="float:left;margin-right:10px;margin-left:10px" Text="<< Previous" runat="server" OnClientClick="changePageForReport('prev'); return false;"
                                CommandName="Page" CommandArgument="Prev" ></asp:LinkButton>
                                    <asp:Panel runat="server" ID="NumericPagerPlaceHolder" CssClass="pagination" > </asp:Panel> 
                                <asp:LinkButton ID="btnNext" Text="Next >>" style="float:left;margin-left:10px" runat="server" OnClientClick="changePageForReport('next'); return false;"
                                CommandName="Page"  CommandArgument="Next" ></asp:LinkButton>   
                                </div>  
                                           </div>  </asp:Panel>
                             </PagerTemplate>



  protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
        {
               grdKipKeywords.Rebind();
        }

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 16 Mar 2009, 04:26 AM
Hi Krishna,

Have you set the AutoPostBack property of the DropDownList to true? If not try setting it to true. So that the DropDownList will perform a PostBack and fire the SelectedIndexChanged event while changing the selection.

Regards
Shinu


0
Krishna
Top achievements
Rank 1
answered on 19 Mar 2009, 01:15 AM
Hi shinu..
thanks for the reply
we found that was the problem with performance

Thanks
-krishna
Tags
Grid
Asked by
Krishna
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Krishna
Top achievements
Rank 1
Share this question
or