Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
1.0K+ views
Hi,guys,

In one of my page,I use "RadAjaxManager.GetCurrent(Page).ResponseScripts.Add" to add some script.
What makes me amazing,the script can not work at all.

the client script:
function moveToTargetAnchor(anchorName) {
            var anchor = $('a[name="' + anchorName + '"]');
            if (anchor.length > 0) {
                anchor[0].scrollIntoView(true);
            }
            var editor = $find("<%=editConent.ClientID%>");
            if (editor != null) {
                var anchorElement = editor.get_document().getElementsByName(anchorName);
                if (anchor != null) {
                    anchorElement[0].scrollIntoView(true);
                }
            }
//alert('123');
        }
the server:
RadAjaxManager.GetCurrent(Page).ResponseScripts.Add("moveToTargetAnchor(""" & item.Title & """);")

The code complete a function of going to spesific anchor.
I have a test:
when i add a "alert('123')" to the end of script,the page could go to right anchor at first;
but after displaying '123',the page looks like being refreshed.

How could this happen,anyone can help me?

Best regards,
Jack.




Sachita
Top achievements
Rank 1
Iron
Iron
Iron
 updated answer on 13 May 2021
1 answer
138 views

Hi,

How do I specify what I want to be the tootip for an unbound RadHTMLChart in code (VB)?
the code works but shows the Y value (tDays) in the tootip, I need it to show the Name field (Dept)

 

see code below:

                    Dim DeptSum = (From d In EmpData Group d By Dept = d.Department Into Group
                                   Select Dept, tDays = Group.Sum(Function(d) d.Days)).ToList

                    Dim PieChartDays As New PieSeries
                    Dim PieSlice As PieSeriesItem

                        For Each DP In DeptSum
                            PieSlice = New PieSeriesItem
                            PieSlice.Name = DP.Dept
                            PieSlice.Y = DP.Tdays
                            PieChartDays.SeriesItems.Add(PieSlice)
                        Next

Vessy
Telerik team
 answered on 12 May 2021
1 answer
146 views

Hello Developers!

I am using Telerik Radgrid with Excel-like filters for creating my data grids. One issue I face is I cannot filter with symbol '?' or any word starting with '?' like '?check'. It immediately redirects to 500 internal error. If the symbol comes after any other character, the filter works fine, like 'o?c'.

I use RadGrid with DB source and autopopulate columns according to datasource. My filters are Excel-like filters.

I can replicate the same issue in your demo webpage for Excel-like filters too.

Placed screenshots for reference.

URL used: Telerik Web UI Grid Excel-like Filtering Demo | Telerik UI for ASP.NET AJAX

Could you let me know what can be done for this? It is absolutely important for me to be able to filter with '?'

Thanks and Regards

Vessy
Telerik team
 answered on 12 May 2021
0 answers
137 views

Hi Telerik Community,

I have a question which is a little difficult to explain, that is why I attached an image to make it more clear.
I have multiple data points, and each data point has a Pitch attribute associated with it, this Pitch measurement unit is Degrees.

Using the Telerik Chart framework, is it possible to plot each data point at its associated degree angle value and then plot the next data point in relation to the previous. Essentially what we need to do is visually show a profile that is mathematically accurate. I have been able to successfully and accurately achieve this on paper using a protractor but want to digitally achieve this using the Telerik Chart.

Each data point also has a depth value which needs to be shown visually in relation to its associated pitch data point, this will give us the ground elevation relative to the pitch data point.

Would appreciate some guidance on this.

Kind Regards.

 

n/a
Top achievements
Rank 1
 updated question on 12 May 2021
1 answer
217 views

DateTimeOffset and RadGrid.  Column does not show when this datatype is in resultset.

 

I have a dataTable with this datatype (DateTimeOffset) and this is the only column not showing.

 

I autogenerate the columns in the grid.

 

A workaround for now is to cast that column to datetime, or some other type in my SQL statement that generates the results.  Just curious if this is something that is being worked on or known about?

 

 

Vessy
Telerik team
 answered on 11 May 2021
1 answer
172 views

I have a radgrid set to a datatable.  Columns of type DateTimeOffset are hidden.

Why is this?

 

Roger

Vessy
Telerik team
 answered on 11 May 2021
2 answers
487 views

While following this tutorial to make my RadGrid stack columns vertically on a mobile device, I'm experiencing table width issues. 

In these screenshots, you can see that when I disable the element.style "width: 100%", the table renders as expected.  When it's enabled, the cells are all crammed in a narrow width.

So far, I've been unable to determine how to mimic this disabling in my CSS. 

Any ideas how to resolve?

 

 

Jeff
Top achievements
Rank 3
Bronze
Iron
Iron
 answered on 11 May 2021
4 answers
182 views

Hi Team,

I have an issue with RadCombobox.
Currently we are using Telerik Version - 2015.3.1111.35 and Upgraded .NetFramework 3.5 to .NetFramework 4.8.

Tested in IE,edge and chrome - Not working.

Radcombobox dropdown click events are not firing after apppool changed to 4.0 for the first postback and 

It works for other controls in further postbacks.

Can anyone please help on this?

 


Vessy
Telerik team
 answered on 10 May 2021
1 answer
112 views

I'm creating a RadGrid dynamically and inserting a RadGrid into it.

When I change the RadGrid page, it disappears. How to keep the RadPageView content through Postback?

Besides that, none of RadGrid events are fired when the page changes.

My code:


<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PageViewProblem.aspx.cs" Inherits="WebApp.PageViewProblem" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <telerik:RadTabStrip runat="server" ID="radTabStrip1" MultiPageID="radMultiViewSearchResult"></telerik:RadTabStrip>
            <telerik:RadMultiPage runat="server" ID="radMultiView1" SelectedIndex="0" EnableViewState="true"></telerik:RadMultiPage>
            <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
        </div>
    </form>
</body>
</html>


using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;

namespace WebApp
{
    public partial class PageViewProblem : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                LoadData();
            }
        }

        private void LoadData()
        {
            RadTab tab1 = new Telerik.Web.UI.RadTab("Tab1");
            radTabStrip1.Tabs.Add(tab1);
            RadPageView resultPageView1 = new RadPageView();
            resultPageView1.ID = "radPageView1";
            radMultiView1.PageViews.Add(resultPageView1);

            RadGrid grid1 = new RadGrid();
            grid1.ID = "RadGrid1";
            grid1.PageSize = 5;
            grid1.AllowPaging = true;
            grid1.AllowCustomPaging = true;
            grid1.PagerStyle.AlwaysVisible = true;
            grid1.VirtualItemCount = 50;
            grid1.NeedDataSource += (sender, args) =>
            {
                grid1.DataSource = SimulateDataSource(grid1);
            };
            grid1.PageIndexChanged += (sender , args) =>
            {
                Debug.WriteLine("Please, load page number: {grid1.currentPage}");
            };
            resultPageView1.Controls.Add(grid1);
        }

        private object SimulateDataSource(RadGrid grid)
        {
            List<ItemData> result = new List<ItemData>();
            for (int i = grid.CurrentPageIndex + 1; i <= grid.CurrentPageIndex + 5; i++)
            {
                result.Add(new ItemData(i, $"Item Description {i}"));
            }
            return result;
        }
        private class ItemData
        {
            public int Value { get; set; }
            public string Description { get; set; }
            public ItemData(int value, string description)
            {
                this.Value = value;
                this.Description = description;
            }
        }
    }
}

Attila Antal
Telerik team
 answered on 07 May 2021
1 answer
82 views
Hello, I am having problems running RadClientDataSource (data is loaded into RadMultiColumnComboBox) and KendoGrid on the same page. I get strange Ajax and Kendo errors in console about stuff being undefined. Are there any known incompatibilities between some Telerik UI controls and Kendo UI widgets? Are there controls that prefer external jQuery over internal one bundled in Telerik UI?
Peter Milchev
Telerik team
 updated answer on 07 May 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?