Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
100 views
I have a list of data that displayed in RadGrid. When mouseover the label, the tooltip shown. For the first load, the data in the tooltip is loaded correctly. When navigate to another set (by clicking the "Next" button in the demo below), then mouseover to the same position, the tooltip is loaded but the data is not correct.

What do i need to change so that the tooltip can be loaded correctly.

Below is the sample code that can produce this issue.

Thanks in advance.

<%@ Page Language="C#" AutoEventWireup="true" Codebehind="Tooltip.aspx.cs" Inherits="RadControlsWebApplication1.Tooltip" %>
<%@ Import Namespace="System.Data" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title>Tooltip</title>
</head>
<body>
    <form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager" runat="server" />
        <div>
            <telerik:RadScriptBlock runat="server" ID="ScriptBlock">
  
                <script type="text/javascript">
                function toolTipManagerClientBeforeShow(sender, args)
                {
                    // clear the tooltip value
                    var tooltipLabel = document.getElementById("<%= Label1.ClientID %>");
                    tooltipLabel.innerHTML = "";
                      
                    var panel = $find("<%= XmlHttpPanel1.ClientID %>");
                    sender.set_contentElement(panel.get_element());
                    panel.set_value(sender.get_value());
                }
                </script>
  
            </telerik:RadScriptBlock>
            <telerik:RadAjaxManager ID="AjaxManager" runat="server">
                <ajaxsettings>
        <telerik:AjaxSetting AjaxControlID="Grid1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="Grid1" />
                <telerik:AjaxUpdatedControl ControlID="ToolTipManager1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
         <telerik:AjaxSetting AjaxControlID="Button1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="Grid1" />
                <telerik:AjaxUpdatedControl ControlID="ToolTipManager1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </ajaxsettings>
            </telerik:RadAjaxManager>
            <div style="display: none;">
                <telerik:RadToolTipManager ID="ToolTipManager1" runat="server" Width="250px" Skin="Telerik"
                    Position="BottomCenter" HideEvent="LeaveToolTip" OnClientBeforeShow="toolTipManagerClientBeforeShow" />
                <telerik:RadXmlHttpPanel ID="XmlHttpPanel1" runat="server" OnServiceRequest="XmlHttpPanel1_ServiceRequest">
                    <asp:Label ID="Label1" runat="server" CssClass="tooltip"></asp:Label>
                </telerik:RadXmlHttpPanel>
            </div>
            <telerik:RadGrid ID="Grid1" runat="server" AutoGenerateColumns="False" Skin="Vista"
                GridLines="None" BorderWidth="0px" OnItemDataBound="Grid1_ItemDataBound" Width="300">
                <mastertableview>
                            <Columns>
                                <telerik:GridBoundColumn DataField="Title" HeaderText="Title"/>
                                <telerik:GridTemplateColumn HeaderText="Child" UniqueName="Child">
                                    <ItemTemplate>
                                        <nobr>
                                            <asp:Repeater ID="Repeater1" runat="server" DataSource='<%# ((DataRowView)Container.DataItem).Row.GetChildRows("Children") %>'>
                                                <ItemTemplate><asp:Label ID="LabelName" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "[\"Name\"]")%>' />
                                                </ItemTemplate>
                                                <SeparatorTemplate>,</SeparatorTemplate>
                                            </asp:Repeater>
                                        <nobr>
                                    </ItemTemplate>
                                    <HeaderStyle Width="150px" />
                                    <ItemStyle VerticalAlign="Top" Width="150px" />
                                </telerik:GridTemplateColumn>
                            </Columns>
                        </mastertableview>
            </telerik:RadGrid>
            <asp:Button ID="Button1" runat="server" Text="Next Set" OnClick="Button1_Click" /> 
        </div>
    </form>
</body>
</html>


using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Telerik.Web.UI;
  
