Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
75 views
I want to set focus on a node in RadSiteMap. I handle the NodeDataBound event, detect the node and call node.Focus(). Nevertheless the focus doesn't get set.
Yana
Telerik team
 answered on 07 Dec 2010
1 answer
82 views
I have a tag cloud control that gets populated by by data that gets returned from a stored procedure.

I want the tag cloud items clickable. On clicking any item in the tag cloud, it will redirect the user to a different page.
For eg. - If i click an item named "Architecture", the user gets redirected to the page "Default.aspx?CAT=Architecture"

But for this to happen, I first need to obtain the value of the item that was clicked by the user. I am not able to do that. The demo has nothing on this.

Can somebody please shed some light? I have a small tag cloud module for a website that needs to be done as quickly as possible.
Any useful insights will be highly appreciated.
Pero
Telerik team
 answered on 07 Dec 2010
1 answer
62 views
Does radScheduler provide reporting feature?  and if not is there any other way to integrate reports with radScheduler..
Veronica
Telerik team
 answered on 07 Dec 2010
3 answers
79 views
Hello - I have a requirement to use a RadDateTimePicker control and have certain dates disabled/greyed-out based on certain sets of criteria. I've seen posts where this can be accomplished with the ASP.NET Calendar (without the TImePicker), as well as the WinForms RadDateTimePicker. In both of those cases, it seems you need to access the SpecialDays collection of a RadCalendar instance. In the WinForms example I found at: http://www.telerik.com/community/forums/winforms/calendar-and-datetimepicker/raddatetimepicker-calendar.aspx, you need to declare a variable of type RadDateTimePickerCalendar, then do a type-cast to ge to the actual Calendar "part" of that control. Then from there you can set the SpecialDays collection. Is there a an ASP.NET AJAX equivalent to this? I can't seem to find it. Thanks.

Matt
Tsvetina
Telerik team
 answered on 07 Dec 2010
1 answer
76 views

I'm not sure if this is the correct terminology, but I think it's the Legend ItemMarker that I want.  It's the symbol in the legend whether it's a squars, circle, triangle,etc that I want to change the color of programatically.  How do I programatically change the fill color and border of these objects?

The following line of code provides an index out of range error message.
RadChart1.Chart.Legend.Items(0).Appearance.FillStyle.MainColor = Drawing.Color.FromArgb(155, 155, 155)

 

 

 

Thanks,

Brian

Evgenia
Telerik team
 answered on 07 Dec 2010
1 answer
141 views
I using teleric control in my proejct. In teleric grid when I am entering the (|) pipe symbal for filtering then I am getting error, Please can you provide me solution for that. 

Regards,

Atchyut
Veli
Telerik team
 answered on 07 Dec 2010
3 answers
85 views
Hi,

I've added the following property in my config file to forbid javascript code in the RADEditor:

<property name="AllowScripts">False</property>

I've noticed the following:
- an "onclick" attribute of a href in a "page content" where the telerik editor is activated, is stripped out when saving the page.
- an "onclick" attribute of a href in a "Telerik RADeditor webpart", is not stripped out when saving the page.

How can I forbid the onclick attribute in a RADeditor webpart? I want it to be stripped out as well in the webpart.

Kind regards,

Jean

 

Stanimir
Telerik team
 answered on 07 Dec 2010
1 answer
213 views
Is it possible to use a RadCalender to filter a RadGrid connected to a SQLDataSource?

This is how simple it is using standard .NET controls:

<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:TestConnectionString %>"
        SelectCommand="SELECT [name], [id], [dtime] FROM [test] WHERE ([dtime] = @dtime)">
        <SelectParameters>
            <asp:ControlParameter ControlID="Calendar1" Name="dtime" PropertyName="SelectedDate"
                Type="DateTime" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="id"
        DataSourceID="SqlDataSource1">
        <Columns>
            <asp:BoundField DataField="name" HeaderText="name" SortExpression="name" />
            <asp:BoundField DataField="id" HeaderText="id" InsertVisible="False" ReadOnly="True"
                SortExpression="id" />
            <asp:BoundField DataField="dtime" HeaderText="dtime" SortExpression="dtime" />
        </Columns>
    </asp:GridView>
    <asp:Calendar ID="Calendar1" runat="server"></asp:Calendar>

If I attempt the same thing using RadControls, I get the following Error.

SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.


Here is the code I am using for the same funtionallity above using RadControls:

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" %>
  
<%@ 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>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadCalendar ID="RadCalendar1" Runat="server" AutoPostBack="True" 
        EnableMultiSelect="False" SelectedDate="" ViewSelectorText="x">
    </telerik:RadCalendar>
    <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1" 
        GridLines="None">
<MasterTableView AutoGenerateColumns="False" DataSourceID="SqlDataSource1">
<CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
  
<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
  
<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
    <Columns>
        <telerik:GridBoundColumn DataField="DateSubNeeded" DataType="System.DateTime" 
            HeaderText="DateSubNeeded" SortExpression="DateSubNeeded" 
            UniqueName="DateSubNeeded">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Reason" HeaderText="Reason" 
            SortExpression="Reason" UniqueName="Reason">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="FullName" HeaderText="FullName" 
            ReadOnly="True" SortExpression="FullName" UniqueName="FullName">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="EmailAddress" HeaderText="EmailAddress" 
            SortExpression="EmailAddress" UniqueName="EmailAddress">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Office" HeaderText="Office" 
            SortExpression="Office" UniqueName="Office">
        </telerik:GridBoundColumn>
    </Columns>
