Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
68 views
Hi,

I'm basing my question off of the example here:
http://www.telerik.com/help/aspnet-ajax/window-programming-calling-functions.html

The example has this nice and simple javascript function:

function CallFn()
{
  var oWnd = GetRadWindowManager().getWindowByName("RadWindow1");
  oWnd.get_contentFrame().contentWindow.CalledFn();
}   


What I would like is to make the function that gets called a parameter like this (which of course won't work, but that's where you geniuses come in!)

function CallFn(WindowName,FunctionName)
{
  var oWnd = GetRadWindowManager().getWindowByName(WindowName);
  oWnd.get_contentFrame().contentWindow.FunctionName
}   

Help!
Thank you!
Marin Bratanov
Telerik team
 answered on 15 Sep 2011
1 answer
114 views

 

 

Hi,
I am using telerik grid. On delete an item i want to confirm delete from user. If i increase the Confirm Text more than below then the grid deletes the item without confirmation.Is there any fixed size for RadWindow message?

My code:-
<
telerik:GridButtonColumn ConfirmText="Instesd of using 'Delete', you can use the 'Sell' option and have 

the records stored in your 'Transaction History'. Do you still want to proceed with 'Delete'?Yes(OK) or No(Cancel)"

ConfirmDialogType="RadWindow" ConfirmTitle="Delete" ButtonType="ImageButton" 

 

CommandName="Delete" Text="Delete" ImageUrl="/images/ImgDelete.gif" UniqueName="DeleteColumn"

 

HeaderText="Delete">

 

Marin Bratanov
Telerik team
 answered on 15 Sep 2011
9 answers
122 views
Hi,
I am creating the sliding zone and sliding panes dynamically on a button click inside an update panel.
I will attach the code below.
The problem scenario:
1.Click on the postback button to create the controls
2.Controls are created.I pin the sliding pane created dynamically.
3.Then on clicking the postback button again,the width of the RadPane increases to the RadSlidingPaneWidth and on pinning the control goes back to the previous position.
NOTE: I cannot avoid using updatepanel as it is must for my application not to postback entire page on clicking the postback button.

Default.aspx:

<%

@ 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></title>

 

 

<style type="text/css">

 

 

</style>

 

 

</

 

head>

 

 

<

 

script type="text/javascript">

 

 

var postbackButtonClientID = "<%=HdnVCCommandBtn.ClientID%>";

 

 

 

function RequestForControl() {

 

 

 

debugger

 

 

var requestType = "Create Control";

 

 

 

var Arguments = requestType;

 

 

__doPostBack(postbackButtonClientID, Arguments);

 

}

</

 

script>

 

 

<

 

body>

 

 

<form id="form1" runat="server">

 

 

<asp:ScriptManager ID="ScriptManager1" runat="server">

 

 

</asp:ScriptManager>

 

 

<telerik:RadSplitter ID="RadSplitter1" runat="server" Height="300" Width="400">

 

 

<telerik:RadPane ID="MiddlePane" runat="server">

 

 

<input id="button" value="postback" onclick="javascript:RequestForControl();" type="button"/>

 

 

</telerik:RadPane>

 

 

<telerik:RadSplitBar ID="RadSplitBar2" runat="server" />

 

 

<telerik:RadPane ID="RightPane" Width="20px" runat="server" Height="98px">

 

 

<asp:UpdatePanel ID="VideoControlUpdatePanel" runat="server">

 

 

<ContentTemplate>

 

 

<asp:Panel ID="TestPanel" runat="server" BackColor="#898989" Height="100%" Width="100%">

 

 

<input id="HdnVCCommandBtn" runat="server" onclick="PostbackButton_Click" type="hidden" />

 

 

</asp:Panel>

 

 

</ContentTemplate>

 

 

</asp:UpdatePanel>

 

 

</telerik:RadPane>

 

 

</telerik:RadSplitter>

 

 

</form>

 

 

</

 

body>

 

 

</

 

html>

 

Default.aspx.cs:

using

 

System;

 

using

 

System.Collections.Generic;

 

using

 

System.Linq;

 

using

 

System.Web;

 

using

 

System.Web.UI;

 

using

 

System.Web.UI.WebControls;

 

using

 

Telerik.Web.UI;

 

public

 

partial class _Default : System.Web.UI.Page

 

 

