my application will need user to click submit button to retrieve data from code behind and then display the grid,
it works fine that user to select start end, end date and checkbox and then click submit.
but it had error when user using the grid column header filter function, the grid will disappear. user need to click the submit button again to show the result and grid.
how can i fix the problem ? thanks
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="HistoricalStaffs.aspx.vb" Inherits="Reports_HistoricalStaff" %> <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %><%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <script type="text/javascript"> function viewpos(sid) { wid = 1000 hei = 900 x = (screen.availWidth - wid) / 2 y = (screen.availHeight - hei) / 2 window.open('../EmployeeDetails/EmployeeDetails.aspx?SID=' + String(sid), 'StaffDetails', 'scrollbars=no,resizable=yes,width=' + String(wid) + ',height=' + String(hei) + ',left=' + x + ',top=' + y); } </script> </head> <body class="pagebackground"> <form id="form1" runat="server"> <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> </telerik:RadScriptManager> <asp:Panel ID="Panel2" runat="server" Width="1185px" BackColor="#86A3C3"> <asp:Label ID="LabelTitle" ForeColor="White" Font-Bold="true" Font-Size="14pt" runat="server" Text="Historical Staff"></asp:Label> </asp:Panel><div id="tohide"> <telerik:RadToolBar ID="RadToolBar1" runat="server" Width="1185px"> <Items> <telerik:RadToolBarButton Value="Export" Text="Export" Width="80px"> </telerik:RadToolBarButton> <telerik:RadToolBarButton IsSeparator="true"> </telerik:RadToolBarButton> <telerik:RadToolBarButton Value="Print" Text="Print" Width="80px" NavigateUrl="javascript:PrintRadGrid();"> </telerik:RadToolBarButton> <telerik:RadToolBarButton IsSeparator="true"> </telerik:RadToolBarButton> <telerik:RadToolBarButton Value="Close" Text="Close" NavigateUrl="javascript:window.close()" Width="80px"> </telerik:RadToolBarButton> </Items> </telerik:RadToolBar></div> <table border="0" style="margin:10px"> <tr> <td style="padding-top:5px">From: <telerik:RadDatePicker ID="dfFrom" runat="server" DateInput-DateFormat="dd-MMM-yyyy" Width="120px"></telerik:RadDatePicker> To: <telerik:RadDatePicker ID="dfTo" runat="server" DateInput-DateFormat="dd-MMM-yyyy" Width="120px"></telerik:RadDatePicker> <asp:Button ID="btnSubmit" runat="server" Text="Submit" Visible="true" /></td> </tr> <tr> <td style="padding-top:5px">Staff Type: <asp:CheckBoxList ID="CheckBoxList_StaffType" runat="server" DataSourceID="LDS_StaffType" DataTextField="StaffType" AutoPostBack="True" DataValueField="StaffTypeID" OnDataBound="CheckBoxList_StaffType_DataBound" RepeatColumns="4" RepeatDirection="Horizontal" > </asp:CheckBoxList> </td> </tr> </table> <asp:Table ID="Table4" runat="server"> <asp:TableRow> <asp:TableCell> <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" GridLines="None" AllowSorting="True" AllowFilteringByColumn="True" ShowGroupPanel=true AllowPaging="True" PageSize="300" EnableLinqExpressions="true"> <PagerStyle Position="TopAndBottom" /> <GroupingSettings CaseSensitive="false" /> <ClientSettings EnablePostBackOnRowClick="true" AllowColumnsReorder="false" AllowDragToGroup="false" ReorderColumnsOnClient="false"> <Selecting AllowRowSelect="True" /> </ClientSettings> <MasterTableView DataKeyNames="SID"> <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings> <RowIndicatorColumn> <HeaderStyle Width="10px"></HeaderStyle> </RowIndicatorColumn> <ExpandCollapseColumn> <HeaderStyle Width="10px"></HeaderStyle> </ExpandCollapseColumn> <Columns> <telerik:GridBoundColumn DataField="SID" HeaderText="#" ReadOnly="True" SortExpression="SID" UniqueName="SID" visible="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="DisplayName" HeaderText="Staff Name" ReadOnly="True" SortExpression="DisplayName" UniqueName="DisplayName" ItemStyle-Width="300px"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="JobTitle" HeaderText="Job Title" ReadOnly="True" SortExpression="JobTitle" UniqueName="JobTitle" ItemStyle-Width="300px"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="StartDate" HeaderText="Start Date" ReadOnly="True" SortExpression="StartDate" UniqueName="StartDate" DataType="System.DateTime" DataFormatString="{0:dd-MMM-yyyy}" ItemStyle-Width="80px"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="EndDate" HeaderText="End Date" ReadOnly="True" SortExpression="EndDate" UniqueName="EndDate" DataType="System.DateTime" DataFormatString="{0:dd-MMM-yyyy}" ItemStyle-Width="80px"> </telerik:GridBoundColumn> </Columns> </MasterTableView> </telerik:RadGrid> <br /> <br /> </asp:TableCell> </asp:TableRow> </asp:Table> <asp:LinqDataSource ID="LDS_StaffType" runat="server" ContextTypeName="dcHRISDataContext" OrderBy="StaffType" Select="new (StaffTypeID, StaffType)" TableName="HRIS_Dictionary_StaffTypes" > </asp:LinqDataSource> </form> </body> <script type="text/javascript"> function PrintRadGrid() { var previewWnd = window.open('about:blank', '', '', false); var sh = '/CompetentPerson/WebResource.axd?d=yI7Ak8XjwPrTb1pWAk6U_13Yzi9iuY7-jabBST0g4uB2ZEwP5lPLe0BUdPNxCLmqIHhJoPKhT0gJMHUmCz-N0w2&t=634183400620000000'; var styleStr = "<html><head><link href = '" + sh + "' rel='stylesheet' type='text/css'></link></head>"; styleStr = styleStr + '<style>.rgFilterRow {display:none !important}</style>' styleStr = styleStr + '<style>.rgGroupPanel {display:none !important}</style>' var htmlcontent = styleStr + "<body>" + $find('RadGrid1').get_element().outerHTML + "</body></html>"; previewWnd.document.open(); previewWnd.document.write(htmlcontent); previewWnd.document.close(); previewWnd.print(); previewWnd.close(); } </script> </html> Partial Class Reports_HistoricalStaff Inherits System.Web.UI.Page Dim theRow As Integer = 0 Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim dc As New dcHRISDataContext Dim rec = (From a In dc.vHRIS_Departments Where a.DID = Request("DID")).firstordefault If Not isnothing(rec) Then LabelTitle.text = "Historical Staff (" & "Department - " & rec.Department & ")" End If If Not Page.IsPostBack Then dfFrom.SelectedDate = DateTime.Now dfTo.SelectedDate = DateTime.Now End If If Request("SID") <> "" Then Session("SID") = Request("SID") End If End Sub Protected Sub CheckBoxList_StaffType_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles CheckBoxList_StaffType.DataBound Dim dc As New dcHRISDataContext Dim chkboxlb As CheckBoxList chkboxlb = DirectCast(FindControl("CheckBoxList_StaffType"), CheckBoxList) Dim results = (From a In dc.HRIS_Dictionaries Where a.DictTypeID = "70").ToList Dim chkstr As String = "" For Each item In results For Each cb As ListItem In CheckBoxList_StaffType.Items If Trim(item.DictData) = (cb.Value) Then 'If Trim(item.ToString).Contains("YES") Then cb.Selected = True 'End If End If Next Next End Sub Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit.Click Dim dc As New dcHRISDataContext 'get Staff Type of checkbox Dim strStaffType As String = "" For i = 0 To CheckBoxList_StaffType.Items.Count - 1 If CheckBoxList_StaffType.Items(i).Selected = True Then strStaffType += CheckBoxList_StaffType.Items(i).Value.ToString & "," End If Next If Left(strStaffType, 1) = "," Then strStaffType = Right(strStaffType, Len(strStaffType) - 1) End If If Right(strStaffType, 1) = "," Then strStaffType = Left(strStaffType, Len(strStaffType) - 1) End If Dim rList = Split(strStaffType, ",") Dim rec = From a In dc.HRIS_Staff_Movements _ Group Join b In dc.StaffDBs On a.sid _ Equals b.sid Into subGrp = Group _ From b In subGrp.DefaultIfEmpty _ Where rList.Contains(a.StaffType) _ And a.EndDate >= CType(dfFrom.SelectedDate, DateTime) And a.EndDate < CType(dfTo.SelectedDate, DateTime).AddDays(1) _ And a.ProjectDepartment = Request("DID") _ Order By b.DisplayName, a.StartDate, a.EndDate _ Select New With {b.DisplayName, a.JobTitle, a.StartDate, a.EndDate, a.SID, b.Lefe} RadGrid1.DataSource = rec RadGrid1.DataBind() End Sub Protected Sub RadToolBar1_ButtonClick(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadToolBarEventArgs) Handles RadToolBar1.ButtonClick If e.Item.Value = "Export" Then RadGrid1.ExportSettings.ExportOnlyData = True RadGrid1.ExportSettings.IgnorePaging = True RadGrid1.MasterTableView.ExportToExcel() End If End Sub Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound If (TypeOf (e.Item) Is GridDataItem) Then e.Item.Cells(3).Text = "<font style='cursor:hand;color:blue' onclick='viewpos(" & e.Item.DataItem.SID & ");'><B>" & e.Item.Cells(3).Text & "</B></font>" End If End Sub End Class using System.Collections.Generic;using System.Linq;using SetupSvc;/// <summary>/// Summary description for DataSources/// </summary>public class OdsProducts{ int _count; public List<Product> SelectProducts(string filterExpression, string sortExpression, int clientId, int maximumRows, int startRowIndex) { //Call to a WCF service using (SetupSvcClient client = new SetupSvcClient()) { List<Product> products = client.GetProductGrid(clientId, startRowIndex, maximumRows, sortExpression, filterExpression).ToList();// client.GetProductListByClientId(1).ToList(); return products; } } public int CountProducts(string filterExpression, string sortExpression, int clientId) { //Don't worry about this, I know it's not right, but I know how to solve it. using (SetupSvcClient client = new SetupSvcClient()) { List<Product> allProducts = client.GetProductListByClientId(1).ToList(); return allProducts.Count; } }}<telerik:RadScriptManager ID="sManager" runat="server"></telerik:RadScriptManager><telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="RadGrid1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager><telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1" Skin="Default" /><div class="box"> <div class="box-head"> <h3>Prueba grid</h3> </div> <div class="box-content"> <telerik:RadGrid ID="RadGrid1" DataSourceID="ObjectDataSource1" AllowFilteringByColumn="true" AllowSorting="true" AllowPaging="true" runat="server" EnableLinqExpressions="true"> <MasterTableView AllowCustomSorting="true" OverrideDataSourceControlSorting="true"></MasterTableView> </telerik:RadGrid> </div></div><asp:ObjectDataSource ID="ObjectDataSource1" TypeName="OdsProducts" EnablePaging="true" SelectMethod="SelectProducts" SelectCountMethod="CountProducts" runat="server" OnSelecting="ObjectDataSource1_Selecting"> <SelectParameters> <asp:Parameter Name="filterExpression" Type="String" /> <asp:Parameter Name="sortExpression" Type="String" /> <asp:Parameter Name="clientId" Type="Int32" DefaultValue="2" /> </SelectParameters></asp:ObjectDataSource>protected void ObjectDataSource1_Selecting(object sender, ObjectDataSourceSelectingEventArgs e){ //e.Arguments.MaximumRows = your value; e.InputParameters["filterExpression"] = RadGrid1.MasterTableView.FilterExpression; e.InputParameters["sortExpression"] = RadGrid1.MasterTableView.SortExpressions.GetSortString(); e.InputParameters["clientId"] = this.GetCurrentClientId();}public List<Product> GetProductsGrid(){ return Telerik.Web.UI.RadGrid.GetBindingData(this.GetProductIQueryableList().Where(x => x.ClientId == clientId).OrderBy(y=>y.Id), startRowIndex, maximumRows, sortExpression, filterExpression).Data.ToList<Product>();}filterExpression = filterExpression.Replace(".ToString()", string.Empty);return Telerik.Web.UI.RadGrid.GetBindingData(this.GetProductIQueryableList().Where(x => x.ClientId == clientId).OrderBy(y=>y.Id), startRowIndex, maximumRows, sortExpression, filterExpression) .Data.ToList<Product>();<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="fcLine.ascx.cs" Inherits="Website.UserControls.FCLine" %><asp:HiddenField ID="lineColor" runat="server" /> <%-- Used by client code dealing with MouseOver & MouseOut --%><asp:Panel ID="panelLine" runat="server" CssClass="fcLine"> <div> <asp:Panel ID="panelLeft" runat="server" CssClass="fcLineInnerLeft" /> <asp:Panel ID="panelRight" runat="server" CssClass="fcLineInnerRight" /> <%-- Note: Margin-Left's -10px = -1 * 1/2 * Width of the icon --%> <%-- Note: The Margin-Top value of 50% is replaced in the server-side code if a straight line is involved --%> <asp:Panel ID="panelBubble" runat="server" style="float:left; position:relative; margin-left:-10px; margin-top:50%"> <img src="/Images/Shapes/circle2.png" style="position:absolute; left:0; top:0" /> <p style="position:absolute; left:7px; color:white; font-weight:bold; padding-top:3px"> <asp:Label ID="labelBubble" runat="server" /> </p> </asp:Panel> <div style="clear:both"></div> </div></asp:Panel><telerik:RadToolTip ID="radToolTip1" runat="server" TargetControlID="panelLine" RelativeTo="Element" Position="BottomCenter" RenderInPageRoot="false"> Hardcoded Test Tooltip</telerik:RadToolTip>We received a complaint from a customer that our website has problems in IE 10. The scroll bar for the middle container in the middle of the page does not have a "track" in IE 10, thus not allowing the user to scroll in that box.
Turn on Compatibility Mode and the webpage displays fine. No problems in Chrome or Firefox either.
Inspecting the page in IE 10 (F12 Developer Tools), I'm not sure what's being changed in the code that causes the Compatibility Version to work. The average user won't know about Compatibility Mode so we're trying to fix this on our own.
The scroll bar was put there by our CMS.