</MasterTableView>
    </telerik:RadGrid>
    <p>
         </p>
    <p>
        <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
        </telerik:RadScriptManager>
    </p>
    <p>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:Human_ResourcesConnectionString %>" 
            SelectCommand="SELECT [DateSubNeeded], [Reason], [FullName], [EmailAddress], [Office] FROM [vw_SCS_SubRequests] WHERE ([DateSubNeeded] = @DateSubNeeded)">
            <SelectParameters>
                <asp:ControlParameter ControlID="RadCalendar1" Name="DateSubNeeded" 
                    PropertyName="SelectedDate" Type="DateTime" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
         </p>
    </form>
</body>
</html>


Tsvetina
Telerik team
 answered on 07 Dec 2010
2 answers
128 views
Hi!

This is my scenario:
I dynamically load my target control "m_View_lnk_Username" in my "RadToolTipManager1" but when I click with the mouse on the Hyperlink the page don't call "OnAjaxUpdate" methods. Why?

HTML:
<telerik:RadToolTipManager ID="RadToolTipManager1" HideEvent="ManualClose"
        Width="600" Height="500" runat="server" EnableShadow="true" OnAjaxUpdate="OnAjaxUpdate"
        RelativeTo="Element" Position="BottomRight" Modal="true" ShowEvent="OnClick">
    </telerik:RadToolTipManager>

<asp:HyperLink ID="m_View_lnk_Username" runat="server" NavigateUrl="#" />

C# (Page_Load method):
this.RadToolTipManager1.TargetControls.Add( m_Update_lnk_Username.ClientID, "104", true );


Thanks in advance,

Francesco
Lorenzo
Top achievements
Rank 1
 answered on 07 Dec 2010
5 answers
136 views

The page has a panel bar which dynamically loads TreeViews as PanelItems.  To prevent losing the trees during a postback, a custom control is loaded in the XmlHttpPanel.  In order to get the correct control and pass all desired information, I need to access multiple custom attributes of the selected node.  Any suggestions on how to either pass or access the selected node server side (from within the "XmlHttpPanel_ServiceRequest" without performing a postback? 

Update to post: The trees are gone upon the service request as well and since the tree and nodes or not serializable the information cannot be stored in the viewstate either.  What was the point of making a control that loses its contents upon a postback?  Looks like the path will be to stuff everything into a long string for use as the "value" on the service call then parse out what's needed.  For such an impressive toolset overall, seems like the PanelBar is a tad lacking.  Unless of course, I missing the obvious which is always a possibility.

Below is an overly simplified view of what is being attempted.

<!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:RadScriptBlock ID="RadScriptBlock1" runat="server">
        <script language="javascript" type="text/javascript">
            function NodeClicked(sender, args) {
                var node = args.get_node();
                var panel = $find("<%= RadXmlHttpPanel1.ClientID %>");
                panel.set_value(node.get_text());
            }
        </script>
    </telerik:RadScriptBlock>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <table>
        <tr>
            <td>
                <telerik:RadPanelBar ID="RadPanelBar1" runat="server">
                </telerik:RadPanelBar>
            </td>
            <td>
                <telerik:RadXmlHttpPanel ID="RadXmlHttpPanel1" runat="server" OnServiceRequest="XmlHttpPanel_ServiceRequest">
                </telerik:RadXmlHttpPanel>
            </td>
        </tr>
    </table>
    </form>
</body>
</html>

public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
                LoadRootContent();
        }
        private void LoadRootContent()
        {
            RadPanelItem myPanelItem = new RadPanelItem("Item 1");
            RadTreeView myTreeView = new RadTreeView();
            myTreeView.OnClientNodeClicked = "NodeClicked";
            //Build a node
            RadTreeNode node1 = new RadTreeNode("TreeNode 1");
            node1.Category = "Customers";
            node1.Attributes.Add("CustomerID", "123");
            myTreeView.Nodes.Add(node1);
            //Build another node
            RadTreeNode node2 = new RadTreeNode("TreeNode 2");
            node2.Category = "Prospects";
            node2.Attributes.Add("ProspectID", "456");
            myTreeView.Nodes.Add(node2);
  
            //Add the tree to the PanelItem - this could happen more than once for each PanelItem
            myPanelItem.Controls.Add(myTreeView);
            //Add the item to the PanelBar - this would occur for multiple items
            RadPanelBar1.Items.Add(myPanelItem);
        }
        protected void XmlHttpPanel_ServiceRequest(object sender, RadXmlHttpPanelEventArgs e)
        {
            string val = e.Value;
            if (val == "TreeNode 1")
            {
                RadXmlHttpPanel1.Controls.Add(LoadControl("Test1.ascx"));
            }
            if (val == "TreeNode 2")
                RadXmlHttpPanel1.Controls.Add(LoadControl("Test2.ascx"));
  
        }
    }

Any suggestions or thoughts are welcome.
Thanks in advance.
Pero
Telerik team
 answered on 07 Dec 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?