Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
208 views
Hello
I have a problem with RadToolTip position on Chrome. I found a solution:
Telerik.Web.UI.RadToolTip.prototype._getPosRelativeToMouse = function (targetBounds) {...}
but I get an error js: 'prototype is undefined'.
Why?
Thank you
Vessy
Telerik team
 answered on 10 Dec 2018
1 answer
249 views

I'm working in Chrome mobile.  I'm having an issue where the grid does not scroll horizontally when the swiping is initiated over content that is a hyperlink.  I attached event handlers to touchstart and touchend, and I can see that touchstart is called, and while touchmove is happening the grid does not scroll.  If I enlarge the page to more than the window size it will actually scroll the page (but not the grid).

Scrolling in the grid works if pointer events are disabled on the hyperlink using CSS, but the click event doesn't work if this is done so it isn't a workable solution (pointer-events:none).

You have to click on the link just right to reproduce.  I'm logging the events to the page for the first Test link in the grid to make this clear.  Sometimes you think you are clicking on it, but it doesn't actually raise the touchstart event, and in that case scrolling works.  However, when it does raise the touchstart event scrolling does not.  This makes scrolling in the grid really inconsistent for users.

 

Code

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="REN_AppTest_Grid.aspx.cs" Inherits="Efficio.Web.TestPages.REN_AppTest_Grid" %>

<!DOCTYPE html>

<html>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <style type="text/css">
        a
        {
            /*pointer-events:none;*/
            /*touch-action: none;*/
        }

        a:visited, a:link
        {
            color: #007AFF;   
            font-weight: bold;
        }

        a:active
        {
            color: red;   
            font-weight: bold;
        }

        a:hover
        {
            color: yellow;   
            font-weight: bold;
        }

    </style>
</head>
<body>
    <form id="form1" runat="server">
    <a href="REN_AppTest_Grid.aspx" style="font-size: 2em; margin-left: 100px;">Refresh</a>
    <br/><br/>
    <a id="EventTest" href="#" style="font-size: 2em; margin-left: 100px;">Event Test</a>
    <br/><br/>
    <telerik:RadScriptManager ID="smScriptManager" EnablePageMethods="true" runat="server">
        <CacheSettings Enabled="false" />
        <Scripts>
            <asp:ScriptReference Path="~/lib/jquery/dist/jquery.min.js" />
            <asp:ScriptReference Path="~/lib/jquery-migrate/jquery-migrate.min.js" />
            <asp:ScriptReference Path="~/lib/jquery-browser/dist/jquery.browser.min.js" />            
        </Scripts>
    </telerik:RadScriptManager>
    Date: <%= DateTime.Now %>
    <br /><br />
    <asp:Panel ID="pnlGridScrolling" BorderWidth="1" Width="100%" BorderColor="Red" BorderStyle="Solid" runat="server">
        <Efficio:EfficioGridView ID="grdOne" Width="700" RenderMode="Mobile" runat="server">
            <ClientSettings>
                <Scrolling AllowScroll="True" />
            </ClientSettings>            
            <MasterTableView Font-Size="2em">
                <Columns>                        
                    <Efficio:EfficioGridTemplateColumn HeaderText="C1">
                        <ItemTemplate>
                            <asp:HyperLink NavigateUrl="javascript: alert('clicked');" Text='<%# DataBinder.Eval(Container.DataItem, "Column2").ToString() %>' runat="server" />
                        </ItemTemplate>
                    </Efficio:EfficioGridTemplateColumn>
                    <Efficio:EfficioBoundColumn DataField="Column2" HeaderText="C2" />
                    <Efficio:EfficioBoundColumn DataField="Column3" HeaderText="C3" />
                    <Efficio:EfficioBoundColumn DataField="Column4" HeaderText="C4" />
                    <Efficio:EfficioGridTemplateColumn HeaderText="C5">
                        <ItemTemplate>
                            <%--<a href="#" style="touch-action: pan-x;">Test</a>--%>
                            <asp:HyperLink ID="lnkTest" NavigateUrl="NotHere.aspx" Text="Test" runat="server" />
                        </ItemTemplate>
                    </Efficio:EfficioGridTemplateColumn>                    
                    <Efficio:EfficioBoundColumn DataField="Column6" HeaderText="C6" />
                    <Efficio:EfficioBoundColumn DataField="Column7" HeaderText="C7" />
                    <Efficio:EfficioBoundColumn DataField="Column8" HeaderText="C8" />
                    <Efficio:EfficioBoundColumn DataField="Column9" HeaderText="C9" />
                    <Efficio:EfficioBoundColumn DataField="Column10" HeaderText="C10" />
                </Columns>
            </MasterTableView>
        </Efficio:EfficioGridView>    
        <br/>
        Status
        <div id="statusPanel">
                        
        </div>    
    </asp:Panel>                            
    </form>
    