{

 

 

protected void Page_Load(object sender, EventArgs e)

 

 

{

 

ClientScript.GetPostBackEventReference(

this, string.Empty);

 

 

}

 

 

protected override void OnInit(EventArgs e)

 

 

{

 

 

base.OnInit(e);

 

 

 

if (IsPostBack)

 

 

{

 

 

if (Request.Form.Get("__EVENTTARGET") == HdnVCCommandBtn.ClientID.Replace("_", "$"))

 

 

{

 

 

RadSlidingZone rightZone = new RadSlidingZone();

 

 

rightZone.ID =

"RightZone";

 

 

rightZone.SlideDirection = Telerik.Web.UI.

SplitterSlideDirection.Left;

 

 

rightZone.Width = RightPane.Width;

 

 

RadSlidingPane rightSlidingPane1 = new RadSlidingPane();

 

 

rightSlidingPane1.ID =

"RightSlidingPane1";

 

 

rightSlidingPane1.Title =

"Right1";

 

 

rightSlidingPane1.Width =

new Unit(150);

 

 

rightZone.Items.Add(rightSlidingPane1);

 

 

RadSlidingPane rightSlidingPane2 = new RadSlidingPane();

 

 

rightSlidingPane2.ID =

"RightSlidingPane2";

 

 

rightSlidingPane2.Title =

"Right2";

 

 

rightSlidingPane2.Width =

new Unit(150);

 

 

rightZone.Items.Add(rightSlidingPane2);

 

RightPane.Controls.Add(rightZone);

 

TestPanel.Controls.Add(rightZone);

 

}

 

}

 

}

 

 

protected void PostbackButton_Click(object sender, EventArgs e)

 

 

{

 

}

 

}

 

 


Please help me with this issue asap.

Thanks in advance.


Regards,
Bhavya

Bhavya
Top achievements
Rank 1
 answered on 15 Sep 2011
1 answer
175 views
I'm dynamically setting the height of a chart based on the number of rows I have in my data. This is working fine with the exception of a large area of white space above and below the bar chart.

Here is my chart:
<telerik:RadChart ID="MetricsRadChart" runat="server" AutoLayout="true" SeriesOrientation="Horizontal" Skin="GrayStripes" Width="922px">
     <Series>
          <telerik:ChartSeries Name="Series1" />
     </Series>
     <PlotArea>
          <Appearance Dimensions-Margins-Top="0" Dimensions-Margins-Bottom="0" />
          <EmptySeriesMessage TextBlock-Text="No data available for this chart." />
          <XAxis DataLabelsColumn="ln_fi" />
     </PlotArea>
     <Legend Visible="false" />
</telerik:RadChart>

This is the line of code setting the height:
MetricsRadChart.Appearance.Dimensions.Height = Telerik.Charting.Styles.Unit.Pixel(data.Rows.Count * 25);

How can I remove the extra space between the title & chart and all the white space below it?

Thanks!

Paul
Peshito
Telerik team
 answered on 15 Sep 2011
2 answers
219 views
Hi,

Please have a look at the attached image. I want to have double headers for Rad Grid. How can I do that?
Riz
Top achievements
Rank 1
 answered on 15 Sep 2011
4 answers
102 views
Hello,
I created a custom AJAX control and try to update values in InPlace edit mode. But each time I call masterView.updateItem() function, there is no updated data in the list of new values. I use ItemCommand method and parse values like this:
if (e.CommandName == Grid.UpdateCommandName)
            {
                GridEditableItem editItem = (GridEditableItem)e.Item;
                Hashtable newValues = new Hashtable();
                editItem.ExtractValues(newValues);
            }
What should I do in my control to make new values seen by grid?
Thank you.
Dmitry
Top achievements
Rank 1
 answered on 15 Sep 2011
0 answers
49 views
Hello everyone,

I'm using the radsplitter in my project but the titles are not displayed correctly in IE (sse the attached files).

Thanks by advance.

Pierre-Antoine
Pierre-Antoine DOUCHET
Top achievements
Rank 1
 asked on 15 Sep 2011
1 answer
240 views
I am currently experiencing a problem with a RadGrid and RadDatePicker. I'm exporting a RadGrid to html and emailing it and the only way that I could get that to work without experiencing an exception was by setting RegisterWithScriptManager to false. However, I noticed that by setting this to false, all of my RadDatePickers on the page do not work and in fact throw the following error:

$telerik.$ is not a function
http://localhost:49573/ScriptResource.axd?d=it4vdo0MeBs4YMlMqnWLED35eFOIZZePeLdyXnDEQw5ME266x-UTFJP9cvvWAGl-_kH4RV9W1CPdN9wraa7310aQrk2ob0cuolLmXSYBbq9EyV2S13ouKuXCSQqK8V-W9kVfpzVl-rdFES8UqAm2VU4MOegmHWIs8Hu3T0anp8w1&t=230b89e4
Vasil
Telerik team
 answered on 15 Sep 2011
2 answers
152 views
Is there something special I have to do in order to have a RadFormDecorator on my aspx page?

I am having issues with a web app and the RadFormDecorator so I created a new blank asp.net C# web application.

