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

Radgrid error paging?

1 Answer 113 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Triet
Top achievements
Rank 1
Triet asked on 19 Jul 2011, 04:08 AM
Hello

My page use Gird to paging, http://www.vuakiengmiennam.com. My page show all product and have 2 page. I click Page 2, it not run and show error, i have attach file. Please help me. I use both Firefox and IE

 <div id="menubody">
          
                            <uc1:menu ID="menu1" runat="server" />
                       
            

            </div>
 <div id="products">        
     
     <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
     </telerik:RadScriptManager>
   
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
                <AjaxSettings>
                     <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                     <UpdatedControls>
                     <telerik:AjaxUpdatedControl ControlID="RadGrid1"/>
                     </UpdatedControls>
                     </telerik:AjaxSetting>
                    <telerik:AjaxSetting AjaxControlID="RadGrid1">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="RadGrid1"/>
                            
                        </UpdatedControls>
                        </telerik:AjaxSetting>
                    
                  
                                                        
                </AjaxSettings>
            </telerik:RadAjaxManager>
          
          
      
          
           <telerik:RadGrid ID="RadGrid1" DataSourceID="SqlDataSource1"
            runat="server" GridLines="None" AllowPaging="True" OnPreRender="RadGrid1_PreRender"
            PageSize="9" CellSpacing="0" ShowHeader="False" Width="555px"
         BorderWidth="0px">
            <PagerStyle Mode="NextPrevAndNumeric" />
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>

               <FooterStyle BorderWidth="0px" />
               <AlternatingItemStyle BorderWidth="0px" />

               <ItemStyle BackColor="#1A8218" BorderWidth="0px" />

            <MasterTableView TableLayout="Fixed" ForeColor="#003300" BorderWidth="0px"
                   HorizontalAlign="NotSet" AutoGenerateColumns="False">
                <ItemTemplate>
                    <%# (((GridItem)Container).ItemIndex != 0)? "</td></tr></table>" : "" %>
                    <asp:Panel ID="ItemContainer" CssClass='<%# (((GridItem)Container).ItemType == GridItemType.Item)? "item" : "alternatingItem" %>'
                        runat="server">
                         <telerik:RadBinaryImage ID="RadBinaryImage1" runat="server" DataValue='<%# Eval("Hinh")%>' Width="150" Height="100" ResizeMode="Crop" />
                       <br />
                        <b>Tên:</b>
                        <%# Eval("Tencay")%>
                        <br />
                        <b>Giá</b>
                        <%# Eval("Gia")%>
                        <br />
                        <b>CK:</b>
                        <%# Eval("Huehong")%>  <a href="dproducts.aspx?idcay=<%# Eval("id") %>" ><img src="images/chitiet.gif"/ border="0px"></a></asp:Panel>
                </ItemTemplate>

<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>

<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
    <HeaderStyle BorderWidth="0px" />
    <ItemStyle BorderWidth="0px" />
                </RowIndicatorColumn>

<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>

                <Columns>
                    <telerik:GridBoundColumn DataField="id" DataType="System.Int32"
                        FilterControlAltText="Filter id column" HeaderText="id" SortExpression="id"
                        UniqueName="id">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="idloaicay" DataType="System.Byte"
                        FilterControlAltText="Filter idloaicay column" HeaderText="idloaicay"
                        SortExpression="idloaicay" UniqueName="idloaicay">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Tencay"
                        FilterControlAltText="Filter Tencay column" HeaderText="Tencay"
                        SortExpression="Tencay" UniqueName="Tencay">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Gioithieu"
                        FilterControlAltText="Filter Gioithieu column" HeaderText="Gioithieu"
                        SortExpression="Gioithieu" UniqueName="Gioithieu">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Gia"
                        FilterControlAltText="Filter Gia column" HeaderText="Gia" SortExpression="Gia"
                        UniqueName="Gia">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Huehong"
                        FilterControlAltText="Filter Huehong column" HeaderText="Huehong"
                        SortExpression="Huehong" UniqueName="Huehong">
                    </telerik:GridBoundColumn>
                    
                    <telerik:GridBoundColumn DataField="Ngaycapnhat" DataType="System.DateTime"
                        FilterControlAltText="Filter Ngaycapnhat column" HeaderText="Ngaycapnhat"
                        SortExpression="Ngaycapnhat" UniqueName="Ngaycapnhat">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Trangthai"
                        FilterControlAltText="Filter Trangthai column" HeaderText="Trangthai"
                        SortExpression="Trangthai" UniqueName="Trangthai">
                    </telerik:GridBoundColumn>
                </Columns>

<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
                <ItemStyle BackColor="#009933" BorderColor="#009933" BorderWidth="0px" />
                <AlternatingItemStyle BorderWidth="0px" />
                <HeaderStyle BackColor="#339966" />
            </MasterTableView>
               <HeaderStyle BorderWidth="0px" />
            <GroupingSettings CaseSensitive="false" />

               <GroupHeaderItemStyle BorderWidth="0px" />

<FilterMenu EnableImageSprites="False"></FilterMenu>
               <EditItemStyle BorderWidth="0px" />
               <ActiveItemStyle BorderWidth="0px" />
               <CommandItemStyle BorderWidth="0px" />
        </telerik:RadGrid>
          
                    <asp:SqlDataSource ID="SqlDataSource1" runat="server"
                        ConnectionString="<%$ ConnectionStrings:vuakiengmiennamConnectionString %>"
                        
                        SelectCommand="sp_showcaykiengtheoloai"
         SelectCommandType="StoredProcedure">
                        <SelectParameters>
                            <asp:QueryStringParameter DefaultValue="0" Name="loaicay" QueryStringField="id"
                                Type="Byte" />
                        </SelectParameters>
                    </asp:SqlDataSource>

1 Answer, 1 is accepted

Sort by
0
Vasil
Telerik team
answered on 21 Jul 2011, 03:43 PM
Hello Triet,

You could temporarily disable the Ajax to see the error on server side instead of this message that you are getting in the browser. This will allow you to debug the problem easier.

I don't see anything incorrect in the code that you have posted, however I am unable to test it without the database. I tested your online site and the paging is working fine there. So I suppose that you have already fixed it.

Kind regards,
Vasil
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
Grid
Asked by
Triet
Top achievements
Rank 1
Answers by
Vasil
Telerik team
Share this question
or