namespace RadControlsWebApplication1
{
    public partial class Tooltip : System.Web.UI.Page
    {
        private void BindData(int startIndex)
        {
            DataSet ds = new DataSet();
            DataTable tb = new DataTable();
            tb.TableName = "Parent";
            tb.Columns.Add("ID");
            tb.Columns.Add("Title");
            ds.Tables.Add(tb);
  
            DataTable tbChild = new DataTable();
            tbChild.TableName = "Child";
            tbChild.Columns.Add("ID");
            tbChild.Columns.Add("Name");
            ds.Tables.Add(tbChild);
  
            ds.Relations.Add("Children", ds.Tables["Parent"].Columns["ID"], ds.Tables["Child"].Columns["ID"]);
  
            for (int i = startIndex; i < startIndex + 10; i++)
            {
                DataRow row = tb.NewRow();
                row["ID"] = i;
                row["Title"] = "Title " + startIndex;
                tb.Rows.Add(row);
  
                for (int x = 0; x < 3; x++)
                {
                    DataRow rowChild = tbChild.NewRow();
                    rowChild["ID"] = i;
                    rowChild["Name"] = "Name " + i + " " + x;
                    tbChild.Rows.Add(rowChild);
                }
            }
  
            Grid1.DataSource = ds;
            Grid1.DataBind();
        }
  
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BindData(0);
                ViewState["Index"] = 10;
            }
        }
  
        protected void Button1_Click(object sender, EventArgs e)
        {
            BindData(int.Parse(ViewState["Index"].ToString()));
            ViewState["Index"] = int.Parse(ViewState["Index"].ToString()) + 10;
        }
  
        protected void XmlHttpPanel1_ServiceRequest(object sender, Telerik.Web.UI.RadXmlHttpPanelEventArgs e)
        {
            if (e.Value != null && e.Value != "")
                Label1.Text = e.Value;
        }
  
        protected void Grid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
        {
            if (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem)
            {
                Repeater rpt1 = (Repeater)e.Item.FindControl("Repeater1");
                RepeaterItemDataBound(rpt1);
            }
        }
  
        private void RepeaterItemDataBound(Repeater repeater)
        {
            foreach (RepeaterItem rptItem in repeater.Items)
            {
                Label lblName = (Label)rptItem.FindControl("LabelName");
                ToolTipManager1.TargetControls.Add(lblName.ClientID, lblName.Text, true);
            }
        }
    }
}
Svetlina Anati
Telerik team
 answered on 09 Dec 2010
8 answers
91 views
Hi,

I'm trying to create a page with TabStrip+Multipage+PanelBar+TextBox but it isn't work.
Somebody can help me?

Following my code:

Imports Telerik.Web.UI
 
Partial Public Class _Default
    Inherits System.Web.UI.Page
 
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
 
        'Multipage
        Dim myMultipage As New RadMultiPage
        myMultipage.ID = "myMultipage"
        myMultipage.ScrollBars = MultiPageScrollBars.Auto
 
        'Tabs
        Dim tabProduto As New RadTab
        tabProduto.Text = "Produtos"
        tabProduto.PageViewID = tabProduto.Text
        Dim tabCliente As New RadTab
        tabCliente.Text = "Clientes"
        tabCliente.PageViewID = tabCliente.Text
        Dim tabCondPag As New RadTab
        tabCondPag.Text = "Condições de Pagamento"
        tabCondPag.PageViewID = tabCondPag.Text
        Dim tabfornecedor As New RadTab
        tabfornecedor.Text = "Fornecedores"
        tabfornecedor.PageViewID = tabfornecedor.Text
 
        'TabStrip
        Dim myTabStrip As New RadTabStrip
        myTabStrip.MultiPageID = "myMultipage"
        myTabStrip.Tabs.Add(tabProduto)
        myTabStrip.Tabs.Add(tabCliente)
        myTabStrip.Tabs.Add(tabCondPag)
        myTabStrip.Tabs.Add(tabfornecedor)
 
        'PageView
        Dim pagviewProduto As New RadPageView
        pagviewProduto.ID = tabProduto.Text
        Dim pagviewCliente As New RadPageView
        pagviewCliente.ID = tabCliente.Text
        Dim pagviewCondPag As New RadPageView
        pagviewCondPag.ID = tabCondPag.Text
        Dim pagviewFornecedor As New RadPageView
        pagviewFornecedor.ID = tabfornecedor.Text
 
        'Controles da TabCliente (My classes inherited from Textboxes)
        Dim myTextBox As New gInputText("Nome", 80)
        Dim myTextBox2 As New gInputText("Endereço", 80)
        Dim myTextBox3 As New gInputText("Bairro", 50)
        Dim myTextBox4 As New gInputText("Cidade", 50)
 
        'Painel Principal da aba TabCliente
        Dim myGroupParent As New RadPanelBar
        myGroupParent.Width = 900
        myGroupParent.ExpandMode = PanelBarExpandMode.FullExpandedItem
        myGroupParent.Skin = "Office2007"
 
        'Grupo Dados Gerais do cliente
        Dim myGroup As New RadPanelItem
        myGroup.Expanded = True
        myGroup.Text = "Dados Gerais do Cliente"
        myGroup.Selected = True
        myGroup.Controls.Add(myTextBox)
        myGroup.Controls.Add(myTextBox2)
        myGroup.Controls.Add(myTextBox3)
        myGroup.Controls.Add(myTextBox4)
        myGroupParent.Items.Add(myGroup)
 
        tabCliente.Controls.Add(myGroupParent)
        Panel1.Controls.Add(myTabStrip)
 
    End Sub
 
End Class

Tks

Luiz
Luiz
Top achievements
Rank 1
 answered on 09 Dec 2010
