Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
180 views
I have RadGrid where I dynamically add an edit button to each row that opens a tooltip which in turn loads a usercontrol.  When I click on the edit link in the datagrid, it opens up the tooltip however the values in the edit form are always the first row selected. The tooltip only shows the data for the first row that I click on regardless of whcih row I click.

When I run it through with debugging, the tbEmailTempName.Text show to have the correct values but they are not appearing in the tooltip loaded screen. Very confused as to why it appears like all the values are coming through but the screen is not showing the updated data.

Below is some of the codes to help explain the issue.

My usercontrol that loads in the ToolTipManager
 Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load  
 
        If Session("EmailTempOID").ToString <> "" Then  
            Dim dsEmailTemp As New DataSet  
            dsEmailTemp = [ClientEmailTemplates].GetEmailTempById(Session("EmailTempOID").ToString)  
            tbEmailTempName.Text = dsEmailTemp.Tables(0).Rows(0).Item(1).ToString  
            reEmailTemplateBody.Content = dsEmailTemp.Tables(0).Rows(0).Item(2).ToString  
        Else  
            tbEmailTempName.Text = "" 
            reEmailTemplateBody.Content = "" 
        End If  
    End Sub 


Page with the RadGrid-codebehind
 Protected Sub OnAjaxUpdate(ByVal sender As Object, ByVal args As ToolTipUpdateEventArgs)  
        Dim index As Integer = args.TargetControlID.LastIndexOf("_")  
        Dim elementID As String = args.TargetControlID.Substring(index + 1)  
        Session("EmailTempOID") = elementID  
        Me.UpdateToolTip(elementID, args.UpdatePanel)  
    End Sub  
    Private Sub UpdateToolTip(ByVal elementID As String, ByVal panel As UpdatePanel)  
        Dim ctrl As Control = Page.LoadControl("UserControls/AddTemplate.ascx")  
        panel.ContentTemplateContainer.Controls.Add(ctrl)  
    End Sub 

Any help would be greatly appreciated.

Anthony
Top achievements
Rank 1
 answered on 27 Feb 2008
5 answers
243 views
on trawling the forums i found this thread:
http://www.telerik.com/community/forums/thread/b311D-hmmtm.aspx

which suggested an onload opener was coming for radtooltip prometheus. as far as i can tell, this has not been implemented so i was wondering if there were any alternatives to get a radtooltip to appear when a page was opened. (i want to use it as a less obtrusive confirmation message after a particular action than, say, a javascript alert).

i thought something like this would do the trick:
    <script type="text/javascript">
    //<!--
    var tooltip = $find("<%= RadToolTip1.ClientID %>");
    tooltip.show();
    //-->
    </script>

but it does not and produces a javascript null error (and the syntax on the demo page produces a javascript "object expected" error ). if it makes any difference, my tooltip is on a master page.

any ideas? also, any plans to port the asp.net scroller to prometheus?

thanks,
rob
rdochert
Top achievements
Rank 1
 answered on 27 Feb 2008
1 answer
107 views
I'm running into an issue where my numeric textbox is posting back when I set focus on it with javascript.

I have a popup panel that calls a script which sets focus to the numeric textbox when it is shown.  The script below is what is getting called when the panel is shown.  The GetVerifyClientID is a function in the codebehind which grabs the ClientID of the Numeric Textbox.  This works fine if I swap out for a standard asp textbox. 

<script type='text/javascript' >function SetVerifyFocus(){$get('<%=GetVerifyClientID() %>').focus();}</script> 
 

If I modify the script above to the following, it seems to pop up the telerik control's name just fine...

<script type='text/javascript' >function SetVerifyFocus(){alert('<%=GetVerifyClientID() %>');}</script> 

