Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
167 views
Hi
 
we are using telerik menu control for a form , In that we are using menu scoll functionality as shown below
http://demos.telerik.com/aspnet-ajax/menu/examples/functionality/scrolling/defaultcs.aspx.

The vertical scoll for the menu works fine, but we seem the scroll happens very very slow.

Is there any way to increase the speed of the scroll....


Advance Thanks,
Sanjay
Yana
Telerik team
 answered on 07 Jul 2010
2 answers
101 views
Hello,
i am using radeditor in my page..
i want to set the default font name as verdana. so i am using this css file in my page...        

<

 

CssFiles>

 

<

 

telerik:EditorCssFile Value="styles/EditorContentArea.css" />

 

</

 

CssFiles>

 

this works fine in ie and chrome but not in firefox...

Rumen
Telerik team
 answered on 07 Jul 2010
3 answers
133 views
I wrote this code for opening a dialog for displaying my confirmation dialog but when I click on yes button my return method will be executed but OnClientClose never been executed?
I wrote 2 user control. first one is my main message box control that contain RadWindowManager and a hidden ButtonYes. In second one I will shown my message and my Yes button (MessageBoxContainer user control). In my strategy when you click on yes button on MessageBoxContainer control message box will be closed and return an argument to MessageBox control and it must execute OnClientClose function for clicking on hidden ButtonYes but OnClientClose never be executed!! Here is my code.

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MessageBox.ascx.cs" Inherits="Diten.Web.AspNet.UI.UserControls.MessageBox" Debug="true" %>
<script type="text/javascript">
    function openWin(url, windowID) {
        var parentPage = GetRadWindow().BrowserWindow;
        var parentRadWindowManager = parentPage.GetRadWindowManager();
        var oWnd = parentRadWindowManager.open(url, windowID);
        window.setTimeout(function () {
            oWnd.setActive(true);
        }, 0);
    }

    function OnClientClose(oWnd, args) {
        alert('Parent: ' + arg.clikedButton);
        var arg = args.get_argument();

        if (arg) {
            if (arg.clikedButton == 'Ok') {
                document.getElementById('<%= this.ButtonOk.ClientID %>').click();
            } else if (arg.clikedButton == 'Cancel') {
                document.getElementById('<%= this.ButtonCancel.ClientID %>').click();
            } else if (arg.clikedButton == 'Retry') {
                document.getElementById('<%= this.ButtonRetry.ClientID %>').click();
            } else if (arg.clikedButton == 'Abort') {
                document.getElementById('<%= this.ButtonAbort.ClientID %>').click();
            } else if (arg.clikedButton == 'Yes') {
                document.getElementById('<%= this.ButtonYes.ClientID %>').click();
            } else if (arg.clikedButton == 'No') {
                document.getElementById('<%= this.ButtonNo.ClientID %>').click();
            }
        }
    }
</script>
<telerik:RadWindowManager ID="RadWindowManager" runat="server" OnClientClose="OnClientClose" Behaviors="Close, Move" VisibleStatusbar="false" AutoSize="true" ShowContentDuringLoad="false" DestroyOnClose="true" >
</telerik:RadWindowManager>
<asp:Button ID="ButtonOk" runat="server" Text="Ok" onclick="ButtonOk_Click" style="display:none;" />
<asp:Button ID="ButtonCancel" runat="server" Text="Cancel" onclick="ButtonCancel_Click" style="display:none;" />
<asp:Button ID="ButtonRetry" runat="server" Text="Retry" onclick="ButtonRetry_Click" style="display:none;" />
<asp:Button ID="ButtonAbort" runat="server" Text="Abort" onclick="ButtonAbort_Click" style="display:none;" />
<asp:Button ID="ButtonYes" runat="server" Text="Yes" onclick="ButtonYes_Click" style="display:none;" />
<asp:Button ID="ButtonNo" runat="server" Text="No" onclick="ButtonNo_Click" style="display:none;" />




MessageBox show method

        public void Show(string message, MessageBoxModes messageBoxMode, MessageBoxIcon messageBoxIcon, string eventHandlerID, bool isModal)
        {
            message = message.Replace("%n", "<br/>");

            string _parameters = "ControlToLoad=Diten.Web.AspNet.UI.UserControls.MessageBoxContainer" + "&OpenerID=" + this.OpenerID + "&Message=" + message +
                "&MessageBoxMode=" + ((int)messageBoxMode).ToString() + "&MessageBoxIcon=" + ((int)messageBoxIcon).ToString() +
                "&MessageBoxEventHandlerID=" + eventHandlerID;
           
            string _navigateUrl = "/MainFrame.aspx?EncParameters=" + this.Encrypt(_parameters) + "', '" + this.Translate("Message");

            RadWindow _radWindow = new RadWindow();
            _radWindow.ID = "RadWindow" + Guid.NewGuid().ToString().Replace("-", string.Empty);
            _radWindow.Behaviors = WindowBehaviors.Close;
            _radWindow.Modal = isModal;
            _radWindow.NavigateUrl = _navigateUrl;
            _radWindow.Animation = WindowAnimation.Fade;
            _radWindow.OnClientClose = "OnClientClose";

            this.RadWindowManager.Windows.Add(_radWindow);

            string _javaScript = string.Empty;

            if (!isModal)
                _javaScript = "radopen('" + _navigateUrl + "', '" + _radWindow.ID + "');";
            else
                _javaScript = "openWin('" + _navigateUrl + "', '" + _radWindow.ID + "');";

            RadScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), this.ClientID + "MessageBox", _javaScript, true);
        }