1 answer
80 views
Hi,

If the cancel button of  the AdvancedForm of Scheduler is clicked, I need to wait for some seconds.
I'd like to close the AdvancedForm immediately after i clicked the cancel button.
How could i do that?

Thanks in advance.

Regards,
Nyi Nyi
Veronica
Telerik team
 answered on 09 Dec 2010
1 answer
116 views
Hi,

I have been using Telerik grid with UseStaticHeaders="true", which is used to enable static headers in the grid. But if change the page size from 10 to 50, then my grid is getting the data from database and loading into grid. so in that case, when i scroll the horizontal scroll bar then the headers are getting freezed, but datagrid rows are scrolling.
when i scroll from left to right, the header bar is getting freezed but rows are getting scrolling.

Please let me know the best solution to resolve this error.

Thanks in advance.
Pavlina
Telerik team
 answered on 09 Dec 2010
1 answer
114 views

Hello Telerik Team,

I have a requirement to make the Rad Scheduler.
Here i want to open a Rad Window for the Particular Schedule/Task Click. 

When user double clicks on any Schedule/Task i need to open the Details of the Schedule/Task in the Rad window which is already created with whole code. I just need to pass the 4 Values to that Rad Window.

Kindly let me know the way i need to do to achive this functionality.


Thank you

Brijesh Shah

Veronica
Telerik team
 answered on 09 Dec 2010
3 answers
53 views
We have recently upgrade to the new version of the telerik.Web.UI control (2010.2.713.35) from the old version (2009).
However, once we open the table property page, it throws the error message "The ToolName property must be set!

Below is the piece of the code, we make the content editor with the EditorTools.
  EditorTool tool = new EditorTool(ep.FunctionName);
  toolGroup.Tools.Add(tool):

The rest Editor tool works fine such like Hyberlink manager, image manager ect.

In addition, we try to assign the tool.Name at code level, unlucky, it will still throw the same error.


                            EditorTool tool = new EditorTool(myEP.FunctionName);
                            toolGroup.Tools.Add(tool);
                            EditorTool tool = new EditorTool(myEP.FunctionName);
                            toolGroup.Tools.Add(tool);
                            EditorTool tool = new EditorTool(myEP.FunctionName);
                            toolGroup.Tools.Add(tool);
                            EditorTool tool = new EditorTool(myEP.FunctionName);
                            toolGroup.Tools.Add(tool);
                            EditorTool tool = new EditorTool(myEP.FunctionName);
                            toolGroup.Tools.Add(tool);

                            EditorTool tool = new EditorTool(myEP.FunctionName);
                            toolGroup.Tools.Add(tool);
                            EditorTool tool = new EditorTool(myEP.FunctionName);
                            toolGroup.Tools.Add(tool);

Rumen
Telerik team
 answered on 09 Dec 2010
1 answer
56 views
Hi,
in my web page I have a RadGrid that uses the property UseStaticHeaders set to true. If I reload the page the grid's columns change their width and I see a movement. How can I avoid this without removing UseStaticHeaders = true?
Iana Tsolova
Telerik team
 answered on 09 Dec 2010
4 answers
224 views
I have been using VS2010 Beta 2, and have just downloaded the trial of 2009 Q3 Asp.Net Rad Controls, but when I go the design view of webpage I get the "Error Creating Control" on all of the Rad Controls, however using the code behind page I can access the Telerik.Web.UI no problems.

When in the Web Page Source code mode, i get the following on all Telerik tags: Unrecognized tag prefix or device filter.  The type of code is below.
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
    </telerik:RadAjaxManager> 

I have checked the web.config and all look OK:
            <controls> 
                <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>  
                <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>  
                <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI"/>  
            </controls> 

However the website Run OK on execution?

Any ideas?
Martin
Top achievements
Rank 1
 answered on 09 Dec 2010
3 answers
285 views
Hi everyone,

Please help me to enable ajax for telerik:RadGrid (assembly="Telerik.Web.UI")

I'm using EnableAjaxSkinRendering="True" but ajax does not work.