In both, my working app and the new blank app, any page that has a RadFormDecorator will give me a message on the browser status bar about a picture downloading from a webresource.

On the new blank app, I went through the Configure Project wizard and did not enable ScriptManager CDN or StyleSheetManager CDN. Left the Telerik skin as Default and all other settings as default.

No clue how to proceed.



Bozhidar
Telerik team
 answered on 15 Sep 2011
2 answers
414 views
hello
i'm trying to change showinterval and autoclosedelay interval from clide-side
i'm found method set_autoCloseDelay() and set_showInterval()

setting value exists in textbox control and i wish to change the interval value from textbox's values.

here is my code. i just added timer for watching count . but it was not work well when i changed textbox value and clicked the button

please look at the my code, and help me. thank you.

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="RadControlsWebApp4._Default" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
    <link href="./Styles/TempTemplate.css" rel="Stylesheet" type="text/css" />
    <script type="text/javascript" language="javascript" src="./Scripts/RadNotification.js"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
            <Scripts>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
            </Scripts>
        </telerik:RadScriptManager>
    </div>
        <script type="text/javascript">
            var firstNotificationShowTime = 0;
            var firstNotificationHideTime = 0;
            var timerFirstShow;
            var timerFirstHide;
 
 
            $(document).ready(function () {
                var firstNotification = $find("<%=RadNotificationFirst.ClientID %>");
                 
                $("#TextBoxFirstNotificationShowInterval").val(firstNotification.get_showInterval());
                $("#TextBoxFirstNotificationHideInterval").val(firstNotification.get_autoCloseDelay());
 
            });
 
            function ChangeNotificationTimer() {
                var firstNotification = $find("<%=RadNotificationFirst.ClientID %>");
             
 
 
                var firstNotificationShowInterval = $("#TextBoxFirstNotificationShowInterval").val();
                var firstNotificationHideInterval = $("#TextBoxFirstNotificationHideInterval").val();
 
                firstNotification.set_autoCloseDelay(parseInt(firstNotificationHideInterval));
                firstNotification.set_showInterval(firstNotificationShowInterval);
 
                return false;
            }
 
            function CountTimerHide() {
 
                firstNotificationHideTime -= 1000;
 
                $("#tdOutputFirst").html("hiding after" + parseInt(firstNotificationHideTime / 1000) + " Second");
            }
 
            function CountTimerShow() {
                firstNotificationShowTime -= 1000;
                $("#tdOutputFirst").html("showing after" + parseInt(firstNotificationShowTime / 1000) + " Second");
            }
 
            function OnClientShowing(sender, args) {
                 
                    clearInterval(timerFirstShow);
                    $("#print").html($("#print").html() +" "+sender.get_id()+ "showing call<br>");
                    firstNotificationHideTime = sender.get_autoCloseDelay();
                    timerFirstHide = setInterval("CountTimerHide()", 1000);    
            }
 
            function OnClientHiding(sender, args) {
 
                    clearInterval(timerFirstHide);
 
                    $("#print").html($("#print").html() + " " + sender.get_id() + "Hiding call<br>");
                    firstNotificationShowTime = sender.get_showInterval();
                    timerFirstShow = setInterval("CountTimerShow()", 1000);
            }
    </script>
    <div>
        <table cellpadding="0" cellspacing="0" style="">
            <tr>
                <td class="tdLeftContent">First Notification Show Interval</td>
                <td class="tdRightContent">
 
                    <asp:TextBox ID="TextBoxFirstNotificationShowInterval" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="tdLeftContent">First Notification Hide Interval</td>
                <td class="tdRightContent">
                    <asp:TextBox ID="TextBoxFirstNotificationHideInterval" runat="server"></asp:TextBox>
                </td>
 
            </tr>
            <tr>
                <td style="text-align:center;" colspan="2">
                    <asp:Button ID="Button1" runat="server" Text="Change" OnClientClick="return ChangeNotificationTimer();"/>
                </td>
            </tr>
            <tr>
                <td id="tdOutputFirst" style="text-align:center;" colspan="2">
                     
                </td>
 
            </tr>
        </table>
    </div>
    <div id="print">
    </div>
        <telerik:RadNotification ID="RadNotificationFirst" runat="server" Position="Center" ShowInterval="7000" AutoCloseDelay="6000"
            Width="300" Height="200" Title="First Notification"  OffsetX="-180" OffsetY="-65" OnClientShowing="OnClientShowing" OnClientHiding="OnClientHiding"
            TitleIcon="" EnableRoundedCorners="true">
        </telerik:RadNotification>
 
    </form>
</body>
</html>
Marin Bratanov
Telerik team
 answered on 15 Sep 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?