<telerik:RadGrid ID="RadGrid1" runat="server" Skin="txstate" EnableEmbeddedSkins="false" Width="600px" Visible="false" > <MasterTableView Width="100%" DataKeyNames="ID" CommandItemDisplay="Top" CommandItemSettings-AddNewRecordText="Add New" CommandItemSettings-ShowAddNewRecordButton="true" CommandItemSettings-ShowRefreshButton="false"> <PagerStyle Mode="NextPrevAndNumeric" /> <Columns> <telerik:GridEditCommandColumn UniqueName="EditCommandColumn" ButtonType="LinkButton" EditText="Edit" /> <telerik:GridButtonColumn UniqueName="InsertColumn" CommandName="Add" Text="Add" ButtonType="LinkButton" /> <telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName= "DeleteColumn" /> </Columns> <EditFormSettings EditFormType="Template"> <FormTemplate> <asp:PlaceHolder ID="PlaceHolder1" runat="server" /> </FormTemplate> </EditFormSettings> </MasterTableView> </telerik:RadGrid>Protected Sub RadGrid1_ItemCreated(sender As Object, e As GridItemEventArgs) Handles RadGrid1.ItemCreated If TypeOf e.Item Is GridEditFormItem And e.Item.IsInEditMode Then Dim editItem As GridEditFormItem = DirectCast(e.Item, GridEditFormItem) Dim PlaceHolder1 As PlaceHolder = DirectCast(editItem.FindControl("PlaceHolder1"), PlaceHolder) PlaceHolder1.Controls.Add(New LiteralControl("<table border='0' cellpadding='5' cellspacing='0' width='100%' align='center'><tr><td width='110px'>")) Dim lb_Description As Label = New Label lb_Description.Text = "Description: " lb_Description.ID = "lb_Description" lb_Description.CssClass = "label" PlaceHolder1.Controls.Add(lb_Description) Dim txt_Description As RadTextBox = New RadTextBox
txt_Description.Text = editItem.Item("Description").Text
txt_Description.ID = "txt_Description"
txt_Description.Width = "200"
PlaceHolder1.Controls.Add(txt_Description)
Dim btn_update As Button = New Button
btn_update.Text = "Update"
btn_update.ID = "btn_Update"
btn_update.CommandName = "Update"
btn_update.CssClass = "button"
PlaceHolder1.Controls.Add(btn_update)
Dim btn_cancel As Button = New Button
btn_cancel.Text = "Cancel"
btn_cancel.ID = "btn_cancel"
btn_cancel.CommandName = "Cancel"
btn_cancel.CssClass = "button"
PlaceHolder1.Controls.Add(btn_cancel)
End If
End Sub