MessageBoxContainer ASCX code

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MessageBoxContainer.ascx.cs" Inherits="Diten.Web.AspNet.UI.UserControls.MessageBoxContainer" Debug="true" %>
<%@ Register Src="~/UI/UserControls/Templates/GroupBox.ascx" TagPrefix="DitenAsp" TagName="GroupBox" %>
<script language="javascript">
    function returnToParent(clikedButton) {
        var oArg = new Object();
        var oWnd = GetRadWindow();

        oArg.clikedButton = clikedButton;
        oWnd.close(oArg);
    }
</script>
<table cellpadding="0" cellspacing="0" width="100%" style="vertical-align: top;">
    <tr>
        <td align="center" width="100%" style="vertical-align: top;">
            <table cellpadding="0" cellspacing="0" width="100%" style="vertical-align: top;">
                <tr>
                    <td style="vertical-align: top; padding-right: 5px;">
                        <asp:Image ID="ImageIcon" runat="server" Width="32px" Height="32px" />
                    </td>
                    <td style="vertical-align: middle; text-align: left;" wrap="nowrap" nowrap>
                        <DitenAsp:GroupBox ID="GroupBox" runat="server">
                            <ContentTemplate>
                                <asp:Label ID="LabelMessage" runat="server" Text="Label"></asp:Label>
                            </ContentTemplate>
                        </DitenAsp:GroupBox>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td align="center" width="100%" style="height: 33px;">
            <asp:PlaceHolder ID="PlaceHolderButtons" runat="server"></asp:PlaceHolder>
        </td>
    </tr>
</table>



i'm adding ButtonYes and RadWindow dynamically into my controls. Now my question is how could I execute OnClientClose method by calling OnClientClose event of my RadWindowManager or my RadWindow?
Georgi Tunev
Telerik team
 answered on 07 Jul 2010
2 answers
78 views
Hi fellows!
I'm a newby in programming so please forgive me if i asking something commonly known...
I'm using RadTreeView in my rpoject - popultated with surveys and questions
and i want to use

startNodeInEditMode
method for edit the node Text . The question is : How to save the newly updated value to DB - wich event should i use for it?

shootermv
Top achievements
Rank 1
 answered on 07 Jul 2010
3 answers
108 views
Hi,
I am using a ajax tool modalpopup in a ascx page which is having update panel and also the aspx page that is having this usercontrol(ascx) is having the updatepanel.
 
In this modalpopup we need to have a Radgrid that display various results based on the search.

But when a Radgrid is placed in the modalpopup then it is throwing me the follwoing error

" Sys.InvalidOperationException: A control is already associated with the element "

FYI: If i am using a normal(visualstudio) GridView then everything is working fine.

Please let me know how do we fix the issue?

Thanks,
Chaitanya
Yavor
Telerik team
 answered on 07 Jul 2010
1 answer
130 views
Hi,

Need help to bind version name against Date. Normal value we can bind. But version value come as "Name:SARA Version:1.59.25.2" and "Name:SARA Version:1.59.25.3". How to plot this value against Date. Is there any way? I attached sample code.



.aspx

<%

@ Page Language="C#" AutoEventWireup="true" CodeFile="Default4.aspx.cs" Inherits="Default4" %>

 

<%

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

 

<%

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Charting" TagPrefix="cc1" %>

 

<!

 

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>

 

</

 

head>

 

<

 

body>

 

 

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

 

 

<div>

 

 

<telerik:RadChart ID="testPlot" runat="Server" Width="700px"

 

 

AutoLayout="True" Skin="Office2007"

 

 

DefaultType="Line">

 

 

<PlotArea>

 

 

<XAxis>

 

 

<Appearance Color="134, 134, 134" MajorTick-Color="134, 134, 134">

 

 

<MajorGridLines PenStyle="Solid" Color="209, 222, 227" Width="0"></MajorGridLines>

 

 

<TextAppearance TextProperties-Color="51, 51, 51"></TextAppearance>

 

 

</Appearance>

 

 

<AxisLabel>

 

 

<TextBlock>

 

 

