<telerik:RadEditor ID="EdtDesc" runat="server" EditModes="Design" OnClientLoad="LimitCharacters"
OnClientPasteHtml="OnClientPasteHtml" >
<Languages>
<telerik:SpellCheckerLanguage Code="en-US" Title="English" />
</Languages>
<Tools>
<telerik:EditorToolGroup>
<telerik:EditorTool Name="Undo" />
<telerik:EditorTool Name="Redo" />
<telerik:EditorSeparator Visible="true" />
<telerik:EditorTool Name="Bold" />
<telerik:EditorTool Name="Italic" />
<telerik:EditorTool Name="Underline" />
<telerik:EditorSeparator Visible="true" />
<telerik:EditorTool Name="JustifyLeft" />
<telerik:EditorTool Name="JustifyCenter" />
<telerik:EditorTool Name="JustifyRight" />
<telerik:EditorTool Name="JustifyFull" />
<telerik:EditorSeparator Visible="true" />
<telerik:EditorTool Name="AjaxSpellCheck" />
</telerik:EditorToolGroup>
</Tools>
<Modules>
<telerik:EditorModule Name="RadEditorStatistics" />
</Modules>
</telerik:RadEditor>
<script type="text/javascript">
var editorList = new Object();
var editorLengthArray = [4000, 30];
var counter = 0;
function isAlphaNumericKey(keyCode) {
if ((keyCode > 47 && keyCode < 58) || (keyCode > 64 && keyCode < 91)) {
return true;
}
return false;
}
function LimitCharacters(editor) {
editorList[editor.get_id()] = editorLengthArray[counter];
counter++;
editor.attachEventHandler("onkeydown", function(e) {
e = (e == null) ? window.event : e;
if (isAlphaNumericKey(e.keyCode)) {
var maxTextLength = editorList[editor.get_id()];
textLength = editor.get_text().length;
if (textLength >= maxTextLength) {
alert('You are not able to type more than ' + maxTextLength + ' symbols!');
e.returnValue = false;
}
}
});
var element = document.all ? editor.get_document().body : editor.get_document();
$telerik.addExternalHandler(element, "paste", function(e) {
e = (e == null) ? window.event : e;
var maxTextLength = editorList[editor.get_id()];
textLength = editor.get_text().length;
var clipboardLength = window.clipboardData.getData("Text").length;
textLength += clipboardLength;
if (textLength >= maxTextLength) {
alert('You are not able to type more than ' + maxTextLength + ' symbols!');
e.returnValue = false;
return false;
}
});
}
function CalculateLength(editor, value) {
var textLength = editor.get_text().length;
var clipboardLength = value.length;
textLength += clipboardLength;
return textLength;
}
function OnClientPasteHtml(editor, args) {
var maxTextLength = editorList[editor.get_id()];
var commandName = args.get_commandName();
var value = args.get_value();
if (commandName == "PasteFromWord"
|| commandName == "PasteFromWordNoFontsNoSizes"
|| commandName == "PastePlainText"
|| commandName == "PasteAsHtml"
|| commandName == "Paste") {
var textLength = CalculateLength(editor, value);
if (textLength >= maxTextLength) {
alert('You are not able to type more than ' + maxTextLength + ' symbols!');
args.set_cancel(true);
}
}
}
</script>
Hope to find a solution,
Many Thanks!!

{Sys.UI.Control.initializeBase(
this);this._element=a;a.control=this}
If I place the tooltip outside the panel it's possible to make postbacks inside the tooltip. But then everything stops working when a postback is made in the outermost panel.
<
asp:Panel ID="pnlProducts" runat="server" style="display:inline">
<asp:TextBox ID="txtProductID" runat="server" Width="50" MaxLength="8"></asp:TextBox>
<
telerik:RadToolTip ID="RadToolTip1" runat="server" Animation="None" ContentScrolling="None" ShowEvent="OnClick" HideEvent="ManualClose" Width="370" Height="150" ShowDelay="0" HideDelay="0" TargetControlID="txtProductID">
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
<asp:Button ID="Button1" runat="server" Text="Do postback" CausesValidation="false" />
</telerik:RadAjaxPanel>
</
telerik:RadToolTip>
</asp:Panel>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableAJAX="true">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="pnlProducts">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="pnlProducts" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
| <Telerik:RadTreeView ID="RadTreeView2" runat="server" Visible="true" Runat="server" Skin="Default" EnableEmbeddedSkins="false" EnableEmbeddedBaseStylesheet="true" EnableEmbeddedScripts="true"></Telerik:RadTreeView> |

