Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
109 views
Example scenario:  Headquarters office creates an AllDay event, and that particular user is in Central Standard Time.  When the employees from the Eastern or Pacific timezone offices look at the calendar the appointments do not show as "all day" but instead as a huge appointment ranging from 1:00am day of the event, to 1:00am the day after an event (times given are just an example), however all users in the CST offices see the appointment correctly.
---------------------------------------------------

The UTC correction is getting applied to these all day events, and In need to make sure that doesn't happen. I figure I can intercept this in the GetAppointments & GetAppointment events of the provider, but I'm just not sure how to apply this appropriately.

For my holidays (which works correctly) I'm using:
apt.Start = Convert.ToDateTime(holiday.StartDate).Subtract(owner.TimeZoneOffset); 
apt.End = Convert.ToDateTime(holiday.EndDate).Subtract(owner.TimeZoneOffset); 

The diffrence between my holiday data and the appointment data the users are creating is the hours.  Holidays are set as 12AM (2010-01-01 00:00:00.000) and the users are set to their timezone (e.g. 2010-01-01 06:00:00.000).  Since the hour is unpredictable based on the creating users timezone, would it be advisable to just set the what ever is in the hour (06 in the example above) to 00 ?

Does this sound like an accurate chain of events?

  1. Intercept the setting of the current date
  2. determine the time span and find if this is a 24hr event (what happens in n-day events?  72hrs, 48hrs, etc.)
  3. If it is, continue, if it's not set the existing DateTime.
  4. Set the dates hour to zero
  5. subtract the current TimeZoneOffset of the scheduler
  6. set the new value as the DateTime to use
T. Tsonev
Telerik team
 answered on 17 Feb 2010
2 answers
137 views

I've tried adding a 'Loading'-message while the tree expands the childnodes, but the code below doesn't show any message. What am I missing?

Admin.aspx:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Admin.aspx.cs" Inherits="TestAdmin" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!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>
    <title>Test</title>
  </head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager id="ScriptManager1" runat="server" />
            <telerik:RadTreeView ID="RadTreeView1" OnNodeExpand="RadTreeView1_NodeExpand" LoadingMessage="Loading" LoadingStatusPosition="BelowNodeText" runat="Server" />
    </form>
</body>
</html>

 

Admin.aspx.cs:
using System;
using System.Web;

using Telerik.Web.UI;

public partial class TestAdmin : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
   RadTreeNode root = new RadTreeNode("Root", "0");

   root.ExpandMode = TreeNodeExpandMode.ServerSide;

   RadTreeView1.Nodes.Add(root);
        }
    }

    protected void RadTreeView1_NodeExpand(object sender, RadTreeNodeEventArgs e)
    {
  RadTreeNode node;

  for (int i = 0; i < 1000; i++)
  {
   node = new RadTreeNode("New node " + i.ToString(), "New value");

   node.ExpandMode = TreeNodeExpandMode.ServerSide;

   e.Node.Nodes.Add(node);
  }
    }
}

Regards,
Claus Pedersen

FU
Top achievements
Rank 2
 answered on 17 Feb 2010
2 answers
98 views
<telerik:GridBoundColumn DataField="Username" HeaderText='<%= strUsername%>' UniqueName="Username"> 
</telerik:GridBoundColumn> 


My strUsername in cs file

        public string strUsername 
        { 
            get 
            { 
                return "ABC"; 
            } 
        } 



But when I run it return là null value in picture below :-s.
Now how can I write like that


VnDevil
Top achievements
Rank 2
 answered on 17 Feb 2010
1 answer
135 views
Hi

I am using <CommandItemSettings ShowExportToExcelButton="true" /> and <MasterTableView CommandItemDisplay="Top" >to show my Excel Export Button on my grid. However the 'Add new record" icon shows up too? How can i make this invisible?

thanks
D
Shinu
Top achievements
Rank 2
 answered on 17 Feb 2010
0 answers
129 views
 

Please find the below options for validation, may be these would help.

 

Options 1:

 

if (Condition satisfied)

{

 //Code for Update Logic

}

Else

{

  throw new Exception("The Date format is not correct format");

}

 

Option 2:

 

string sMessage;

sMessage = " The Date format is not correct format ";

str = "<script language=javascript> var strTrueFalse; ";

str = str + " alert('" + sMessage + "');";

str = str + "</script>";

Page.RegisterStartupScript("ppname", str);

 

Option 3:

 

In App_Code you can write common function that would be used in project.

 