<Appearance TextProperties-Color="Black"></Appearance>

 

 

</TextBlock>

 

 

</AxisLabel>

 

 

</XAxis>

 

 

<YAxis>

 

 

<Appearance Color="134, 134, 134" MinorTick-Color="134, 134, 134" MinorTick-Width="0" MajorTick-Color="134, 134, 134">

 

 

<MajorGridLines Color="209, 222, 227"></MajorGridLines>

 

 

<MinorGridLines Color="233, 239, 241"></MinorGridLines>

 

 

<TextAppearance TextProperties-Color="51, 51, 51"></TextAppearance>

 

 

</Appearance>

 

 

<AxisLabel>

 

 

<TextBlock Text="">

 

 

<Appearance TextProperties-Color="Black"></Appearance>

 

 

</TextBlock>

 

 

</AxisLabel>

 

 

</YAxis>

 

 

<Appearance>

 

 

<FillStyle MainColor="White" FillType="Solid"></FillStyle>

 

 

<Border Color="134, 134, 134"></Border>

 

 

</Appearance>

 

 

</PlotArea>

 

 

<Appearance Corners="Round, Round, Round, Round, 6">

 

 

<FillStyle FillType="Image">

 

 

<FillSettings ImageDrawMode="Flip" BackgroundImage="{chart}" ImageFlip="FlipX"></FillSettings>

 

 

</FillStyle>

 

 

<Border Color="138, 138, 138"></Border>

 

 

</Appearance>

 

 

 

<Series>

 

 

<cc1:ChartSeries Name="Series 1" Type="Line">

 

 

<Appearance>

 

 

<FillStyle MainColor="55, 167, 226" SecondColor="22, 85, 161" FillType="Solid">

 

 

<FillSettings GradientMode="Vertical"></FillSettings>

 

 

</FillStyle>

 

 

<PointMark Visible="True" Figure="Circle" FillStyle-MainColor="Red" FillStyle-SecondColor="Red" Dimensions-Height="5px" Dimensions-Width="5px" Dimensions-AutoSize="false">

 

<

 

FillStyle MainColor="Red" SecondColor="Red"></FillStyle>

 

 

</PointMark>

 

 

<TextAppearance TextProperties-Color="Black"></TextAppearance>

 

 

<Border Color="69, 115, 167" />

 

 

</Appearance>

 

 

</cc1:ChartSeries>

 

 

</Series>

 

 

<Legend Visible="false">

 

 

<Appearance Visible="False" Position-AlignedPosition="TopRight" Dimensions-Margins="15.4%, 3%, 1px, 1px"

 

 

Dimensions-Paddings="2px, 8px, 6px, 3px">

 

 

<ItemTextAppearance TextProperties-Color="Black">

 

 

</ItemTextAppearance>

 

 

<ItemMarkerAppearance Figure="Square">

 

 

<Border Color="134, 134, 134"></Border>

 

 

</ItemMarkerAppearance>

 

 

<FillStyle MainColor=""></FillStyle>

 

 

<Border Color="Transparent"></Border>

 

 

</Appearance>

 

 

</Legend>

 

 

<ChartTitle TextBlock-Text="">

 

 

<Appearance Position-AlignedPosition="Top">

 

 

<FillStyle MainColor=""></FillStyle>

 

 

</Appearance>

 

 

<TextBlock Text="">

 

 

<Appearance TextProperties-Font="Tahoma, 13pt" TextProperties-Color="Black"></Appearance>

 

 

</TextBlock>

 

 

</ChartTitle>

 

 

</telerik:RadChart>

 

 

</div>

 

 

</form>

 

</

 

body>

 

</

 

html>

 


.code

using

 

System;

 

using

 

System.Collections.Generic;

 

using

 

System.Linq;

 

using

 

System.Web;

 

using

 

System.Web.UI;

 

using

 

System.Web.UI.WebControls;

 

using

 

System.Data;

 

using

 

Telerik.Charting;

 

using

 

Telerik.Web.UI;

 

using

 

System.Web.UI.DataVisualization.Charting;

 

public

 

partial class Default4 : System.Web.UI.Page

 

