or
addTextTile = new RadTextTile(){ NavigateUrl = "~/NavUrl.aspx"};addTextTile.Title.Text = "Tile Title";addTextTile.BackColor = Color.FromArgb(0, 0xBE, 0x20, 0x26);addTextTile.Badge.PredefinedType = TileBadgeType.Attention;addTextTile.Shape = TileShape.Wide;addTextTile.PeekTemplateSettings.HidePeekTemplateOnMouseOut = true;addTextTile.PeekTemplateSettings.ShowPeekTemplateOnMouseOver = true;addTextTile.PeekTemplateSettings.ShowInterval = 0;addTextTile.PeekContentContainer.ForeColor = Color.Black;addTextTile.PeekContentContainer.BackColor = Color.White;addTextTile.PeekContentContainer.BorderColor = Color.FromArgb(0, 0xBE, 0x20, 0x26);addTextTile.PeekContentContainer.BorderWidth = 5;addTextTile.PeekContentContainer.Controls.Add(new LiteralControl("<div>Peek stuff goes here.</div>"));LiveTiles.Add(addTextTile);I would like to catch the backspace and delete keys in CountCharAction so that the alert is not triggered.
How do I get the keyCode in CountCharAction in the below code?<telerik:RadEditor ID="RadEditor1" runat="server" Height="150px" Content='<%# Bind("SchoolMission") %>'> <Modules> <telerik:EditorModule Name="MyModule" Enabled="true" Visible="true" /> <telerik:EditorModule Name="RadEditorStatistics" Enabled="true" Visible="false" /> </Modules> <Tools> <telerik:EditorToolGroup Tag="MainToolbar"> <telerik:EditorTool Name="FindAndReplace" /> <telerik:EditorSeparator /> <telerik:EditorSplitButton Name="Undo"> </telerik:EditorSplitButton> <telerik:EditorSplitButton Name="Redo"> </telerik:EditorSplitButton> <telerik:EditorSeparator /> <telerik:EditorTool Name="Cut" /> <telerik:EditorTool Name="Copy" /> <telerik:EditorTool Name="Paste" ShortCut="CTRL+V" /> </telerik:EditorToolGroup> </Tools> <Content> </Content> <TrackChangesSettings CanAcceptTrackChanges="False"></TrackChangesSettings></telerik:RadEditor><script type="text/javascript"> MyModule = function (element) { MyModule.initializeBase(this, [element]); } MyModule.prototype = { initialize: function () { MyModule.callBaseMethod(this, 'initialize'); var selfPointer = this; //this.get_editor().add_selectionChange(function () { selfPointer.CountCharAction(); }); this.get_editor().attachEventHandler("onkeyup", function () { selfPointer.CountCharAction(); }); this.get_editor().attachEventHandler("onclientpaste", function () { selfPointer.CountCharAction(e); }); this.CountCharAction(); }, //The method that does the actual counting work CountCharAction: function () { var content = this.get_editor().get_text(); var editorId = this.get_id(); var words = 0; var chars = 0; var maxWordCount = 28; if (content) { punctRegX = /[!\.?;,:&_\-\-\{\}\[\]\(\)~#'"]/g; content = content.replace(punctRegX, ""); if (content) { splitRegX = /\s+/; var array = content.split(splitRegX); words = array.length; chars = content.length; } } var element = this.get_element(); element.innerHTML = "<span style='line-height:22px'>" + "Words: " + words + " Characters: " + chars + " </span>"; if (words > maxWordCount) { alert("Cannot exceed maximum word count. Please shorten text.") } } } MyModule.registerClass('MyModule', Telerik.Web.UI.Editor.Modules.ModuleBase);</script>
if (!IsPostBack) { var bm = new List<BMW>(); bm.Add(new BMW() { name = "BMW", value = 1, transmission = "auto", year = 2012, fuel = "Petrol" }); bm.Add(new BMW() { name = "BMW", value = 2, transmission = "auto", year = 2013, fuel = "Petrol" }); bm.Add(new BMW() { name = "BMW", value = 3, transmission = "manual", year = 2012, fuel = "Petrol" }); bm.Add(new BMW() { name = "BMW", value = 4, transmission = "manual", year = 2013, fuel = "Petrol" }); bm.Add(new BMW() { name = "BMW", value = 5, transmission = "auto", year = 2012, fuel = "Diesel" }); bm.Add(new BMW() { name = "BMW", value = 6, transmission = "auto", year = 2013, fuel = "Diesel" }); bm.Add(new BMW() { name = "BMW", value = 7, transmission = "manual", year = 2012, fuel = "Diesel" }); bm.Add(new BMW() { name = "BMW", value = 8, transmission = "manual", year = 2013, fuel = "Diesel" }); testing.PlotArea.XAxis.DataLabelsColumn = "year"; testing.DefaultType = Telerik.Charting.ChartSeriesType.Line; //Use DataGroupColumn in order to group items testing.DataGroupColumn = "name"; testing.DataManager.ValuesYColumns = new string[] { "transmission","fuel"}; testing.DataSource = bm; testing.Height = 1200; testing.Width = 1090; testing.DataBind(); }} public class BMW { public string name { get; set; } public double value { get; set; } public string transmission { get; set; } public int year { get; set; } public string fuel { get; set; } }<telerik:RadChart ID="testing" runat="server" Width="400px" SeriesOrientation="Vertical"> <Series> <telerik:ChartSeries DataYColumn="value" Type="Line" Appearance-ShowLabels="true"> </telerik:ChartSeries> </Series> </telerik:RadChart>Hello,
I ahve a radwindow and rad menu and I am populating the radmenu dynamically f and on click of a particular child item i need to open a radwindow but when ever clicks on the rad menu options the rad window is opened for two seconds and closed how to stop the postback generated by radMenu.
Protected Sub btnSubmit_Click(sender As Object, e As EventArgs) Handles btnSubmit.Click
Dim MyLogin1 As String = TxtUsername.Text<telerik:RadTextBox ID="TxtUsername" ValidationGroup="LoginGroup" MaxLength="30" runat="server"></telerik:RadTextBox><asp:TextBox ID="TxtUsername" ValidationGroup="LoginGroup" MaxLength="30" runat="server"></asp:TextBox>If Page.IsValid Then