Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
73 views
Hello,
My issue is that when coming from anoher page with a Sesssion variable holding a specific DataKeyName I am unable to see the selected item unless the item is on the current page. I want to know if there is a function like NavigateAndSelect(DataKeyName)  that allows me to first navigate to the specific page and then select an item on that page. If no suh functionality is available then is there a workaround for this?
Best solution for us at this moment is a server-side solution.

Thank you
Mihai
Top achievements
Rank 1
 answered on 06 Oct 2011
2 answers
65 views
hi

on first time using the editor, the first thing i want to change is the background color of the content area.
its currently dk grey so isnt ideal fo rblack text.

how do i make this white?

i tried multiple options but with no joy and cant see anything in documentation relating to this
Mark
Top achievements
Rank 1
 answered on 06 Oct 2011
3 answers
71 views
I have created a hierarchical grid entirely in code behind.  On a grid partialy created I get the mouse over effect of the row changing colour, however with this grid I do not.  Any help with this would be most appreciated. I have tried the example where you set the http://www.telerik.com/help/aspnet/grid/grdsetstyleonmouseover.html, but I get an error 'this.Row is undefined'
mabs
Top achievements
Rank 1
 answered on 06 Oct 2011
1 answer
596 views
From what I understand, the way the demo is set up, when the 'Continue Session' button is clicked, a callback should reset the session on the server, meaning the entire page should not be refreshed. And indeed I do not notice a page refresh on the demo. Yet, my page refreshes every time the session is continued. Is there a way to reset the session without this page refresh?

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="RadNotificationSolution.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">
 
    <head runat="server">
        <title></title>
        <telerik:RadCodeBlock runat="server">
            <script type="text/javascript">
                var timeLeftCounter = null;
                var seconds = 60;
                //a flag to ease the logic which determines whether to redirect the user
                //will not redirect if the RadButton is clicked
                var toRedirect = true;
 
                //stop timers for UI
                function stopTimer(timer) {
                    clearInterval(this[timer]);
                    this[timer] = null;
                };
 
                //reset timers for UI
                function resetTimer(timer, func, interval) {
                    this.stopTimer(timer);
                    this[timer] = setInterval(Function.createDelegate(this, func), interval);
                };
 
                function OnClientShowing(sender, args) {
                    console.log("OnClientShowing()");
                    resetTimer("timeLeftCounter", UpdateTimeLabel, 1000);
                    //raise the flag again so that a redirect will occur if the notification autocloses
                    toRedirect = true;
                }
 
                function OnClientHiding(sender, args) {
                    if (toRedirect) {
                        window.location.href = sender.get_value();
                    }
                }
 
                //update the text in the label in RadNotification
                //this could also be done automatically by using UpdateInterval. However, this will cause callbacks [which is the second best solution than javascript] on every second that is being count
                function UpdateTimeLabel(toReset) {
                    console.log("UpdateTimeLabel():", toReset);
                    var sessionExpired = (seconds == 0);
                    if (sessionExpired) {
                        stopTimer("timeLeftCounter");
                        //redirect to session expired page - simply take the url which RadNotification sent from the server to the client as value
                        window.location.href = $find("RadNotificationSessionTimeout").get_value();
                    } else {
                        var timeLbl = $get("timeLbl");
                        timeLbl.innerHTML = seconds--;
                    }
                }
 
                function ContinueSession() {
                    console.log("ContinueSession()");
                    var notification = $find("RadNotificationSessionTimeout");
                    toRedirect = false;
                    notification.update();
                    notification.hide();
                }
            </script>
        </telerik:RadCodeBlock>
    </head>
    <body>
        <form id="form1" runat="server">
            <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
            </telerik:RadScriptManager>
            <div>
                <asp:Literal runat="server" ID="literalContent"></asp:Literal>
                <telerik:RadNotification ID="RadNotificationSessionTimeout" runat="server" ClientIDMode="Static" Position="Center" Width="240"
                                         Height="200" OnCallbackUpdate="OnCallbackUpdate" Value="/Logout.aspx?timeout=true" AutoCloseDelay="60000"
                                         Title="Stay Signed In?" Skin="Office2010Blue" EnableRoundedCorners="true" OnClientShowing="OnClientShowing" OnClientHiding="OnClientHiding" LoadContentOn="PageLoad" ShowCloseButton="False" >
                    <ContentTemplate>
                        <div class="notificationContent">Time remaining:  <span id="timeLbl">60</span>
                            <%--<telerik:RadButton Skin="Office2007" ID="continueSession" runat="server" Text="Continue Your Session"
                                                Style="margin-top: 10px;" AutoPostBack="false" OnClientClicked="ContinueSession">
                            </telerik:RadButton>--%>
                            <asp:Button ID="continueSession" runat="server" Text="Continue Your Session"
                                        Style="margin-top: 10px;" AutoPostBack="false" OnClientClicked="ContinueSession">
                            </asp:Button>
                        </div>
                    </ContentTemplate>
                </telerik:RadNotification>
            </div>
        </form>
    </body>
</html>

using System;
using Telerik.Web.UI;
 
namespace RadNotificationSolution
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Random random = new Random();
            literalContent.Text = random.Next().ToString();
 
            // Session Timeout Config
            if (!IsPostBack)
            {
                //set the expire timeout for the session
                Session.Timeout = 2;
                //configure the notification to automatically show 1 min before session expiration
                RadNotificationSessionTimeout.ShowInterval = (Session.Timeout - 1) * 60000;
                //set the redirect url as a value for an easier and faster extraction in on the client
                RadNotificationSessionTimeout.Value = Page.ResolveClientUrl("Logout.aspx?timeout=true");
            }
        }
 
        protected void OnCallbackUpdate(object sender, RadNotificationEventArgs e)
        {
 
        }
    }
}
Marin Bratanov
Telerik team
 answered on 06 Oct 2011
