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

PagerTemplate Demo Question

4 Answers 91 Views
Grid
This is a migrated thread and some comments may be shown as answers.
mkasuboski
Top achievements
Rank 1
mkasuboski asked on 06 Mar 2009, 04:09 PM
I was looking at this example and was wondering why my "NumericPagerPlaceHolder" does not have lines under the pages for the non-active page?

Also, I noticed an issue with the Page Sizer.  My Page Sizer has 1 - 10 as the choices, and if the user changes the Page Sizer to value less that will cause the number of max pages to change, then goes to the last page, then changes the Page Sizer back to 10, the grid loses all of its data. 
What causes this behavior?  and how can I correct it?

Thanks.

4 Answers, 1 is accepted

Sort by
0
mkasuboski
Top achievements
Rank 1
answered on 09 Mar 2009, 08:59 PM
I wanted to follow-up this post to see if anyone has answers for my 2 questions?

Thanks
0
Sebastian
Telerik team
answered on 10 Mar 2009, 10:58 AM
Hello mkasuboski,

I tested the demo you referenced and only the pager number for the active page was not underlines (see the enclosed screenshots). I also followed the steps and changed the page size as you described but everything behaved as expected.

Can you please verify that you are using the latest version 2008.3.1314 of RadControls for ASP.NET AJAX in your project? Furthermore, in case you use the .NET 3.5 build of the suite, check whether setting EnableLinqExpressions = false for the control makes a difference.

Additionally, you may be happy to know that for the Q1 2009 release of the suite we intend to introduce a new built-in grid pager which will have the same set of controls/capabilities. You can see a preview of it here:

http://demos.telerik.com/aspnet-ajax-beta/grid/examples/generalfeatures/paging/defaultcs.aspx (see the third grid)

Kind regards,
Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
mkasuboski
Top achievements
Rank 1
answered on 10 Mar 2009, 03:19 PM
I am actually using version 2008.3.1316.35, and I do have EnableLinqExpressions=false.

