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

[Solved] why sorting and paging giving javascript error

2 Answers 75 Views
Grid
This is a migrated thread and some comments may be shown as answers.
appdev
Top achievements
Rank 1
appdev asked on 21 Sep 2009, 09:39 AM

Posted 9 hours ago (permalink)

i have this on the front-end
<telerik:RadGrid AutoGenerateColumns="true" ID="RadGrid1" Visible="false" MasterTableView-EnableNoRecordsTemplate="true" 
                            Width="100%" AllowFilteringByColumn="True" AllowSorting="True" OnSortCommand="RadGrid1_SortCommand" 
                            PageSize="15" ShowStatusBar="true" AllowPaging="True" OnPageIndexChanged="RadGrid1_PageIndexChanged"   
                            runat="server" GridLines="None" OnExcelMLExportStylesCreated="RadGrid1_ExcelMLExportStylesCreated" 
                            OnExcelMLExportRowCreated="RadGrid1_ExcelMLExportRowCreated">  
                        <PagerStyle Mode="NextPrevAndNumeric" />  
                        <MasterTableView Summary="testing" ></MasterTableView>  
                    </telerik:RadGrid> 
and on the back-end i have
Protected Sub RadGrid1_NeedDataSource(ByVal source As ObjectByVal e As GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource  
        Select Case tmp_comp_report_ID  
            Case 19  
                GetSectionReport(19, CInt(Request.QueryString.Item("reportid")), CInt(ddl_Stores.SelectedValue.ToString), ddl_Departments.SelectedItem.Text.ToString, 0, "")  
            Case 24  
                GetSectionReport(24, CInt(Request.QueryString.Item("reportid")), CInt(ddl_Stores.SelectedValue.ToString), ddl_Departments.SelectedItem.Text.ToString, 1, "")  
        End Select 
    End Sub 
 
    Protected Sub RadGrid1_PageIndexChanged(ByVal source As ObjectByVal e As Telerik.Web.UI.GridPageChangedEventArgs) Handles RadGrid1.PageIndexChanged  
        Select Case tmp_comp_report_ID  
            Case 19  
                GetSectionReport(19, CInt(Request.QueryString.Item("reportid")), CInt(ddl_Stores.SelectedValue.ToString), ddl_Departments.SelectedItem.Text.ToString, 0, "")  
            Case 24  
                GetSectionReport(24, CInt(Request.QueryString.Item("reportid")), CInt(ddl_Stores.SelectedValue.ToString), ddl_Departments.SelectedItem.Text.ToString, 1, "")  
        End Select 
    End Sub 
 
    Protected Sub RadGrid1_SortCommand(ByVal source As ObjectByVal e As Telerik.Web.UI.GridSortCommandEventArgs) Handles RadGrid1.SortCommand  
        Select Case tmp_comp_report_ID  
            Case 19  
                GetSectionReport(19, CInt(Request.QueryString.Item("reportid")), CInt(ddl_Stores.SelectedValue.ToString), ddl_Departments.SelectedItem.Text.ToString, 0, "")  
            Case 24  
                GetSectionReport(24, CInt(Request.QueryString.Item("reportid")), CInt(ddl_Stores.SelectedValue.ToString), ddl_Departments.SelectedItem.Text.ToString, 1, "")  
        End Select 
    End Sub 
 
    Protected Sub RadGrid1_ColumnCreated(ByVal sender As ObjectByVal e As Telerik.Web.UI.GridColumnCreatedEventArgs) Handles RadGrid1.ColumnCreated  
        e.Column.HeaderText = Replace(e.Column.HeaderText.ToString, "_"" ")  
        e.Column.AutoPostBackOnFilter = True 
    End Sub 
everything works fine except for paging and sorting. when i click on paging it has javascript error saying object required and sorting also has that. Can you help me please. thank you very much for your time.

2 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 21 Sep 2009, 10:44 AM
Hi Duy,

To avoid duplicate posts, we can continue our communication in the other support ticket post that you have opened on the matter. I have already answered your ticket with the same question.

Best wishes,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
appdev
Top achievements
Rank 1
answered on 21 Sep 2009, 10:46 AM
yes i do know that but i do want to do paging and sorting, i can change the pagesize on the paging why wouldn't the page number or sorting. am i doing something wrong in the code?
Tags
Grid
Asked by
appdev
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
appdev
Top achievements
Rank 1
Share this question
or