ParentChildItems = function that returns a List<Child> object full of children...
foreach (Child child in ParentChildItems) { RadTreeView treeView = new RadTreeView(); RadPanelItem item = new RadPanelItem(child.Display); RadPanelItem itemFolder = new RadPanelItem(); item.Value = child.ChildID; List<Object> folders = new Child(General.DB).findAllFoldersByDrawer(child.ChildID); if (folders.Count > 1) { treeView.ID = child.ChildID + "_tView"; treeView.NodeClick += new RadTreeViewEventHandler(treeView_NodeClick); treeView.CheckChildNodes = true; RadTreeNodeBinding binding = new RadTreeNodeBinding(); binding.Expanded = true; treeView.DataBindings.Add(binding); treeView.DataTextField = "Display"; treeView.DataFieldID = "ChildID"; treeView.DataValueField = "ChildID"; treeView.DataFieldParentID = "ChildChildID"; treeView.DataSource = folders; treeView.ShowLineImages = true; treeView.DataBind(); itemFolder.Controls.Add(treeView); item.Items.Add(itemFolder); } pnlDrawers.Items.Add(item); if (folders.Count > 1) { AjaxManager.AjaxSettings.AddAjaxSetting(AjaxManager, treeView, RadAjaxLoadingPanel1, UpdatePanelRenderMode.Inline); AjaxManager.AjaxSettings.AddAjaxSetting(pnlDrawers, treeView, RadAjaxLoadingPanel1, UpdatePanelRenderMode.Inline); AjaxManager.AjaxSettings.AddAjaxSetting(treeView, treeView, RadAjaxLoadingPanel1, UpdatePanelRenderMode.Inline); } }public class Child { #region properties public string ChildID { get; set; } public string ParentID { get; set; } public string ChildChildID { get; set; } public string Label { get; set; } public string FirstName { get; set; } public string MName { get; set; } public string Lastname { get; set; } }
private void PopulateQuestion()
{
lblSectionName.Text =
this.Question.PageTitle;
divSection.Visible = (
this.Question.PageTitle != string.Empty);
lblQuestionSequence.Text =
"Q." + this.Question.Sequence.ToString() + " - ";
lblQuestionText.Text =
this.Question.QuestionText;
// Set help icon alt text
//imgHelp.AlternateText = this.Question.AdditionalContent;
//imgHelp.Attributes.Add("title", this.Question.AdditionalContent); // For FireFox
// string s = "Khwaja \n saiyed";
// string newstr = s.Replace("\n", "<br/>");
//this.RadToolTipManager1.TargetControls.Add(imgHelp.ClientID, s.ToString(), true);
this.RadToolTipManager1.TargetControls.Add(imgHelp.ClientID, this.Question.AdditionalContent.ToString(), true);
}
protected void RadToolTipManager1_AjaxUpdate(object sender, Telerik.Web.UI.ToolTipUpdateEventArgs e)
{
Label lblInsideToolTip = new Label();
lblInsideToolTip.Text = e.Value;
e.UpdatePanel.ContentTemplateContainer.Controls.Add(lblInsideToolTip);
}
I hope this makes sense to all of you.
Thanks
Khwaja
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TelerikRadEditorPaste.Default" %><%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %><!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title></head><body> <form id="form1" runat="server"> <script type="text/javascript"> function onClientPasteHtml(editor, args) { var commandName = args.get_commandName(); if (commandName == "Paste") { alert('OK --> CommandName = ' + commandName); } else { alert('NOT OK --> CommandName = ' + commandName); } } </script> <asp:ScriptManager runat="server"></asp:ScriptManager> <telerik:RadEditor ID="radEditorMandate" runat="server" Width="856px" Height="590px" StripFormattingOptions="NoneSupressCleanMessage, ConvertWordLists, MSWordNoMargins" OnClientPasteHtml="onClientPasteHtml"> <ContextMenus> <telerik:EditorContextMenu TagName="*"> <telerik:EditorTool Name="Paste" /> </telerik:EditorContextMenu> </ContextMenus> <Tools> <telerik:EditorToolGroup> <telerik:EditorTool Name="Paste" /> </telerik:EditorToolGroup> </Tools> <CssFiles> <telerik:EditorCssFile Value="~/RadEditor.css" /> </CssFiles> </telerik:RadEditor> </form></body></html>

I drag a RadScheduler to my webform, and start debug, then I get an error message as following. Please tell me how to solve the problem. Thank you very much for your helping.
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
|
[ArgumentException: DataKeyField, DataSubjectField, DataStartField and DataEndField are required for databinding] |

<telerik:RadGrid ID="RadGridBuyWarrants" runat="server"
OnNeedDataSource="RadGridBuyWarrants_NeedDataSource" AutoGenerateColumns="false"
AllowSorting="true" AllowPaging="true" PageSize="20"
ShowGroupPanel="false" onitemcommand="RadGridBuyWarrants_ItemCommand"
onitemdatabound="RadGridBuyWarrants_ItemDataBound">
<PagerStyle Mode="NumericPages" />
<ClientSettings AllowGroupExpandCollapse="True" AllowDragToGroup="True" AllowColumnsReorder="True"/>
<MasterTableView Width="100%" GroupLoadMode="Server">
foreach (GridItem item in RadGridBuyWarrants.MasterTableView.Controls[0].Controls)
{
if (item is GridGroupHeaderItem)
{
item.Expanded =
true;
}
}