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

RadGrid display some weird paging.

2 Answers 102 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Vijay Baria
Top achievements
Rank 1
Vijay Baria asked on 16 Nov 2010, 11:56 PM
Hello,

I have used RadGrid on one of the page on the website i am working on. I just realized that it does some weird thing.  So, here is the issue. I added a RadGrid to the page, gave DataSourceID to sqldatasource and gave bottom paging of page size 10. But it display page size like a textbox. Does anyone know what am i doing wrong or how to get rid of this bug? Here is my code for my RadGrid,

<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1">
                                <MasterTableView DataSourceID="SqlDataSource1" AllowSorting="true" DataKeyNames="id" AllowPaging="true" PageSize="10" AllowNaturalSort="false" AutoGenerateColumns="false">    
                                   <Columns>
                                        <telerik:GridTemplateColumn HeaderText="Action">
                                        <ItemTemplate>
                                            <asp:LinkButton ID="lbview" CausesValidation="false" CommandName="ViewThread" CommandArgument='<%#Eval("id") %>' runat="server">View</asp:LinkButton>                      
                                        </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridBoundColumn SortExpression="Author" HeaderText="Author" HeaderButtonType="TextButton"
                                            DataField="author_name" UniqueName="Author">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn SortExpression="Title" HeaderText="Title" HeaderButtonType="TextButton"
                                            DataField="title" UniqueName="Title">
                                        </telerik:GridBoundColumn>                   
                                        <telerik:GridBoundColumn SortExpression="PostDate" DataField="date_created" HeaderText="Post Date" HeaderButtonType="TextButton" UniqueName="PostDate">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn SortExpression="LastCommented" HeaderText="Last Commented" HeaderButtonType="TextButton"
                                            DataField="last_commented" UniqueName="LastCommented">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn SortExpression="Rating" HeaderText="Rating" HeaderButtonType="TextButton"
                                            DataField="rating" DataFormatString="{0:N1}" UniqueName="Rating">
                                        </telerik:GridBoundColumn>
                                    </Columns>
                                </MasterTableView>           
                            </telerik:RadGrid>

I have attached the screenshot of the RadGrid displaying that weird textbox.

2 Answers, 1 is accepted

Sort by
0
Marin
Telerik team
answered on 22 Nov 2010, 07:27 AM
Hi Vijay Baria,

You can customize the pager. It has different modes (NumericPages, NexPrev, NextPrevAndNumeric, etc.)
You can change the pager style in the following way:
<telerik:RadGrid ID="RadGrid1" ...>
           <PagerStyle Mode="NumericPages"></PagerStyle>

Further information on pager customization and modes can be found in this live demo.

All the best,
Marin
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Vijay Baria
Top achievements
Rank 1
answered on 26 Nov 2010, 09:54 PM
Thank you Marin. That solved the problem. You made my life easier. :)
Tags
Grid
Asked by
Vijay Baria
Top achievements
Rank 1
Answers by
Marin
Telerik team
Vijay Baria
Top achievements
Rank 1
Share this question
or