I have a very strange problem with a slider, here the situation :
I have a radgrid with paging enabled in slider mode, but when I load the page the drag handle is not at the good position, it's at the left of the decrease handle of the slider (see the pictures attached). The strange thing is that it does not happen in every screens. The very strange thing is that only happen the first time the screen is loaded, if I move the drag handle and change the page of the grid and then if I go back to the first page the position of the drag handle is correct, and if I leave the screen and come back the drag handle will be in the correct position. But if I clear the cache and come back the position is incorrect.
When I look upon the HTML with the IE web developper tool I see that the "left" property of the drag handle element is "-14px", and if I look when the position is correct then the property is "-4px". So the question is where this -10px come from? Is it javascript? Is it CSS? Is it something in the screen that mess with the drag handle?
This problem occurs after we changed our version of Telerik, we were in 2008.3.1314.20 and we moved to 2013.1.417.35 Telerik version for ASP.NET AJAX.
<asp:SqlDataSource ID="ds1" runat="server" ConnectionString="<%$ ConnectionStrings:sqlConnRep %>"SelectCommandType="StoredProcedure" SelectCommand="MySP_Name" />
i need to enhance the application which developed by other colleagues, the source code located at share folder such as \\10.1.1.1\App1
and i had map the share folder as network drive such as T: drive
my colleagues can open the apps by VS and work properly, but when i open it by VS2010, it cannot display the RadControl in Toolbox, display unrecognized tag prefix error message and cannot reference telerik function in code behind.
i had tried many methods that found on forum and website but doesn't work. e.g.
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>