Thanks in advance

  <telerik:RadGrid ID="_radGridListInfulfillmentOrder" runat="server" Skin="" AutoGenerateColumns="false"
            AllowSorting="true" OnNeedDataSource="RadGridListInfulfillmentOrderNeedDataSource"
            OnItemCommand="RadGridListInfulfillmentOrderItemCommand" EnableAjaxSkinRendering="True">
            <MasterTableView DataKeyNames="OrderID" EditMode="PopUp" ShowHeader="true" GridLines="None"
                CommandItemDisplay="None" NoMasterRecordsText="No data" CommandItemSettings-AddNewRecordText="List In-fulfillment Order"
                AllowNaturalSort="false">
                <Columns>
                    <telerik:GridTemplateColumn UniqueName="MyCustomTemplateColumn" ShowSortIcon="false">
                        <HeaderTemplate>
                            <table id='neworderlist' cellspacing='0'>
                                <tr>
           
  <telerik:RadGrid ID="_radGridListInfulfillmentOrder" runat="server" Skin="" AutoGenerateColumns="false"
            AllowSorting="true" OnNeedDataSource="RadGridListInfulfillmentOrderNeedDataSource"
            OnItemCommand="RadGridListInfulfillmentOrderItemCommand" EnableAjaxSkinRendering="True">
            <MasterTableView DataKeyNames="OrderID" EditMode="PopUp" ShowHeader="true" GridLines="None"
                CommandItemDisplay="None" NoMasterRecordsText="No data" CommandItemSettings-AddNewRecordText="List In-fulfillment Order"
                AllowNaturalSort="false">
                <Columns>
                    <telerik:GridTemplateColumn UniqueName="MyCustomTemplateColumn" ShowSortIcon="false">
                        <HeaderTemplate>
                            <table id='neworderlist' cellspacing='0'>
                                <tr>
           
  <telerik:RadGrid ID="_radGridListInfulfillmentOrder" runat="server" Skin="" AutoGenerateColumns="false"
            AllowSorting="true" OnNeedDataSource="RadGridListInfulfillmentOrderNeedDataSource"
            OnItemCommand="RadGridListInfulfillmentOrderItemCommand" EnableAjaxSkinRendering="True">
            <MasterTableView DataKeyNames="OrderID" EditMode="PopUp" ShowHeader="true" GridLines="None"
                CommandItemDisplay="None" NoMasterRecordsText="No data" CommandItemSettings-AddNewRecordText="List In-fulfillment Order"
                AllowNaturalSort="false">
                <Columns>
                    <telerik:GridTemplateColumn UniqueName="MyCustomTemplateColumn" ShowSortIcon="false">
                        <HeaderTemplate>
                            <table id='neworderlist' cellspacing='0'>
                                <tr>
           
  <telerik:RadGrid ID="_radGridListInfulfillmentOrder" runat="server" Skin="" AutoGenerateColumns="false"
            AllowSorting="true" OnNeedDataSource="RadGridListInfulfillmentOrderNeedDataSource"
            OnItemCommand="RadGridListInfulfillmentOrderItemCommand" EnableAjaxSkinRendering="True">
            <MasterTableView DataKeyNames="OrderID" EditMode="PopUp" ShowHeader="true" GridLines="None"
                CommandItemDisplay="None" NoMasterRecordsText="No data" CommandItemSettings-AddNewRecordText="List In-fulfillment Order"
                AllowNaturalSort="false">
                <Columns>
                    <telerik:GridTemplateColumn UniqueName="MyCustomTemplateColumn" ShowSortIcon="false">
                        <HeaderTemplate>
                            <table id='neworderlist' cellspacing='0'>
                            
Maria Ilieva
Telerik team
 answered on 09 Dec 2010
1 answer
52 views
I have started getting occasional errors logged from our web server.

It looks like a specific user, and possibly only some of the time.  If it happens AJAX won't work on our site (I imagine), which would make using it quite difficult .  There are maybe 200 users, who are usually on all day, but no-one has complained (yet).

This is error, logged from our default error page.  The end of the axd decoration has obviously got corrupted with some javascript.
Why does the same corrupt filename get referenced time and again ?  Has the browser cached it ?

The page you requested cannot be found.

Request RawUrl = /SeaPlanner/ScriptResource.axd?d=MZN8mrjHFHeJS_HFuw_hoFXoRri86JQ_-n6xsd10tRLAuzBPjqE1NaoSazV5LzG-X6cWyuwm-ikDSRGesWeS0t8fMPuiMKYEafpSBgnMVfaRuzktBack('ctl00$mnuMain','Log%20Off')

Referrer http://.../Seaplanner/default.aspx

UserHostAddress 81.132.73.121

UserHostName 81.132.73.121

12/2/2010 11:54:54 AM,

System.Web.Extensions,

This is an invalid script resource request.,

 

   at System.Web.Handlers.ScriptResourceHandler.ProcessRequest(HttpContext context)

   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

HTTP_USER_AGENT:Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)

The uncorrupted axd file starts thusly:
// Name:        MicrosoftAjaxWebForms.debug.js
// Assembly:    System.Web.Extensions
// Version:     3.5.0.0
// FileVersion: 3.5.30729.3644
//-----------------------------------------------------------------------
// Copyright (C) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------
// MicrosoftAjaxWebForms.js
// Microsoft AJAX ASP.NET WebForms Framework.

Any ideas ????
Iana Tsolova
Telerik team
 answered on 09 Dec 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?