{

 

protected void Page_Load(object sender, EventArgs e)

 

{

 

if (!Page.IsPostBack)

 

{

 

DataTable deviceTable = new DataTable();

 

deviceTable.Columns.Add(

new DataColumn("Date"));

 

deviceTable.Columns.Add(

new DataColumn("Value"));

 

 

 

DataRow newRow = deviceTable.NewRow();

 

newRow[

"Date"] = "6/29/2010";

 

newRow[

"Value"] = "Version 1.59.25.2";

 

deviceTable.Rows.Add(newRow);

 

 

DataRow newRow1 = deviceTable.NewRow();

 

newRow1[

"Date"] = "6/30/2010";

 

newRow1[

"Value"] = "Version 1.59.25.3";

 

deviceTable.Rows.Add(newRow1);

 

DataRow newRow2 = deviceTable.NewRow();

 

newRow2[

"Date"] = "7/01/2010";

 

newRow2[

"Value"] = "Version 1.59.25.4";

 

deviceTable.Rows.Add(newRow2);

testPlot.DataSource = deviceTable;

testPlot.PlotArea.XAxis.DataLabelsColumn =

"Date";

 

testPlot.Series[0].DataYColumn =

"Value";

 

testPlot.DataBind();

testPlot.Visible =

true;

 

testPlot.PlotArea.YAxis.AxisLabel.Visible =

true;

 

testPlot.PlotArea.XAxis.AxisLabel.Visible =

true;

 

testPlot.PlotArea.XAxis.AxisLabel.TextBlock.Text =

"Date";

 

 

 

}

}

}

Ves
Telerik team
 answered on 07 Jul 2010
1 answer
114 views
Hi! I need your help. I need to allow the client user to modify the order of the rows, for expample:

Number     Question      
    1           ¿What is your name?          Up  Down
    2           ¿How are you?         Up  Down
    3           ¿Do you like cars?   Up  Down

SAVE


The client can change the order of the rows, and finally click save button to save the changes made in the order. I found the follow example: Data Grid Reorder Moverows 

You add a templatecolumn

<asp:TemplateColumn> 
                <ItemTemplate> 
                    <asp:ImageButton runat="server" ToolTip="Click to move this row up" ImageUrl="~/App_Themes/WEBSWAPP/images/up.gif" 
                        ID="btnUp" CommandName="MoveUp" /> 
                    <asp:ImageButton runat="server" ToolTip="Click here to move this row down" ImageUrl="~/App_Themes/WEBSWAPP/images/down.gif" 
                        ID="ImageButton1" CommandName="MoveDown" /> 
                </ItemTemplate> 
            </asp:TemplateColumn> 

But when i try to cath the event onCommand dosen't fire. I search and i found that radgrid don't fire the event. Somebody have another idea please??  

Thanks

Veli
Telerik team
 answered on 07 Jul 2010
1 answer
118 views
I want to have a tabstrip with a text box on it but I cant access the value of the textbox in code behind.  What am I missing? This should be simple but I cannot find the answer anywhere.

 

<telerik:RadTabStrip ID="RadTabStrip1" runat="server" SelectedIndex="0">

 

 

<Tabs>

 

 

<telerik:RadTab runat="server" Selected="True" Text="test">

 

 

<TabTemplate>

 

 

<asp:TextBox ID="TextBox1" runat="server" ontextchanged="TextBox1_TextChanged"></asp:TextBox>

 

 

<asp:LinkButton ID="LinkButton1" runat="server" onclick="LinkButton1_Click">LinkButton</asp:LinkButton>

 

 

</TabTemplate>

 

 

</telerik:RadTab>

 

 

</Tabs>

 

 

</telerik:RadTabStrip>

 



 

Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs)

 

 

Dim rad As TextBox = RadTabStrip1.FindControl("TextBox1")

 

Response.Write(rad.Text)

 

End Sub

 



Shinu
Top achievements
Rank 2
 answered on 07 Jul 2010
3 answers
416 views
Hi,

I need to include a request.querystring variable in the DataNavigateUrlFormatString but I am not sure how to do it?

Can anyone help?
Princy
Top achievements
Rank 2
 answered on 07 Jul 2010
1 answer
146 views
I have a modal tooltip and tried the javascript found here in the forum to set focus to a radTextbox and was unable to make it work.

Here is the HTML markup:

<

 

body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<telerik:RadScriptBlock ID="rsb" runat="server">
<script type ="text/javascript">
function rttPromptShow(sender, eventArgs) {

 

setTimeout(

function() {
var txt = $get("<%=txtTest.ClientID %>");
try {
  if (txt)
    txt.focus();

 

 

}

 

catch (e) { };

}, 500);

}

 

</script>
</telerik:RadScriptBlock>
<div>
<asp:Button ID="btnTeset" runat="server" Text="Show Tool Tip" />
<telerik:RadToolTip ID="rttPrompt" runat="server" Modal="true"
                               Position="Center" OnClientShow="rttPromptShow"
                               ShowEvent="FromCode" HideEvent="FromCode" Width="300px" Height="150px">
<telerik:RadTextBox ID="txtTest" runat="server" Text="Test">
</telerik:RadTextBox>
</telerik:RadToolTip>
</div>
</form>

</

 

body>

and here is the code behind:

 

 

Protected Sub btnTeset_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnTeset.Click
   Call rttPrompt.Show()

 

 

End Sub

I would also like the text in the text box to be selected.

Any help would be greatly appreciated.

Kevin


 

 

 

 

 

 

 

Svetlina Anati
Telerik team
 answered on 07 Jul 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?