1 answer
218 views
Hello Telerik support,

We have several numeric textboxes throughout our web application and we added our own styling to them through adding a css class to them ("moneybox"). However, they lose this added class after a mouse over.
I think the problem lies with the fact that you change the css classes with Javascript on mouse over and mouse out, and then forget to re-attach the user-added css class.
How can we solve this problem? Besides the solution we have implemented now, which is, adding the css class again after the mouse over through the use of Javascript (jquery), as you see below:

<Telerik.Web.UI.RadNumericTextBox ID="tbActivityValue" Culture="nl-NL" CssClass="moneybox" NumberFormat-DecimalDigits="2" runat="server" MinValue="0" TabIndex="1"></Telerik.Web.UI.RadNumericTextBox>


Added jquery:
/* Add class moneybox to the Telerik Numeric Textboxes in the repeater */
        $(".numerictextboxholder .riTextBox.riEnabled.sfi_textbox").addClass("moneybox");
        $(".numerictextboxholder .riTextBox.riHover").mouseout(function() {
            $(".numerictextboxholder .riTextBox.riHover").addClass("moneybox");
        });
        $(".numerictextboxholder .riTextBox.riEnabled.sfi_textbox").mouseout(function() {
            $(".numerictextboxholder .riTextBox.riEnabled.sfi_textbox").addClass("moneybox");
        });
        $(".numerictextboxholder .riTextBox.riHover").mouseover(function() {
            $(".numerictextboxholder .riTextBox.riHover").addClass("moneybox");
        });
        $(".numerictextboxholder .riTextBox.riEnabled.sfi_textbox").mouseover(function() {
            $(".numerictextboxholder .riTextBox.riEnabled.sfi_textbox").addClass("moneybox");
        });
        $(".numerictextboxholder .riTextBox.riFocused").blur(function() {
            $(".numerictextboxholder .riTextBox.riEnabled.sfi_textbox").addClass("moneybox");
        });
        $(".numerictextboxholder .riTextBox.riEnabled.sfi_textbox").blur(function() {
            $(".numerictextboxholder .riTextBox.riEnabled.sfi_textbox").addClass("moneybox");
        });
Vasil
Telerik team
 answered on 06 Oct 2011
8 answers
518 views
Hi

I was trying to generate the Pie chart. Everything was fine except the Legend. It is giving me - Item1, Item2 Item3 etc instead of actual item values... 

Have look at the code,

        Dim chaSer As New ChartSeries
        radChart.AddChartSeries(chaSer)
        radChart.ChartTitle.TextBlock.Text = "Polling Result"
        radChart.Skin = "WebBlue"
        radChart.Attributes.Add("Palette", "Colorful")
        getRespDt()

            chaSer.Type = ChartSeriesType.Pie
            chaSer.DefaultLabelValue = "#%"
            chaSer.Appearance.ShowLabels = True
         
      
        chaSer.DataYColumn = "Count"

        chaSer.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.ItemLabels

        radChart.DataSource = dtPoll
        radChart.DataBind()


        Response.ContentType = "image/png"
        radChart.Save(Response.OutputStream, ImageFormat.Jpeg)

Thanks,
Pradip
marinus bosman
Top achievements
Rank 1
 answered on 06 Oct 2011
20 answers
154 views

When I uploaded media into a post.I saw the media automatic started.
What the default property of media? automatic started?

How to set the default property of media to start by user (Auto Start = false)?

Thank you

Sébastien Nunes
Top achievements
Rank 1
 answered on 06 Oct 2011
3 answers
87 views
Dear Telerik-Team,

I purchased the Premium Collection and want to update my applications I dveloped on the "Demo"-Dlls.

I have downloaded the latest build of the Telerik WebMail demoapplication and I wanted to include the purchased Telerik.Web.UI DLL in order to get rid of the demo hint which is displayed when using the demo-dlls.

I didn't do any changes to it, but when running the default.aspx file, I get an error saying: "The column [Received.Value.Date] could not be found". When I comment the GridCalculateColumn for grouping the date, but still have the one for the conversion-column, I get an error saying that the function call to "Subject.Replace" is invalid. Now, I switched to the markup code and think that the problem comes from this code:

<telerik:GridCalculatedColumn UniqueName="Date" DataType="System.DateTime" DataFields="Received" 
                            Expression="Received.Value.Date" HeaderText="Date" Visible="false">  
                        </telerik:GridCalculatedColumn> 
                        <telerik:GridCalculatedColumn UniqueName="Conversation" DataType="System.String" 
                            DataFields="Subject" Expression='Subject.Replace("RE: ", "")' HeaderText="Conversation" 
                            Visible="false">  
                        </telerik:GridCalculatedColumn> 

When I replace the new DLL (I purchaed) to the demo dll, everything goes right. So I guess that something in the DLL has changed. I have made several changs, but did not have any success.

So I would like to ask you if you can help me with this issue?

Kind regards,
Best wishes from Germany,
Marco

 

 

 

 

Iana Tsolova
Telerik team
 answered on 06 Oct 2011
1 answer
86 views
How can a client send dates to my calendar via variable?

example of what im talking about.

http://host.com/calendar.aspx?Date=2011,10,03

or similar?


they are planning on running a script that pulls information from my calendar...  how can I allow them to do this?

i'm not too concerned about the format, i want to simulate if they actually clicked on the date.

also, is there a way to do a RSS type feed?


Vasil
Telerik team
 answered on 06 Oct 2011
2 answers
81 views
In stacked chart i have added totaldata label. I want to keep color of this data label differernt  from other datalabels. how can I do that.

saurabh
Top achievements
Rank 1
 answered on 06 Oct 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?