public static void DisplayUserMessage(int nMessageTypeID)

    {

        string strScript = string.Empty;

        strScript = "<script type='text/javascript'>alert('";

        if (nMessageTypeID == 1)

        {

            strScript = strScript + Resources.Multilingual.Recordhasbeensavedsuccessfully;

           

        }

        else if (nMessageTypeID == 2)

        {

            strScript = strScript + Resources.Multilingual.Recordhasbeenupdatedsuccessfully;

        }

        else if (nMessageTypeID == 3)

        {

            strScript = strScript + Resources.Multilingual.Recordshasbeendeletedsuccessfully;

        }

        else if (nMessageTypeID == 4)

        {

            strScript = strScript + Resources.Multilingual.Recordshasbeeninactivateddeletedsuccessfully;

        }

      

        strScript = strScript + "');</script>";

        System.Web.UI.Page P = (System.Web.UI.Page)System.Web.HttpContext.Current.Handler;

        ScriptManager.RegisterStartupScript(P, typeof(System.Web.UI.Page), "alertScript", strScript, false);

    }

 

In application you can use like that

 

if (Condition satisfied)

{

 //Code for Update Logic

}

Else

{

  PMAP_Common_Methods.DisplayUserMessage(2);

}

 

shaik
Top achievements
Rank 1
 asked on 17 Feb 2010
1 answer
153 views
hi

I have a Radmenu in a master page. In this menu, there is an item name "Back"

I want to be able to go back to previous page when users click on the Back menu item.  

How should i go about it? Thanks a lot
Shinu
Top achievements
Rank 2
 answered on 17 Feb 2010
3 answers
123 views

I added a GridButtonColumn at runtime
        RadGrid1.Columns.Clear()
        Dim objGC_Command As New Telerik.Web.UI.GridButtonColumn
        objGC_Command.ButtonType = Telerik.Web.UI.GridButtonColumnType.PushButton
        objGC_Command.CommandName = "Select"
        objGC_Command.UniqueName = "Select"
        objGC_Command.Text = "..."
        RadGrid1.Columns.Add(objGC_Command)

I handled the event triggered by pressing the button 
        Protected Sub RadGrid1_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs)
                If e.CommandName = "Select" Then
                        ...

                End If
        End Sub

The problem is that this event is not fired when I press the button because then HTML generated is

        <input type="submit" name="ctl00$CPHMain$RadGrid1$ctl00$ctl04$ctl00" value="..." />

why?

Thanks for your attention and sorry for my English

Fabio

Princy
Top achievements
Rank 2
 answered on 17 Feb 2010
3 answers
175 views
Hello,

I'm currently working on a report project. I'm using a rdlc and a report viewer control to display reports. I've few chart reports too. I completed the project using the default chart controls available with the rdlc. But i've three issues with the rdlc chart control.

  1. I want to show the Y Axis reading on either sides (both the verticals)
  2. I need to have a subtitle apart from the chart title. The title and subtitle to display in separate lines with their own text formatting.
  3. I want to format the readings shown in the axis. For example, if the readings are 5000, 5100, 5200,.. etc, i want to show them as 5,000, 5,100, 5,200..etc. (or) 5000.00, 5100.00, 5200.00.. etc.

Can RadChart help me in 'all' the above issues?

Thank you.
Regards
NLV

NLV
Top achievements
Rank 1
 answered on 17 Feb 2010
3 answers
148 views
Hello,

I need to insert user's details into a table using radgrid.
I need to enter state and country of the user.
So, in Add new record -> I should be able to filter states based on countries using 2 dropdownlists.

So, in the selected index changed event of the country dropdown - i should able to find the both the dropdown controls.
But I am not able to do that. Only null is coming in that.

please, provide me a solution as soon as possible.

Since, I am not saving after selecting country, I suppose the radgrid events may not work in this scenario. I cannot write code in item created or itemdatabound.,, etc.,,..

please check the below image to have an idea... here district and schools are cascading dropdown's
http://i45.tinypic.com/117bdz6.jpg

Thanks in advance,
Gnanadeep
Princy
Top achievements
Rank 2
 answered on 17 Feb 2010
4 answers
401 views
i have this column on my rad grid:

            GridHyperLinkColumn GHyperLinkColumn = new GridHyperLinkColumn();  
            GvDetails.MasterTableView.Columns.Add(GHyperLinkColumn);  
            GHyperLinkColumn.DataTextField = "resource_nm";  
            GHyperLinkColumn.DataNavigateUrlFormatString = "ViewResourceRoleSkillInfo.aspx?rid={0}";  
            string[] arr = new string[1];  
            arr[0] = "resource_id";  
            GHyperLinkColumn.DataNavigateUrlFields = arr;  
            GHyperLinkColumn.UniqueName = "resource_nm";  
            GHyperLinkColumn.HeaderText = "Resource Name"; 

i need the target of that column to be on radwindow of my page,  any help on this?

thanks in advance...

Princy
Top achievements
Rank 2
 answered on 17 Feb 2010
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?