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;
}
}
​