<script type="text/javascript">
    window.onerror = function(msg, url, line, col, error) {
        // Note that col & error are new to the HTML 5 spec and may not be 
        // supported in every browser.  It worked for me in Chrome.
        var extra = !col ? '' : '\ncolumn: ' + col;
        extra += !error ? '' : '\nerror: ' + error;

        // You can view the information in an alert to see things working like this:
        alert("Error: " + msg + "\nurl: " + url + "\nline: " + line + extra);

        // TODO: Report this error via ajax so you can keep track
        //       of what pages have JS issues

        var suppressErrorAlert = true;
        // If you return true, then error alerts (like in older versions of 
        // Internet Explorer) will be suppressed.
        return suppressErrorAlert;
    };
   
    function touchstart(e)
    {        
        var status = $('#statusPanel');
        status.text(status.text() + ' touchstart');
        //e.preventDefault();
    }

    function touchend(e)
    {
        var status = $('#statusPanel');
        status.text(status.text() + ' touchend');
        //e.preventDefault();
    }

    function click(e)
    {
        var status = $('#statusPanel');
        status.text(status.text() + ' click');
        //e.preventDefault();
    }

    function touchmove(e) {
        var status = $('#statusPanel');
        status.text(status.text() + ' touchmove');
        //e.preventDefault();
    }

    function test()
    {
        var el = document.querySelector('#EventTest');
        el.addEventListener("click", click, false);
        el.addEventListener("touchstart", touchstart, false);
        el.addEventListener("touchend", touchend, false);
        
        el = document.querySelector('#grdOne_ctl00_ctl04_lnkTest');
        el.addEventListener("click", click, false);
        el.addEventListener("touchstart", touchstart, false);
        el.addEventListener("touchend", touchend, false);
        //el.addEventListener("touchmove", touchmove, false);
    }

    Sys.Application.add_load(test);   
</script>
</body>
</html>

 

using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Efficio.Web.TestPages
{
    public partial class REN_AppTest_Grid : System.Web.UI.Page
    {
        #region Fields

        private static readonly Random _random = new Random();

        #endregion

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                grdOne.DataSource = GenerateTestDataTable();
                grdOne.DataBind();
            }
        }

        /// <summary>
        /// Generate a data source that is a data table
        /// </summary>
        /// <returns>A data table object with test data</returns>
        private static DataTable GenerateTestDataTable()
        {
            const int columnCount = 10;
            const int numberOfRecordsToGenerate = 10;

            DataTable dataSource = new DataTable();
            for (var i = 1; i <= columnCount; i++)
            {
                dataSource.Columns.Add(new DataColumn(string.Format("Column{0}", i), typeof(int)));
            }


            // generate data
            for (var i = 0; i < numberOfRecordsToGenerate; i++)
            {
                DataRow dataRow = dataSource.NewRow();
                for (var j = 1; j <= columnCount; j++)
                {
                    dataRow[string.Format("Column{0}", j)] = _random.Next(Int16.MinValue, Int16.MaxValue);
                }
                dataSource.Rows.Add(dataRow);
            }

            return dataSource;
        }
    }
}

 

 

Eyup
Telerik team
 answered on 10 Dec 2018
1 answer
51 views

I run RadSchedular in the different places in my project.

The first schedules the activity, the 2nd confirms or reschedules it.

The first implementation runs well the 2nd displays can find the formal.

