Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
197 views
Still new to discovering the possibilities...:-)
I have a RadTextbox1 in an asp:panel which on first page load is set to invisible.
I have an image button that initiates a radmanager ajex request to update the panel, server behind code switches the visibility of the panel on, then  :-

RadAjaxManager1.FocusControl(RadTextBox1.ClientID);


The screen does a couple of flickers but the focus is still on the image button, not the text box.

Am i missing something here?

Kevin.
Sebastian
Telerik team
 answered on 27 Feb 2008
4 answers
212 views
Hello,

I am having a strange issue.  I have used the LoadOnDemand example as a base to create a simple user control that loads when I hover over a grid element.  The issue I have is that if I try and set the .Text property of a TextBox it does not work after the first instance.  However if I change the TextBox to a Label then it works on each instance???  What could be the issue?

You can change the LoadOnDemand to show the ProductID in a TextBox and duplicate the issue.

Any help would be great.

Thanks,
David
Anthony
Top achievements
Rank 1
 answered on 27 Feb 2008
1 answer
177 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
234 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
105 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
115 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
82 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
116 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
125 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
162 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?