Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
308 views

I have been trying to get a RadWindow I have defined on my page to open via a javascript script block I register as part of a button postback.  (see code below).  My page lives inside of a master page, so I don't know if that has an impact or not, but when I execute the following line:

var oWnd = $find("rwRegisterCardPopup");

my oWnd is null. 

.aspx code
-------------------------
<script type="text/javascript">

<!--

function CallbackFunction_rwRegisterCardPopup(win, val)

{

var hfReturn = document.getElementById('<%= hfRegisterWindowCallback.ClientID %>');

var btn = document.getElementById('<%= btnRegisterWindowCallback.ClientId %>');

hfReturn.value = val;

btn.click();

}

function OpenPopUp_rwRegisterCardPopup(ProductId, SupplierId, Discount)

{

var oWin = $find("rwRegisterCardPopup");

if (oWin == null)

{

alert(

'Error: oWin == null is true (method1)'); //this always shows as oWin is null

oWin = $find(

"<%=rwRegisterCardPopup.ClientID%>");

}

if (oWin == null)

alert(

'Error: oWin == null is true (method2)'); //this always shows as oWin is null

else

{

var url = oWin.get_navigateUrl();

url = url +

"?GLSCProductId=" + ProductId + "&GLSCSupplierId=" + SupplierId + "&Discount=" + Discount;

oWin.setUrl(url);

oWin.show();

oWin.center();

}

}

-->

</script>

<telerik:RadWindow ID="rwRegisterCardPopup" runat="server" Title="New Reloadable Card Registration" Modal="true" Height="600px" Width="400px" Skin="WebBlue" Behaviors="Move" VisibleStatusbar="false" ClientCallBackFunction="CallbackFunction_rwRegisterCardPopup" NavigateUrl="~/orderscrip/register_card.aspx" >

</telerik:RadWindow>

.....


here's my code behind for the button that registers the Client Script Block

Private Sub ShowRegisterCardPopup(ByVal GLSCProductId As String, ByVal GLSCSupplierId As String, ByVal Discount As Decimal)

Dim java As String = "<script>alert('calling OpenPopUp_rwRegisterCardPopup()'); OpenPopUp_rwRegisterCardPopup('{0}', '{1}', '{2}');</" & "script>"

Me.ClientScript.RegisterStartupScript(Me.GetType(), "ShowRegisterCardPopup", String.Format(java, GLSCProductId, GLSCSupplierId, Discount))

End Sub

The Sub is the only code called by the button's Click handler.


My page inherits the Asp.net AJAX ScriptManager from the master page.

I tried adding the RadWindowManger and using the radopen method as well, but had no improvement with the results. 

Please advise.

thanks,
Paul

Svetlina Anati
Telerik team
 answered on 01 May 2008
1 answer
124 views
In RadTreeView "Classic" we are using the BeforeClientHighlight event to cancel a node highlight if we are currently in the process of an Ajax update. We allow drag and drop to a table that is within an Ajax panel, and if the user has dragged-and-dropped and that panel is still refreshing we don't want the user to drag something else. Not only that, we don't want the user to be able to highlight a node AS IF they could drag it.

The "Migrating from RADTreeView for ASP.NET to ASP.NET AJAX" page says that BeforeClientHighlight has been replaced with OnClientNodeHighlighting; however I don't see that event in Intellisense and it is not listed in the Client-Side Programming section of the help doc.

Does it exist? And if not, is there an alternative?

Thank you,
Terry
Nikolay
Telerik team
 answered on 01 May 2008
1 answer
195 views

Suppose you want to bind a grid for asp.net in a user control to an ObjectDatasource. 
It is a problem if the subroutine for the SelectMethod of the ObjectDatasource has a parameter whose value depends on user context or on a value in another control on the user control.

You cannot get this parameter value in the code-behind of the user control.  For example, the subroutine for the SelectMethod could be in the code-behind of the user control.
BUT it will not work.  Because the ObjectDatasource activates this subroutine before there is any user context or any viewstate available in the user control.
So you cannot get the parameter value this way.

I solved the problem by:

1. Defining a label control (lblSCS_ID in this case ) in the user control that will be the source of the parameter value

      <asp:ObjectDataSource ID="ObjDataSourceGetPGC2forSCS_ID" runat="server" TypeName="BalancedFlow.Library.Manager.SCSManager"
       SelectMethod="GetPGC2forSCS" EnablePaging="false">
      
       <SelectParameters>
        <asp:ControlParameter Name="SCS_ID" ControlID="lblSCS_ID" PropertyName="Text" />
       </SelectParameters>

2. In the OnPreRender of the code-behind of the user control I set the value of the parameter.

 lblSCS_ID.Text = UserContext.Session.ScsId.Value.ToString();

Now when the ObjectDatasource activates the SelectMethod it will get the parameter value from lblSCS_ID.Text (The parametervalue will already be there).

Yavor
Telerik team
 answered on 01 May 2008
1 answer
107 views
I am using the RadControls for ASP.NET AJAX 2008 Q1 release. Testing using IE 7 on Windows XP.

When the RadEditor loads or is resized, the page jumps back to the top.  Does anyone know what's causing this and how to prevent it?

Thank you,

Baz
Rumen
Telerik team
 answered on 01 May 2008
1 answer
123 views
When using some skins, the image sizes appear to be incorrect.  You can see the edge of a different button on the right side.  For example, on http://www.telerik.com/demos/aspnet/prometheus/Editor/Examples/Skinning/DefaultCS.aspx change to the Web20 skin and look at the Table toolbar.  This problem is on other skins and other toolbars also.