Here is the code of the grid:
            <telerik:RadGrid EnableLinqExpressions="false" ID="rgOrderHistory" runat="server"  
                    OnNeedDataSource="rgOrderHistory_NeedDataSource" Skin="Office2007" AllowPaging="true" 
                    Width="1000px" AllowFilteringByColumn="true" AutoGenerateColumns="false" GridLines="None"  
                    PageSize="7" AllowSorting="true"
                <HeaderContextMenu EnableTheming="true" Skin="Office2007"
                    <CollapseAnimation Duration="200" Type="OutQuint" /> 
                </HeaderContextMenu> 
                <HeaderStyle HorizontalAlign="Center" /> 
                <ItemStyle HorizontalAlign="Center"/> 
                <AlternatingItemStyle HorizontalAlign="Center"/> 
                <MasterTableView HorizontalAlign="Center" EnableColumnsViewState="false"
                    <PagerTemplate> 
                        <table width="100%" border="0" cellpadding="5" style="height: 18px;"
                            <tr> 
                                <td style="width: 43%; border-style: none;" align="left"
                                    <table border="0"
                                        <tr> 
                                            <td style="border-style: none;">Change Page:</td> 
                                            <td style="border-style: none;"
                                                <asp:Button ID="Button1" runat="server" OnClientClick="changePage('first'); return false;" 
                                                    CommandName="Page" CommandArgument="First" CssClass="PagerButton FirstPage" ToolTip="Go to First Page" /> 
                                            </td> 
                                            <td style="border-style: none;"
                                                <asp:Button ID="Button2" runat="server" OnClientClick="changePage('prev'); return false;" 
                                                    CommandName="Page" CommandArgument="Prev" CssClass="PagerButton PrevPage" ToolTip="Go to Prev Page" /> 
                                            </td> 
                                            <td style="border-style: none;"
                                                <asp:Panel runat="server" ID="NumericPagerPlaceHolder" />  
                                            </td> 
                                            <td style="border-style: none;"
                                                <asp:Button ID="Button3" runat="server" OnClientClick="changePage('next'); return false;" 
                                                    CommandName="Page" CommandArgument="Next" CssClass="PagerButton NextPage" ToolTip="Go to Next Page" /> 
                                            </td> 
                                            <td style="border-style: none;"
                                                <asp:Button ID="Button4" runat="server" OnClientClick="changePage('last'); return false;" 
                                                    CommandName="Page" CommandArgument="Last" CssClass="PagerButton LastPage" ToolTip="Go to Last Page" /> 
                                            </td> 
                                        </tr> 
                                    </table> 
                                </td> 
                                <td style="width: 23%; border-style: none;" align="center"
                                    <table style="border-style: none;"
                                        <tr> 
                                            <td style="border-style: none;">Page Size:</td> 
                                            <td style="border-style: none;"
                                                <telerik:RadComboBox ID="RadComboBox1" DataSource="<%# New Object(){1, 2, 3, 4, 5, 6, 7} %>" 
                                                    Style="margin-top: 2px; float: left; vertical-align: baseline; margin-right: 20px;" 
                                                    Skin="Office2007" Width="40px" SelectedValue='<%# DataBinder.Eval(Container, "Paging.PageSize") %>' 
                                                    runat="server" OnClientSelectedIndexChanged="RadComboBox1_SelectedIndexChanged"
                                                </telerik:RadComboBox> 
                                            </td> 
                                        </tr> 
                                    </table> 
                                </td> 
                                <td style="width: 33%;border-style: none;" align="left"
                                    <table style="border-style: none;"
                                        <tr> 
                                            <td style="border-style: none;" align="right"
                                                <span style="float: right;">Displaying page 
                                                    <%#CType(DataBinder.Eval(Container, "Paging.CurrentPageIndex"), Int32) + 1%> 
                                                    of  
                                                    <%#DataBinder.Eval(Container, "Paging.PageCount")%>, items from 
                                                    <%#CType(DataBinder.Eval(Container, "Paging.FirstIndexInPage"), Int32) + 1%> 
                                                    to 
                                                    <%#CType(DataBinder.Eval(Container, "Paging.LastIndexInPage"), Int32) + 1%> 
                                                    of 
                                                    <%# DataBinder.Eval(Container, "Paging.DataSourceCount")%>
                                                </span> 
                                            </td> 
                                        </tr> 
                                    </table> 
                                </td> 
                            </tr> 
                        </table> 
                    </PagerTemplate> 
                    <PagerStyle Mode="NumericPages" PageButtonCount="10" /> 
                    <RowIndicatorColumn Visible="false"
                        <HeaderStyle Width="20px" /> 
                    </RowIndicatorColumn> 
                    <ExpandCollapseColumn Resizable="false" Visible="false"
                        <HeaderStyle Width="20px" /> 
                    </ExpandCollapseColumn> 
                    <FilterItemStyle HorizontalAlign="Center" /> 
                    <Columns> 
                        <telerik:GridHyperLinkColumn DataTextField="InvoiceNbr" DataNavigateUrlFormatString="~/OrderHistoryDetail.aspx?InvoiceNbr={0}&Type=1"  
                                DataNavigateUrlFields="InvoiceNbr" HeaderText="Invoice Number" UniqueName="InvoiceNbr"  
                                CurrentFilterFunction="Contains" SortExpression="InvoiceNbr"
                            <ItemStyle HorizontalAlign="Center" Font-Underline="true" Font-Size="12px" /> 
                        </telerik:GridHyperLinkColumn> 
                        <telerik:GridHyperLinkColumn DataTextField="OrderNbr" DataNavigateUrlFormatString="~/OrderHistoryDetail.aspx?OrderNbr={0}&Type=2"  
                                DataNavigateUrlFields="OrderNbr" HeaderText="Order Number" UniqueName="OrderNbr"  
                                CurrentFilterFunction="Contains" SortExpression="OrderNbr"
                            <ItemStyle HorizontalAlign="Center" Font-Underline="true" Font-Size="12px" /> 
                        </telerik:GridHyperLinkColumn> 
                        <telerik:GridBoundColumn CurrentFilterFunction="EqualTo" DataField="InvoiceDt" DataFormatString="{0:MM/dd/yy}"  
                                HeaderText="Invoice Date" UniqueName="InvoiceDt" DataType="System.String"
                            <FilterTemplate> 
                                <telerik:RadDatePicker ID="dpInvoiceDate" runat="server" DateInput-ShowButton="true" AutoPostBack="true" 
                                        OnSelectedDateChanged="dpInvoiceDate_DateChange" OnPreRender="dpInvoiceDate_PreRender"
                                    <DateInput ID="diInvoiceDate" runat="server"
                                        <ClientEvents OnValueChanged="dpInvoiceDate_ValueChanged" /> 
                                    </DateInput> 
                                </telerik:RadDatePicker> 
                            </FilterTemplate> 
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn AllowFiltering="false" DataField="DaysOld" HeaderText="Days Old" UniqueName="DaysOld" DataType="System.Int32" AllowSorting="false"
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn CurrentFilterFunction="Contains" DataField="PONbr" HeaderText="PO #" UniqueName="PONbr"
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn CurrentFilterFunction="Contains" DataField="UserID" HeaderText="User ID" UniqueName="UserID"
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn CurrentFilterFunction="EqualTo" DataField="InvoiceAmt" HeaderText="Invoice Amount" DataType="System.Decimal" DataFormatString="{0:c}" UniqueName="InvoiceAmt"
                            <ItemStyle HorizontalAlign="Right" Font-Size="12px" /> 
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn AllowFiltering="false" DataField="BalDue" HeaderText="Balance Due" UniqueName="BalDue" DataFormatString="{0:c}"
                            <ItemStyle HorizontalAlign="Right" Font-Size="12px" /> 
                        </telerik:GridBoundColumn> 
                    </Columns> 
                </MasterTableView> 
            </telerik:RadGrid> 