Apparently I copied the HTML code in the first to the second cell.

Did I do it wrongly? 

 

Eyup
Telerik team
 answered on 10 Dec 2018
1 answer
98 views
I need to add functionality to a raddatepicker such that typing "t" will change to today's date, "t-x" will subtract x days from today, and finally "t+x" will add x days to today.  I used OnValueChanging and have it working, however after everything has run through it seems to override the "t-x" and "t+x" to be "m/x/yyyy" where m is the current month, x is the number I typed, and yyyy is the current year.  Is there a better way to do this or a way of stopping the override.
Eyup
Telerik team
 answered on 10 Dec 2018
9 answers
330 views
We are using RAD Grid.(2011.1.519.35)

For ADA compliance , we need to be able to browse through all the cells in the grid so that screen reader can read the data in each cell.

We are using bound fields and template fields

Issue is that the tab does not work for bound fields, it works only for the link button fields.

How can the tabbing be enabled for bound field as the same is required for ADA compliance.

Thanks,


Eyup
Telerik team
 answered on 10 Dec 2018
6 answers
191 views

Hello, please open a demo page https://demos.telerik.com/aspnet-ajax/datetimepicker/overview/defaultcs.aspx?skin=Bootstrap and select Bootstrap skin.

Note that the left top & bottom corners are not rendered correctly. Most likely it's related to the "box-sizing: content-box".

Rumen
Telerik team
 answered on 10 Dec 2018
3 answers
279 views

I just took over an app that is using the Editor control and users are unable to indent line by line. When they try to indent to indents everything in the box. I have to go to the HTML tab and remove the <p> text</p> tags to have it indent line by line. Is there a fix for this somewhere or do we need to upgrade? It's happening with IE 11.

 

The Telerick.Web.UI dll we are referencing is version:

2011.1.413.35

runtime version is: v2.0.50727

 

I have the app rendering in IE 9 mode in IE 11, however, it's still not working correctly with the formatting pieces

Rumen
Telerik team
 answered on 10 Dec 2018
2 answers
281 views
Hello,

I have a master page in which I have rad tree view with check boxes (this forms the left menu of the page).
I created another page which refers to above master file.
In the content tab , I have created RadTabs (this has panel in it).

My requirement is that , when the user checks a checkbox node,  a text box should get dynamically added to the rad tab's panel.

How can I do this ( sample will help. )

Should I ajaxify and write server side code - how ( becuase rad controls are already ajaxified.) . I think this should be done client side , so should i use javascript (but this will be complicated I think). Any other approach

Help appreciated.
Naveed
Top achievements
Rank 1
 answered on 08 Dec 2018
6 answers
1.0K+ views
Hi,
    I have a radgrid in default.aspx page. I want show some data in radgrid with paging. But I dont have the whole datasource at the Need_DataSource event. My backend is like, passing the pagecount and the service will return only 100 records of the Nth page. I dont know the approximate total rows count. How do I achieve paging in radgrid without having the whole datasource and total rows count?
Please guide me.


Thanks,
Tamil
Sean
Top achievements
Rank 1
 answered on 07 Dec 2018
12 answers
263 views

Hi,

My company has a requirement to build a User Control that has 3 tabs Current, Original and Final.

Current tab will display the current content of the RadEditor including all the Track Changes information.

Original tab will display the original content of the RadEditor before changes are made (all the changes are rejected).

Final tab will display the final content of the RadEditor if all the changes are accepted.

 

To achieve this I have tried 2 methods.

First, I tried to use the server-side methods AcceptTrackChanges to get the content for Final and RejectTrackChanges to get the content for Original.

However, this did not work because AcceptTrackChanges and RejectTrackChanges does not accept or reject text formatting changes like Bold, Italics, etc.

 

The second method I tried was to use the client-side workaround suggested by http://feedback.telerik.com/Project/108/Feedback/Details/88678-when-accepttrackchanges-method-is-being-used-from-the-code-behind-inline-forma.

Unfortunately that did not work either.

 

Is there another way to achieve what we want?

Rumen
Telerik team
 answered on 07 Dec 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?