I am trying to recreate the example in the following demo:
http://demos.telerik.com/aspnet-ajax/grid/examples/functionality/exporting/export-word-csv/defaultcs.aspx
In my case filtering by column is allowed and the data source is set in the code behind through the RadGrid1NeedDataSource method.
The data is loaded correctly and shown in the table, sorting by clicking on the column names work, the page navigation at the bottom-left corner works fine.
I am facing two problems:
1) The buttons located at the bottom-center for going to a specific page and changing the page size don't work.
2) None of the filters work, entering any text doesn't have any effect and pressing any filter icon, while using the IE F12 DevTools debugger, shows the following error:
SCRIPT5007: Unable to get property '_showFilterMenu' of undefined or null reference<br>File: script block (377), Line: 3, Column: 1Do you have any idea how I could fix it?
My source code follows:
<form id="form1" runat="server"><telerik:RadScriptManager runat="server" ID="RadScriptManager1" EnableScriptCombine="False" /><telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" /><telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1"> <asp:button id="Button1" text="Export to CSV" onclick="ExportToCvs" runat="server" /> <telerik:RadGrid ID="RadGrid1" Skin="Silk" AutoGenerateColumns="false" AllowPaging="True" AllowSorting="True" AllowFilteringByColumn="True" PageSize="10" OnNeedDataSource="RadGrid1NeedDataSource" EnableLinqExpressions="false" runat="server"> <ExportSettings HideStructureColumns="true" /> <MasterTableView Width="100%" AllowFilteringByColumn="True"> <PagerStyle Mode="NextPrevNumericAndAdvanced"></PagerStyle> <Columns> <telerik:GridBoundColumn DataField="Column1" HeaderText="Column1" /> <telerik:GridDateTimeColumn DataField="Column2" UniqueName="Column2" HeaderText="Column2" PickerType="DatePicker" EnableRangeFiltering="true" FilterControlWidth="110px" EditDataFormatString="dd.mm.yyyy" DataFormatString="{0:dd/mm/yyyy}" DataType="System.DateTime" ShowFilterIcon="false" CurrentFilterFunction="Between" /> <telerik:GridBoundColumn DataField="Column3" HeaderText="Column3" /> </Columns> <ItemStyle BackColor="#DFDFDF" /> <HeaderStyle BackColor="#FFFFFF" ForeColor="#767676" /> <AlternatingItemStyle BackColor="#FFFFFF" /> </MasterTableView> </telerik:RadGrid></telerik:RadAjaxPanel></form>In the code behind:
protected void RadGrid1NeedDataSource(object source, GridNeedDataSourceEventArgs e) { using (SqlConnection conn = new SqlConnection(Settings.Default.ConnectionString)) { DataContext db = new DataContext(conn); Table<Item> items = db.GetTable<Item>(); IEnumerable<Item> query = from x in items select x; RadGrid1.DataSource = query.ToList(); }}