Mark
Rumen
Telerik team
 answered on 01 May 2008
2 answers
190 views

hi,

i have generate a calender dynamically &
i want give tooltip to all the date display in Calender .
the text in the tooltip is also display dynamically...

for that i use radtooltipmanager but it give error like
"can not find Server Control with ID="0-0" .if you need to specify a clientSide element please set  isClientID  to true

the ID="0-0" is calender date ID
& if i set isClientID=true .Radttoltipmanager not fire onAjaxUpdate  function

shah
Top achievements
Rank 1
 answered on 01 May 2008
1 answer
186 views
Hello,

I think there is a bug in the radComboBox because it is always showing horizontal scrollbars.

Even thow the DropDownWidth is wider than the items content, the horizontal scrollbar is still showing and it should not.

Please advise.

Here is a quick example:

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %> 
 
<%@ 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>Untitled Page</title> 
</head> 
 
<body> 
    <form id="form1" runat="server"> 
    <div> 
        <asp:ScriptManager ID="ScriptManager1" runat="server"> 
        </asp:ScriptManager> 
<telerik:RadComboBox ID="RadComboBox1" runat="server" DropDownWidth="300px" Height="150"> 
<Items><telerik:RadComboBoxItem Text="asdasdas das d asd as d as d as d asdasd as d" Value="" /><telerik:RadComboBoxItem Text="asdasdas das d asd as d as d as d asdasd as d" Value="" /><telerik:RadComboBoxItem Text="asdasdas das d asd as d as d as d asdasd as d" Value="" /><telerik:RadComboBoxItem Text="asdasdas das d asd as d as d as d asdasd as d" Value="" /><telerik:RadComboBoxItem Text="asdasdas das d asd as d as d as d asdasd as d" Value="" /><telerik:RadComboBoxItem Text="asdasdas das d asd as d as d as d asdasd as d" Value="" /><telerik:RadComboBoxItem Text="asdasdas das d asd as d as d as d asdasd as d" Value="" /><telerik:RadComboBoxItem Text="asdasdas das d asd as d as d as d asdasd as d" Value="" /><telerik:RadComboBoxItem Text="asdasdas das d asd as d as d as d asdasd as d" Value="" /><telerik:RadComboBoxItem Text="asdasdas das d asd as d as d as d asdasd as d" Value="" /><telerik:RadComboBoxItem Text="asdasdas das d asd as d as d as d asdasd as d" Value="" /><telerik:RadComboBoxItem Text="asdasdas das d asd as d as d as d asdasd as d" Value="" /><telerik:RadComboBoxItem Text="asdasdas das d asd as d as d as d asdasd as d" Value="" /><telerik:RadComboBoxItem Text="asdasdas das d asd as d as d as d asdasd as d" Value="" /><telerik:RadComboBoxItem Text="asdasdas das d asd as d as d as d asdasd as d" Value="" /><telerik:RadComboBoxItem Text="asdasdas das d asd as d as d as d asdasd as d" Value="" /><telerik:RadComboBoxItem Text="asdasdas das d asd as d as d as d asdasd as d" Value="" /><telerik:RadComboBoxItem Text="asdasdas das d asd as d as d as d asdasd as d" Value="" /><telerik:RadComboBoxItem Text="asdasdas das d asd as d as d as d asdasd as d" Value="" /><telerik:RadComboBoxItem Text="asdasdas das d asd as d as d as d asdasd as d" Value="" /><telerik:RadComboBoxItem Text="asdasdas das d asd as d as d as d asdasd as d" Value="" /></Items> 
</telerik:RadComboBox>     
    </div> 
    </form> 
</body> 
</html> 

Nikolay
Telerik team
 answered on 01 May 2008
1 answer
106 views
i am using rad editor vers. 6.1.0. I have a problem.. Problem is ;

I want to write 'url' in iframe tag. First I write
<iframe src="http://www.test.com" width="100%"></iframe>

this work correctly.

But when I want to edit this editor change this url to "/http://www.test.com"

it put a " / " beginning of url.. How can I fix this ?

thanks
Oguz.
Rumen
Telerik team
 answered on 01 May 2008
1 answer
67 views
I have a webpage that has multiple tabs.  The contents of each tab are only loaded using AJAX when the tab is selected.  On page load the default tab is a list of thumbnail files that are dynamically generated as the tab is loaded.  These thumbnail images each are bound as targets a RadContextMenu which works perfectly fine on page_load().  However, if I navigate to another tab and then return to the thumbnails tab, when the thumbnail list is regenerated the RadContextMenu is no longer showing up on right click for the thumbnails.  The page itself is quite complex so a code sample isn't really possible but is this a known issue or is there something I have to do in the RadAjaxManager to allow for the RadContextMenu to be properly bound?  Thanks.

Christian
Konstantin Petkov
Telerik team
 answered on 01 May 2008
1 answer
249 views
Hi, All:

I am migrating to Q1-2008 asp.net ajax rad controls, from Q3-2008 rad controls.  I am upgrading RadChart controls.

Do I still need the RadControls/Chart/Intellisense/Image.aspx ?

I got this error:

Could not load type 'Telerik.WebControls.Dialogs.ChartImage'


Please give some ideas.
thanks.

Stanley
Giuseppe
Telerik team
 answered on 01 May 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?