You mentioned attached screenshots but I did not see any.  I understand and see that the demo has underlines under each page number and only the active one does not have an underline.  My question was how come when I execute the above code, I do not see the same behavior?
Also the demo isn't doing the same thing with its page size that I am attempting to do.  My page size selector has values 1 - 10 in the dropdown and is set to 10 on initial load of the page.  If you then change the page size selection to something less than 10, then go to the last page, then change the Page Size in the selector back to 10, the grid loses all of its data.
Telling me the demo works, doesn't answer the question of why I am not getting it to work, your just stating the obvious.


0
Sebastian
Telerik team
answered on 13 Mar 2009, 11:48 AM

Hello mkasuboski,

It seems that the screenshot was somehow stripped from my message -  I am re-attaching it again for your reference.

I tried to reproduce the issue with the latest release 2009.1.311 of RadControls for ASP.NET AJAX (Q1 2009) announced yesterday but once again everything seems to work as expected. Note that the new version of the RadGrid QSF runs under .NET 3.5 framework and setting EnableLinqExpressions = false should not make a difference.

Additionally, note that the new default page for the grid (NextPrevAndNumeric) has page size change option through a built-in combobox:

http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/paging/defaultcs.aspx
http://www.telerik.com/help/aspnet-ajax/grdwhatsnew.html

If you intend to upgrade to the latest version of the product, please take into account the changes made for the grid depicted in this help article.

In case the issue persists, the best means to progress in our investigation is to prepare a stripped working version of your project, exhibiting it, and send it enclosed to a formal support ticket. Thus I will be able to test/debug it locally and will get around to you with my findings,

Kind regards,

Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
mkasuboski
Top achievements
Rank 1
Answers by
mkasuboski
Top achievements
Rank 1
Sebastian
Telerik team
Share this question
or