Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
323 views
I can't find any examples for this, we have Q3 2009 on our environment, I know you guys mentioned that this will be done in 'future' versions, does this version have this feature? I have 2 columns on my combobox using the headertemplate/itemtemplate. Is it possible to sort the items under each column by clicking on the header? Some code examples would be appreciated. Thanks.
Shinu
Top achievements
Rank 2
 answered on 17 Feb 2010
1 answer
89 views
Hope someone can help

I have a single RadDockZone with two RadDock's called Admin and Content.

On initial page load I dynamically load a user control into the Admin dock area and this control has a number of buttons on it labelled with various functions such as 'Categories', 'Companies' etc.

What I want to happen is if a button is pressed a user control that is related to that button is dynamically created and added to the controls collection of the content dock control. However, I would like it to do this without a full page postback.

Is this possible and if so can anyone tell me how to do it?

One other caveat is that the content user controls have there own RadAjaxPanels etc. on which may spoil things.

Thanks for any help.

Paul
Pero
Telerik team
 answered on 17 Feb 2010
1 answer
96 views
Hi, I am exporting a RadGrid to PDF. Everything works great.

I now want to add an href URL link into the PDF but outside of the grid. Is this possible?

My preference would be just below the Page Title.

Thanks,

Scott
Daniel
Telerik team
 answered on 17 Feb 2010
3 answers
268 views

Hi all

I have a problem with a paging RadListView with ToolTips on every Item, embedded in a UserControl.
On the first page, everything look well and works like expected (mouse over a thumbnail picture opens a tooltip with a bigger image).
On all other pages, the tooltip does not appear.
i compared the html source code of both pages and both pages are identical.

i tried to do it like in the online example: what's wrong?

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
    <AjaxSettings> 
        <telerik:AjaxSetting AjaxControlID="RadListViewTissue"
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="RadListViewTissue" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                <telerik:AjaxUpdatedControl ControlID="RadToolTipManager1" LoadingPanelID="RadAjaxLoadingPanel1" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
    </AjaxSettings> 
</telerik:RadAjaxManager> 
 
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" > 
</telerik:RadAjaxLoadingPanel> 
 
<telerik:RadToolTipManager ID="RadToolTipManager1" OffsetY="0" HideEvent="LeaveToolTip"  
    Width="400px" Height="170px" runat="server"  
    OnAjaxUpdate="OnAjaxUpdate" RelativeTo="Element"  ShowDelay="500"  
    Animation="Fade" Sticky="True"
</telerik:RadToolTipManager> 
 
<telerik:RadFormDecorator ID="RadFormDecorator1" Runat="server"  /> 
 
<telerik:RadListView ID="RadListViewTissue" runat="server"  
    onitemdatabound="RadListViewTissue_ItemDataBound" DataKeyNames="contentID"  
    ItemPlaceholderID="TissueItemContainer"  
    onselectedindexchanged="RadListViewTissue_SelectedIndexChanged" 
    AllowPaging="true" onneeddatasource="RadListViewTissue_NeedDataSource"  
    onpageindexchanged="RadListViewTissue_PageIndexChanged"  > 

        protected void Page_Load(object sender, EventArgs e) 
        { 
            if (!Page.IsPostBack) 
            { 
                RadListViewTissue.DataSource = getTissueList(); 
                RadListViewTissue.DataBind(); 
            } 
        } 
 
        protected DataTable getTissueList() 
        { 
// .. 
            DataTable dtTissue = (DataTable)Session[bufferedTissueList]; 
// .. 
            return dtTissue; 
        } 
 
        protected void RadListViewTissue_PageIndexChanged(object sender, RadListViewPageChangedEventArgs e) 
        { 
            if (e.CommandName == "Sort" || e.CommandName == "Page"
            { 
                RadToolTipManager1.TargetControls.Clear(); 
            }  
            RadListViewTissue.CurrentPageIndex = e.NewPageIndex; 
            RadListViewTissue.DataSource = getTissueList(); 
            RadListViewTissue.DataBind(); 
 
        } 
 
        protected void RadListViewTissue_NeedDataSource(object sender, RadListViewNeedDataSourceEventArgs e) 
        { 
            RadListViewTissue.DataSource = getTissueList(); 
        } 
 
        protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args) 
        { 
            this.UpdateToolTip(args.Value, args.UpdatePanel); 
        } 
 
        private void UpdateToolTip(string elementID, UpdatePanel panel) 
        { 
            Control ctrl = Page.LoadControl("~/Modules/IWC_FabricDetail.ascx"); 
            panel.ContentTemplateContainer.Controls.Add(ctrl); 
            IWC_FabricDetail details = (IWC_FabricDetail)ctrl; 
            details.ContentID = elementID; 
        } 
 
        protected void RadListViewTissue_ItemDataBound(object sender, RadListViewItemEventArgs e) 
        { 
            if (e.Item.ItemType == RadListViewItemType.DataItem || e.Item.ItemType == RadListViewItemType.AlternatingItem) 
            { 
                Control target = e.Item.FindControl("thumbImage"); 
                if (!Object.Equals(target, null)) 
                { 
                    if (!Object.Equals(this.RadToolTipManager1, null)) 
                    { 
                        // add to tooltip manager 
                        string keyValue = (e.Item as RadListViewDataItem).GetDataKeyValue("contentID").ToString(); 
                        this.RadToolTipManager1.TargetControls.Add(target.ClientID, keyValue, true); 
                    } 
                } 
            } 
        } 
 
 

thanks a lot for help!

best regards
Simon
Svetlina Anati
Telerik team
 answered on 17 Feb 2010
4 answers
183 views
We have been using the RadEditor's diff engine for some time now to compare strings, and it has worked quite well for us. Recently, however, we have run into a problem where were are seeing the exception "system.outofmemoryexception was thrown" when comparing two long XML strings.

Here is how we use the diff engine:

Dim strValue1 As String  
Dim strValue2 As String  
Dim strResult As String  
Dim diff As New Diff.DiffEngine  
 
' ...code here assigns long XML strings to strvalue1 and strvalue2; srvalue1's length = 93145; strvalue2's length = 113236...  
 
strResult = diff.GetDiffs(strValue2, strValue1)  
 

Are there length limitations for the strings that can be passed to the diff engine?

Thanks,

Geoff LeBlond
Silverchair Science & Communications
Lini
Telerik team
 answered on 17 Feb 2010
3 answers
137 views
Hello,

I am testing the Full RadEditor for MOSS in list items, and it looks like it doesn't work in Internet Explorer 6 and 8 (I haven't tested with 7). More specifically the content of the RadEditor is never persisted.

However, it works fine with FireFox and Chrome.

Is anyone from Telerik aware of this issue?

Thanks in advance for your help,

Raphael.
Stanimir
Telerik team
 answered on 17 Feb 2010
1 answer
97 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
132 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
92 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
132 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?