| <telerik:RadChart ID="RadChart1" runat="server"> |
| <Series> |
| <telerik:ChartSeries Type="Spline"> |
| <Appearance> |
| <TextAppearance TextProperties-Font="Arial, 8.25pt" /> |
| <PointMark Visible="True" Dimensions-AutoSize="false" Dimensions-Height="10px" Dimensions-Width="10px"> |
| <FillStyle MainColor="#FF0000" FillType="solid"> |
| </FillStyle> |
| </PointMark> |
| <LineSeriesAppearance Width="5" /> |
| <FillStyle MainColor="#999999" FillType="Solid"> |
| </FillStyle> |
| </Appearance> |
| <Items> |
| <telerik:ChartSeriesItem YValue="1.3" ActiveRegion-Tooltip="test" > |
| </telerik:ChartSeriesItem> |
| <telerik:ChartSeriesItem YValue="6"> |
| </telerik:ChartSeriesItem> |
| <telerik:ChartSeriesItem YValue="2"> |
| </telerik:ChartSeriesItem> |
| <telerik:ChartSeriesItem YValue="8"> |
| </telerik:ChartSeriesItem> |
| </Items> |
| </telerik:ChartSeries> |
| </Series> |
| </telerik:RadChart> |
| <Topics> |
| <Topic TopicId="1"> |
| <TopicName>Test</TopicName> |
| <Categories> |
| <Category>Category 1</Category> |
| <Category>Category 2</Category> |
| </Categories> |
| <FileName>Test.html</FileName> |
| </Topic> |
| </Topics> |
| <telerik:RadGrid ID="gridLearningList" runat="server"> |
| <MasterTableView AutoGenerateColumns="false" DataKeyNames="TopicId"> |
| <Columns> |
| <telerik:GridBoundColumn |
| DataField="TopicName" |
| HeaderText="Learning topic"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn |
| DataField="Categories" |
| HeaderText="Category"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn |
| DataField="FileName" |
| HeaderText="File name"> |
| </telerik:GridBoundColumn> |
| </Columns> |
| </MasterTableView> |
| </telerik:RadGrid> |
| <asp:XmlDataSource ID="dsLearningList" runat="server" /> |
| private void PopulateLearningList() |
| { |
| dsLearningList.DataFile = "~/App_Data/OnlineLearningTopics.xml"; |
| gridLearningList.DataSourceID = "dsLearningList"; |
| gridLearningList.DataBind(); |
| } |
| <asp:Panel ID="pnlRadGrid" runat="server" style="table-layout:fixed" > |
| <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" PageSize="8" |
| AllowSorting="True" AllowPaging="True" AllowMultiRowSelection="False" |
| OnNeedDataSource="RadGrid1_NeedDataSource" |
| OnItemCommand="RadGrid1_ItemCommand" |
| OnInsertCommand="RadGrid1_InsertCommand" |
| OnUpdateCommand="RadGrid1_UpdateCommand" |
| OnItemCreated="RadGrid1_ItemCreated" |
| > |
| <PagerStyle Mode="NextPrevNumericAndAdvanced" HorizontalAlign="Center" /> |
| <MasterTableView EnableTheming="false" InsertItemPageIndexAction="ShowItemOnCurrentPage" InsertItemDisplay="Bottom" DataKeyNames="ProcessingSystemResponseKey" Width="100%" GridLines="None" AllowMultiColumnSorting="True" |
| CommandItemDisplay="Bottom" TableLayout="Auto" ShowHeadersWhenNoRecords="true"> |
| <Columns> |
| <telerik:GridTemplateColumn> |
| <ItemTemplate> |
| <asp:Button runat="server" CommandName="Edit" CssClass="rgEdit" ToolTip="Edit" /> |
| </ItemTemplate> |
| </telerik:GridTemplateColumn> |
| <telerik:GridTemplateColumn |
| DataField="ProcessingSystemResponseKey" |
| HeaderText="Key" |
| SortExpression="ProcessingSystemResponseKey" |
| UniqueName="ProcessingSystemResponseKey"> |
| <ItemTemplate> |
| <a href="javascript: void(0)" |
| onclick="window.open('<%# GetHelpFileUrl(Eval("HelpTopicFile")) %>'); return false;"> |
| <%# Eval("ProcessingSystemResponseKey")%> |
| </a> |
| </ItemTemplate> |
| </telerik:GridTemplateColumn> |
| <telerik:GridBoundColumn UniqueName="InpatientResultKindDesc" SortExpression="InpatientResultKindDesc" HeaderText="Inpatient Result" |
| DataField="InpatientResultKindDesc"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn UniqueName="OutPatientResultKindDesc" SortExpression="OutPatientResultKindDesc" HeaderText="Outpatient Result" |
| DataField="OutPatientResultKindDesc"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn UniqueName="Description" SortExpression="Description" |
| HeaderText="Description" DataField="Description"> |
| </telerik:GridBoundColumn> |
| <telerik:GridCheckBoxColumn UniqueName="OverrideFlag" SortExpression="OverrideFlag" |
| HeaderText="Allow MASTRRâ„¢ Agency To Change" DataField="OverrideFlag"> |
| </telerik:GridCheckBoxColumn> |
| </Columns> |
| <EditFormSettings UserControlName="../AdminUC/ManageAdjudicationErrorsUC.ascx" EditFormType="WebUserControl"> |
| </EditFormSettings> |
| <CommandItemSettings AddNewRecordText="" |
| RefreshText="" /> |
| </MasterTableView> |
| <ClientSettings AllowKeyboardNavigation="True"> |
| <Selecting AllowRowSelect="False" /> |
| </ClientSettings> |
| </telerik:RadGrid> |
| /// <summary> |
| /// The insert event. Occurs when user clicks the insert button on the insert form. |
| /// </summary> |
| /// <param name="source"></param> |
| /// <param name="e"></param> |
| protected void RadGrid1_InsertCommand(object source, GridCommandEventArgs e) |
| { |
| // Obtain the usercontrol from the grid's property |
| UserControl uc = (UserControl)e.Item.FindControl(GridEditFormItem.EditFormUserControlID); |
| // Create object to store and validate |
| AdjudicationErrors adjudicationErrors = new AdjudicationErrors(); |
| // Obtain array to iterate through to determine if inserted primary key is unique. |
| String [] gridKeys = e.Item.OwnerTableView.DataKeyNames; |
| // Validate and Assign values |
| if (CheckSetProperFields(uc, adjudicationErrors, gridKeys)) |
| { |
| try |
| { |
| // Insert the database record |
| Boolean success = AdjudicationErrors.SaveAdjudicationErrors(adjudicationErrors); |
| } |
| catch (Exception) |
| { |
| e.Canceled = true; |
| throw; |
| } |
| } |
| else |
| { |
| e.Canceled = true; |
| // Because of the combos the user control doesn't obtain the dropdowns unless the item is |
| // re-obtained |
| GridEditableItem insertedItem = e.Item.OwnerTableView.GetInsertItem(); |
| //Format the grid's insert form |
| SetInsertProperties(insertedItem); |
| insertedItem.OwnerTableView.Rebind(); |
| } |
| public partial class Categories_GetTreeByParentResult |
| { |
| private System.Nullable<int> _Id; |
| private System.Nullable<int> _ParentId; |
| private string _Title; |
| private string _Description; |
| private System.Nullable<int> _Ordering; |
| private System.Nullable<System.DateTime> _CreatedDate; |
| private string _CreatedBy; |
| private System.Nullable<System.DateTime> _ModifiedDate; |
| private string _ModifiedBy; |
| private System.Nullable<bool> _IsSearchable; |
| private System.Nullable<byte> _VisiblityIndex; |
| private System.Nullable<int> _RecursionLevel; |
| private string _Path; |
| public Categories_GetTreeByParentResult() |
| { |
| } |
| [Column(Storage="_Id", DbType="Int")] |
| public System.Nullable<int> Id |
| { |
| get |
| { |
| return this._Id; |
| } |
| set |
| { |
| if ((this._Id != value)) |
| { |
| this._Id = value; |
| } |
| } |
| } |
| [Column(Storage="_ParentId", DbType="Int")] |
| public System.Nullable<int> ParentId |
| { |
| get |
| { |
| return this._ParentId; |
| } |
| set |
| { |
| if ((this._ParentId != value)) |
| { |
| this._ParentId = value; |
| } |
| } |
| } |
| [Column(Storage="_Title", DbType="NVarChar(250)")] |
| public string Title |
| { |
| get |
| { |
| return this._Title; |
| } |
| set |
| { |
| if ((this._Title != value)) |
| { |
| this._Title = value; |
| } |
| } |
| } |
| [Column(Storage="_Description", DbType="NVarChar(300)")] |
| public string Description |
| { |
| get |
| { |
| return this._Description; |
| } |
| set |
| { |
| if ((this._Description != value)) |
| { |
| this._Description = value; |
| } |
| } |
| } |
| [Column(Storage="_Ordering", DbType="Int")] |
| public System.Nullable<int> Ordering |
| { |
| get |
| { |
| return this._Ordering; |
| } |
| set |
| { |
| if ((this._Ordering != value)) |
| { |
| this._Ordering = value; |
| } |
| } |
| } |
| [Column(Storage="_CreatedDate", DbType="SmallDateTime")] |
| public System.Nullable<System.DateTime> CreatedDate |
| { |
| get |
| { |
| return this._CreatedDate; |
| } |
| set |
| { |
| if ((this._CreatedDate != value)) |
| { |
| this._CreatedDate = value; |
| } |
| } |
| } |
| [Column(Storage="_CreatedBy", DbType="NVarChar(50)")] |
| public string CreatedBy |
| { |
| get |
| { |
| return this._CreatedBy; |
| } |
| set |
| { |
| if ((this._CreatedBy != value)) |
| { |
| this._CreatedBy = value; |
| } |
| } |
| } |
| [Column(Storage="_ModifiedDate", DbType="SmallDateTime")] |
| public System.Nullable<System.DateTime> ModifiedDate |
| { |
| get |
| { |
| return this._ModifiedDate; |
| } |
| set |
| { |
| if ((this._ModifiedDate != value)) |
| { |
| this._ModifiedDate = value; |
| } |
| } |
| } |
| [Column(Storage="_ModifiedBy", DbType="NVarChar(50)")] |
| public string ModifiedBy |
| { |
| get |
| { |
| return this._ModifiedBy; |
| } |
| set |
| { |
| if ((this._ModifiedBy != value)) |
| { |
| this._ModifiedBy = value; |
| } |
| } |
| } |
| [Column(Storage="_IsSearchable", DbType="Bit")] |
| public System.Nullable<bool> IsSearchable |
| { |
| get |
| { |
| return this._IsSearchable; |
| } |
| set |
| { |
| if ((this._IsSearchable != value)) |
| { |
| this._IsSearchable = value; |
| } |
| } |
| } |
| [Column(Storage="_VisiblityIndex", DbType="TinyInt")] |
| public System.Nullable<byte> VisiblityIndex |
| { |
| get |
| { |
| return this._VisiblityIndex; |
| } |
| set |
| { |
| if ((this._VisiblityIndex != value)) |
| { |
| this._VisiblityIndex = value; |
| } |
| } |
| } |
| [Column(Storage="_RecursionLevel", DbType="Int")] |
| public System.Nullable<int> RecursionLevel |
| { |
| get |
| { |
| return this._RecursionLevel; |
| } |
| set |
| { |
| if ((this._RecursionLevel != value)) |
| { |
| this._RecursionLevel = value; |
| } |
| } |
| } |
| [Column(Storage="_Path", DbType="VarChar(2000)")] |
| public string Path |
| { |
| get |
| { |
| return this._Path; |
| } |
| set |
| { |
| if ((this._Path != value)) |
| { |
| this._Path = value; |
| } |
| } |
| } |
| } |
Hi ,
My team is using telerik liscenced version .
We are using telerik ajax update panel for telerik tab strip for better performance.
We have 3 tabs and each tab is having one rad grid.
Also we are using
<
ClientEvents OnGridCreated = "GridCreatedAlternateIdTab" />
for fixing grid width & height in each tab grids.
As we are using
RenderSelectedPageOnly
="true"
in multipage so when ever we are clicking on any tab "Microsoft JScript runtime error: 'GridCreatedAlternateIdTab' is undefined " javascript error is poping up.
Meansit is not able to find OnGridCreated = "GridCreatedAlternateIdTab" javascript method.
Can you please provide a work around for this javascript error.
Below is the main tabstrip code.
<
table id="Table3" runat="server" width="100%" height="50%" style="background-color: #FFFFFF;">
<tr>
<td style="background-color: #FFFFFF">
<div id="dvMessage" style="display: none" runat="server">
<asp:Label ID="lblMessage" runat="server" Font-Bold="true" CssClass="ErrorMessage"
BorderStyle="None"></asp:Label>
</div>
</td>
</
tr>
<
td align="left">
<telerik:RadTextBox ID="radTextBoxParentId" runat="server" Skin="Office2007" InvalidStyleDuration="100"
Width="75%" BorderStyle="Inset">
</telerik:RadTextBox>
<asp:ImageButton ID="imgParentIdLookUp" CausesValidation="false" runat="server" OnClientClick="return ParentIdLookup();"
ImageUrl="../Resources/Images/lookup.png" ImageAlign="AbsMiddle" OnClick="imgParentIdLookUp_Click" />
</td>
<tr>
<td colspan="5">
<telerik:RadAjaxLoadingPanel runat="server" ID="LoadingPanel1">
</telerik:RadAjaxLoadingPanel>
<telerik:RadAjaxManager runat="server" ID="RadAjaxManager1">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="radTabStrip">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="radTabStrip" />
<telerik:AjaxUpdatedControl ControlID="radMultiPage" LoadingPanelID="LoadingPanel1" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="radMultiPage">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="radMultiPage" LoadingPanelID="LoadingPanel1" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadTabStrip ID="radTabStrip" runat="server" SelectedIndex="0" Width="135%"
AutoPostBack="True" Skin="Office2007" MultiPageID="radMultiPage" CausesValidation="False"
OnTabClick="radTabStrip_TabClick">
<Tabs>
<telerik:RadTab runat="server" Text="Contacts" Width="7%" Enabled="true" PageViewID="radPageContact">
</telerik:RadTab>
<telerik:RadTab runat="server" Text="Delivery Hours" Width="9%" Enabled="true" PageViewID="radPageViewDeliveryHours">
</telerik:RadTab>
<telerik:RadTab runat="server" Text="Pickup Hours" Width="9%" Enabled="true" PageViewID="radPageViewPickUpHours">
</telerik:RadTab>
</Tabs>
</telerik:RadTabStrip>
<telerik:RadMultiPage ID="radMultiPage" SelectedIndex="0" runat="server" BorderWidth="2px"
BorderColor="Black" BackColor="White" RenderSelectedPageOnly="true">
<telerik:RadPageView ID="radPageContact" runat="server">
<asp:Panel ID="panelRadPageContact" runat="server" Width="350px">
<UserControl:ContactSetup ID="ucContact" runat="server" />
</asp:Panel>
</telerik:RadPageView>
<telerik:RadPageView ID="radPageViewDeliveryHours" runat="server">
<asp:Panel ID="panelRadPageDeliveryHours" runat="server">
<UserControl:DeliverHoursTab ID="ucDelivery" runat="server" />
</asp:Panel>
</telerik:RadPageView>
<telerik:RadPageView ID="radPageViewPickUpHours" runat="server">
<asp:Panel ID="panelradpageviewpickuphours" runat="server">
<UserControl:pickuphourstab id="ucpickup" runat="server" />
</asp:Panel>
</telerik:RadPageView>
</telerik:RadMultiPage>
</td>
</tr>
<tr>
<td>
</td>
</tr>
</table>