For whatever reason, when I allow the top function to be called, the page posts back again.  I'm unsure of what to turn off on the telerik control so that it doesn't post back when focus is set to it.  I need it to be able to post back afterward so the user can hit enter after putting in a value (I have this functionality currently, I just don't want to lose it).

Also, if I view source on the page, the script seems to be getting created with the correct control ID.

Thanks in advance for any help!

Robert
Robert
Top achievements
Rank 1
 answered on 27 Feb 2008
1 answer
116 views
I have a RadTreeView which is using TreeNodeExpandMode.ServerSideCallBack.

When a node is clicked, I want to expand the node (if not already), and send an AJAX event to the server. I captured the client OnClientNodeClicking and do an AJAX:

function OnClientNodeClicking(sender, args)
{
 var node = args.get_node();
 // If the tree is not expanded, then expand it now
 if (node.get_expanded() == false)
 {
  node.toggle();
 }
 else
 {
  var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");
  ajaxManager.ajaxRequest("test");
 }
}


but I do not know how to tell the tree control to expand (toggle) the tree node, AND send up a AJAX request. It seems to "step on" the AJAX request that actually fills the dropdown if I do the ajaxRequest AND call node.toggle.

Any idea how I can expand the node AND fire an AJAX event?

Thanks
Nikolay
Telerik team
 answered on 27 Feb 2008
1 answer
83 views
It causes a javascript error in the new browser window that is used for printing. 

'RadTabStrip' is undefined.

code line is:
window["ctl00_CHP_tab1"] = new RadTabStrip("ctl00_CHP_tab1");


Unfortunately, you have to stop the project because you can't get Visual Studio past this script error.
George
Telerik team
 answered on 27 Feb 2008
1 answer
119 views

Hi,

I would like to use a javascript function to initialize some controls (a number of RadComboBoxes and a RadTreeView) with cached reference data values on the client - I have tried using the RadAjaxPanel's ResponseScripts property to call my initialize function however the problem I am encountering is that the initialize function is called before the controls have been created via a number of:

 Sys.Application.add_init(function() { $create(Telerik.Web.UI.RadComboBox,{....;
 etc
 
My question - is there any method whereby I can ensure that my initialize function call will be added as the last piece of script to the page so that when it is called all the telerik components will have been created.

Regards, MPC.

Vlad
Telerik team
 answered on 27 Feb 2008
1 answer
128 views
I am working on a sytem that requires logging of a user's actions.  I need to be able to make an ajax call that will post a value into my audit table.  What is the best approach for this?

I am using a TreeView and I have set the OnClientNodeClicked code to this:

function AfterClientClickHandler(treeView, args)  
{  
    var oNode = args.get_node();  
    var attributes = oNode.get_attributes();  
      
    if (attributes.getAttribute("Level") == "Item")  
    {  
        bIndexGridPop = false;  
        bAssociatedGridPop = false;  
        bAuditGridPop = false;  
        ViewSelectedItem(attributes);  
        myViewer.OpenUrl(attributes.getAttribute("ItemPath"));  
        myThumb.OpenUrl(attributes.getAttribute("ItemPath"));  
        iCurrentPage = -1;  
    }  
    else  
    {  
    }  
} 

I have tried using the AjaxRequest and AjaxRequestWithTarget functions but that does not seem to be the solution thus far.

I cannot post my project as it is rather large and has quite a few dependencies.

TIA

Seth
Vlad
Telerik team
 answered on 27 Feb 2008
1 answer
166 views
Hi all,

I have radgrid with the Add New Row and Refresh buttons and images above the radgrid.  I think I am getting these buttons because I am using the skin=WebBlue.

My question is, how do I remove these from my page?  I cannot find any property that applies.

Thanks,
Bob
Vlad
Telerik team
 answered on 27 Feb 2008
4 answers
912 views
Trying to run the Prometheus demo, Visual Studio 2008.

I'm getting this error:

Could not load file or assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

I've found System.Web.Extensions at:

C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\

If I the file (and System.Web.Extensions.Design.dll which I know I also need) to \bin\ then I get this error:

Could not load file or assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

What am I doing wrong? Am I getting my files from the wrong spot?

I thought when using Visual Studio 2008 everything (Ajax.net) was included and you didn't need to download anything extra.
BradleyDean
Top achievements
Rank 1
 answered on 27 Feb 2008
2 answers
270 views
'Sys.WebForms.PageRequestManager' is null or not an object

Sys.WebForms has no properties  
set_uniqueID("RadAjaxManager1")ScriptResource.ax... (line 124)  
Sys$Component$_setProperties(Object _element=span#RadAjaxManager1 _clientEvents=Object, Object ajaxSettings=[1] clientEvents=Object)ScriptResource.ax... (line 2776)  
Sys$Component$create(function(), Object ajaxSettings=[1] clientEvents=Object, null, null, span#RadAjaxManager1)ScriptResource.ax... (line 2837)  
(no name)()events.aspx (line 319)  
_handler(Object _disposableObjects=[1] _components=Object, Object)ScriptResource.ax... (line 2503)  
Sys$_Application$_doInitialize()ScriptResource.ax... (line 3792)  
(no name)()ScriptResource.ax... (line 50)  
[Break on this error] window[Sys.WebForms.PageRequestManager.getInstance()._uniqueIDToClientID(this._u... 

The Scheduler works fine on  the local machine. when i deploy the code on our test server, i get the above error, however the page is loaded, but none of the onclick functions work.

i have also installed the AJAX extensions on the test server, i see the System.Web.Extensions.dll in the C:\Windows\assembly folder.

Please advise if i am missing something here. (here is the code)
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="events.aspx.cs" Inherits="events" %> 
 
<%@ 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">  
    <title>Events Calendar</title> 
</head> 
<body style="margin:0px;padding:0px;">  
    <form id="form1" runat="server" style="margin:0px;padding:0px;">  
        <asp:ScriptManager ID="ScriptManager" runat="server" /> 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="RadScheduler1">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManager> 
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Transparency="30" BackColor="#E0E0E0" InitialDelayTime="500">  
            <asp:Image ID="Image1" Style="margin-top: 200px" runat="server" ImageUrl="images/loading7.gif" 
                BorderWidth="0px" AlternateText="Loading"></asp:Image> 
        </telerik:RadAjaxLoadingPanel>          
        <telerik:RadScheduler runat="server" ID="RadScheduler1" OverflowBehavior="Expand" ShowFooter="false"     
            Width="750px" Skin="Default" EnableEmbeddedSkins="True" TimeZoneOffset="03:00:00" 
            SelectedDate="2008-02-29" DayStartTime="08:00:00" DayEndTime="18:00:00" 
            OnDataBound="RadScheduler1_DataBound" > 
        </telerik:RadScheduler>     
    </form> 
</body> 
</html> 
 

Tanuj
Top achievements
Rank 1
 answered on 27 Feb 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?