Telerik Forums
Community Forums Forum
1 answer
12 views

I am using telerik version 2014.3.1024.45 with Asp.Net Webforms

I am using Telerik RadGrid. Columns are being sorted using string value. However if a particular column has integer values, it fails to sort properly. E.g. For the values 0, 1, 10, 2, 12, 3   It will sort as 0, 1, 10, 12, 2, 3

I tried setting 
DataType="System.Int32"   for column but still it considers as string. This column has on the fly values so I can not sort at database also.

Would appreciate any suggestion here. Is there any way to do it ? 

Thanks In advance

Attila Antal
Telerik team
 updated answer on 14 Mar 2024
8 answers
184 views
1 answer
49 views
Here's my current code, where on the button clicks I'm opening a popup in which the user can type anything and insert it into the cursor position, it's working fine.

Problem:- When I save my text like this <p>I’m looking for the parsing to keep my deeply nested div structure but the deepest div allows inline content. For some reason, a new div gets injected though. Which I’m later removing. I’d rather not have that hack though. My name is&nbsp;<span contenteditable="false" class="uneditable" style="user-select: none; opacity: 0.5; background-color: red; padding: 2px;" id="12312381829919">rahul</span>.</p>
where rahul is a custom value inserted using a popup with properties like id & style 

but when I parse this value onMount from API, the editor doesn't keep my style and id properties and when inspected the text in the editor looks like 

<p>I’m looking for the parsing to keep my deeply nested div structure but the deepest div allows inline content. For some reason, a new div gets injected though, which I’m later removing. I’d rather not have that hack though. My name is&nbsp;<span contenteditable="false" class="uneditable" >rahul</span>.</p>

which Is without ID and style tag 

here's my code for reference 

import React, { useRef, useState } from "react";
import { Editor, EditorTools, EditorUtils, ProseMirror } from "@progress/kendo-react-editor";
import "@progress/kendo-theme-default/dist/all.css";
import { Button } from "@progress/kendo-react-buttons";
import { Dialog, DialogActionsBar } from "@progress/kendo-react-dialogs";
import { Input } from "components/atoms/input/Input";

export default function KendoEditor({ type, updateData, initalVal }) {
  const [isDialogVisible, setDialogVisible] = useState(false);
  const [customData, setCustomData] = useState("");
  const [value, setValue] = useState("test");
  var initialValue =
    type === "header" || type === "footer" ? initalVal?.data?.content : initalVal?.content;
  const editorRef = useRef(null);
  const {
    Bold,
    Italic,
    Underline,
    Strikethrough,
    Subscript,
    Superscript,
    ForeColor,
    BackColor,
    CleanFormatting,
    AlignLeft,
    AlignCenter,
    AlignRight,
    AlignJustify,
    Indent,
    Outdent,
    OrderedList,
    UnorderedList,
    NumberedList,
    BulletedList,
    Undo,
    Redo,
    FontSize,
    FontName,
    FormatBlock,
    Link,
    Unlink,
    InsertImage,
    ViewHtml,
    InsertTable,
    InsertFile,
    SelectAll,
    Print,
    Pdf,
    TableProperties,
    TableCellProperties,
    AddRowBefore,
    AddRowAfter,
    AddColumnBefore,
    AddColumnAfter,
    DeleteRow,
    DeleteColumn,
    DeleteTable,
    MergeCells,
    SplitCell,
  } = EditorTools;
  const { Schema, EditorView, EditorState } = ProseMirror;
  const nonEditable = {
    name: "nonEditable",
    inline: true,
    group: "inline",
    content: "inline+",
    marks: "",
    attrs: {
      contenteditable: { default: null },
      class: { default: null },
      style: { default: null },
      id: { default: null },
    },
    atom: true,
    parseDOM: [{ tag: "span.uneditable", priority: 51 }],
    toDOM: (node) => [
      "span",
      {
        contenteditable: false,
        class: "uneditable",
        style:
          "user-select: none; opacity: 0.5; background-color: red;text-weight:600;padding:2px;",
        id: node.attrs.id,
      },
      0,
    ],
  };

  const toggleSidebar = (type, props) => {
    return (
      <Button
        onClick={() => {
          setDialogVisible(true);
          //  setActiveProperties(type);
        }}
        onMouseDown={(e) => e.preventDefault()}
        onPointerDown={(e) => e.preventDefault()}
        title="Insert Custom Data"
        imageUrl="https://demos.telerik.com/kendo-ui/content/shared/icons/sports/snowboarding.png"
        imageAlt="KendoReact Buttons Snowboarding icon"
      />
    );
  };

  const handleInsertCustomData = () => {
    const { view } = editorRef.current;
    const schema = view.state.schema;

    // get the new node from the schema
    const nodeType = schema.nodes.nonEditable;

    // create a new node with the custom data
    const node = nodeType.createAndFill(
      {
        class: "uneditable", // Keep the existing classes
        style: "user-select: none; opacity: 0.5; background-color: red;", // Add red background color
        id: "nernksf", // Add unique ID using new Date()
      },
      schema.text(customData)
    );

    // Insert the new node
    EditorUtils.insertNode(view, node);
    view.focus();

    // Close the dialog
    setDialogVisible(false);
    setCustomData("");
  };
  console.log(initialValue);
  const onMount = (event) => {
    const { viewProps } = event;
    const { plugins, schema } = viewProps.state;

    let nodes = schema.spec.nodes.addToEnd("nonEditable", nonEditable);

    const mySchema = new Schema({ nodes: nodes, marks: schema.spec.marks });

    console.log(type, initialValue);
    const doc = EditorUtils.createDocument(mySchema, initialValue ? initialValue : "");

    return new EditorView(
      { mount: event.dom },
      {
        ...event.viewProps,
        state: EditorState.create({ doc, plugins }),
      }
    );
  };
  //console.log(value);
  const handleEditorChange = (event) => {
    const data = event?.html;
    //console.log(data);
    setValue(data);
    if (type === "header" || type === "footer") {
      updateData({ visible: initalVal?.visible, data: { ...initalVal?.data, data } });
    } else {
      updateData({ ...initalVal, data });
    }
  };
  return (
    <div>
      <Editor
        ref={editorRef}
        onMount={onMount}
        onChange={handleEditorChange}
        tools={[
          [Bold, Italic, Underline, Strikethrough],
          [Subscript, Superscript],
          ForeColor,
          BackColor,
          [CleanFormatting],
          [AlignLeft, AlignCenter, AlignRight, AlignJustify],
          [Indent, Outdent],
          [OrderedList, UnorderedList],
          [NumberedList, BulletedList],
          FontSize,
          FontName,
          FormatBlock,
          [SelectAll],
          [Undo, Redo],
          [Link, Unlink, InsertImage, ViewHtml],
          [InsertTable, TableProperties, TableCellProperties],
          [AddRowBefore, AddRowAfter, AddColumnBefore, AddColumnAfter],
          [DeleteRow, DeleteColumn, DeleteTable],
          [MergeCells, SplitCell],
          [
            (props) => toggleSidebar("dataSourceProperties", props),
            (props) => toggleSidebar("formulaProperties", props),
            (props) => toggleSidebar("letterProperties", props),
            (props) => toggleSidebar("conditionBuilder", props),
          ],
        ]}
        contentStyle={{
          height: 320,
        }}
        //value={initialValue}
      />
      {isDialogVisible && (
        <Dialog
          title="Insert Custom Data"
          onClose={() => setDialogVisible(false)}
          visible={isDialogVisible}
        >
          <div>
            <Input
              type="text"
              value={customData}
              onChange={(e) => setCustomData(e.target.value)}
              label="Enter name"
            />

            <DialogActionsBar>
              <button
                className="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base"
                onClick={() => setDialogVisible(false)}
              >
                No
              </button>
              <button
                className="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base"
                onClick={handleInsertCustomData}
              >
                Yes
              </button>
            </DialogActionsBar>
          </div>
        </Dialog>
      )}
    </div>
  );
}

1 answer
45 views
i am try to import rtf file with header and footer images it throw the following error,

   at System.ThrowHelper.ThrowKeyNotFoundException()
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at Telerik.Windows.Documents.Flow.FormatProviders.Html.Model.Elements.Lists.HtmlExportListManager.ShouldRestartLevel(List list, Int32 listLevelIndex)
   at Telerik.Windows.Documents.Flow.FormatProviders.Html.Model.HtmlContentManager.<ExportParagraph>d__1f.MoveNext()
   at Telerik.Windows.Documents.Flow.FormatProviders.Html.Model.HtmlContentManager.<ExportBlockContainer>d__b.MoveNext()
   at Telerik.Windows.Documents.Flow.FormatProviders.Html.Model.Elements.BodyElement.<OnEnumerateInnerElements>d__0.MoveNext()
   at Telerik.Windows.Documents.Flow.FormatProviders.Html.Model.Elements.HtmlElementBase.WriteContent(IHtmlWriter writer, IHtmlExportContext context)
   at Telerik.Windows.Documents.Flow.FormatProviders.Html.Model.Elements.HtmlElementBase.Write(IHtmlWriter writer, IHtmlExportContext context)
   at Telerik.Windows.Documents.Flow.FormatProviders.Html.Model.Elements.HtmlElementBase.WriteContent(IHtmlWriter writer, IHtmlExportContext context)
   at Telerik.Windows.Documents.Flow.FormatProviders.Html.Model.Elements.HtmlElementBase.Write(IHtmlWriter writer, IHtmlExportContext context)
   at Telerik.Windows.Documents.Flow.FormatProviders.Html.Export.HtmlExporter.Export(IHtmlWriter writer, IHtmlExportContext context)
   at Telerik.Windows.Documents.Flow.FormatProviders.Html.HtmlFormatProvider.ExportOverride(RadFlowDocument document, Stream output)
   at Telerik.Windows.Documents.Common.FormatProviders.TextBasedFormatProviderBase`1.Export(T document)
   at Unite.Infrastructure.SQL.Repositories.ConsentRepository.GetHtmlFromDocument(RadFlowDocument document) in D:\WorkSpace\Unite2.0\Dev Branch\Unite\Unite.Infrastructure.SQL\Repositories\ConsentRepository.cs:line 337
0 answers
77 views

Hello Team,

I am using Telerik RadScheduler for displaying office 365 appointments and managing like add new appointments/update/delete/recurring events, but I am facing issues like when I bind results (getting from graph API) but event displaying and when I try to edit event series then showing error like scheduler is null. and when I tried to delete any instance of the recurring event then showed error like -

Cannot parse parentAppointment recurrence rule during delete operation. Appointment ID is AAMkAGNlZjMyYTkwLTg1ODMtNDdiOC04ZWU2LWEwODI3NGY5NWZhNQFRAAgI2cpeKDYAAEYAAAAA8ebGSehtsk6DrBFw5D1DqwcAA61wHQ7JOEmG--l8ZI1bjQAAAAABDQAAA61wHQ7JOEmG--l8ZI1bjQAAdckkQgAAEA==, parentAppointment ID is AAMkAGNlZjMyYTkwLTg1ODMtNDdiOC04ZWU2LWEwODI3NGY5NWZhNQBGAAAAAADx5sZJ6G2yToOsEXDkPUOrBwADrXAdDsk4SYb-_XxkjVuNAAAAAAENAAADrXAdDsk4SYb-_XxkjVuNAAB1ySRCAAA=. 

 

Please help me to solve that issue.

anand
Top achievements
Rank 1
 asked on 28 Dec 2021
1 answer
58 views

 

Hello,

I've been searching a lot for the right solution.

I have an old web application, witch uses Telerik RadComboBoxes in a updatepanel. The items in the combo are check boxes and every time I check one item I call a server side methode to update the data. My problem is that I need to keep the dropp dow list opened and I'm not able to acheave that, I tried with cancel the client event of closing, blur, click, but if I do so the server side methode is not called; another solution was to call a javascript method from the server side method, but I get null on the sender ; I've also trided to call a server side methode from the javascript method in the user control but it's not good beacause the method needs to be static and it's not a good solution for me beacause I have to change a lot in this old project.

I have attached a project with 2 comboBox has an exemple with the problem. If anyone has a solution for me I am all ears.

thank you for you time and help !

 

Mimi
Top achievements
Rank 1
 answered on 27 Sep 2021
2 answers
208 views
Hi guys,

I'm not sure if this is the correct forum to post this question but here goes. ( please bear with me if the words are too long)

As the lead developer in a project that is still ongoing after 4 years, I'm stucked with having to play catch up on upgrading all my telerik controls. I need some suggestions from you on how you tackle this problem from your organisation or from telerik itself. For that, I will be providing the background on the project and how it's going.

Summary and background
The whole system is basically an all round business application that consists of many minor/major subsystems ( which you can say is pretty complex) and has been developed by a core team of 5 people. It has been an ongoing effort to introduce features over a period of 4-5 years ( started implementation phase in 2007 till current) and has a code base of ~ 1 million LOC excluding white space/comments

System consists many modules/mini systems like: Content management system, Document management system, Online payment systems, Accounting system with credits/debits, Sites management, Licensing system and many other minor modules that complement the system. e.g. interfaces post office, batch scheduling service etc..All these are build from the ground up because we can and because we are developers.

Platform includes web-servers to host the multiple sites, winforms app for backend processing and in the future, a mobile presence if budget permits.

3rd party APIs: We do use a number of open source apis including log4net, range of ICSharpCode modules for text editing// packaging
and most notably, Telerik asp.net/Ajax, Telerik winforms, Telerik reporting etc..We have used Telerik controls from the start 2007 till now although the current version on production is Q2 2010.

The problem:
Now to the 6 million dollar question: Seeing that Telerik introduces a new build at least once every quarter, I have been trying to do a lot of catching up but frankly, it's starting to get so hard as the code base becomes bigger and every time I do an upgrade, I end up spending close to 3 weeks fixing things that suddenly stop working due to the upgrade or trying to find a replacement control.

Note: We tend not to use the designer aspects of visual studios unless it's for placement of panels/placeholders. Most controls are handled code behind and/or dynamically generated. We also subscribe to the use of generic usercontrols which can be reused throughout the application to conform to a standard UI as well as standard suite of controls.

(I'm gonna list out some of the notable problems just off the top of my head as there's too many to remember unless i look at my svn log)

Example 1: Telerik winforms had a RadComboxBox which allows you to have a dropdownlist with checkbox items inside. There's no replacement control in the newer builds and I end up having to live with the tons of warning messages telling me its deprecated. The new dropdownlist control doesnt allow this.

Example 2: Telerik winforms control deprecating a bunch a methods and documentation's not very informative on how to handle them. the most notable being RadGrid controls and they way they react after every new patch.

Example 3: Telerik reporting which prints out pages nicely in the previous version suddenly decides to add a blank new page for each page after the upgrade.

Example 4: Telerik asp.net code that was working before doesn't work anymore unless you use a different approach.

Example 5: Some dumb changes like the checkbox control or radiobutton control property changing from Control.IsChecked to Control.Toggle or Control.Checked ( something along those lines.. property name changed but logic doesnt)

Example 6: Event handler parameter changes: - nuff said.

Advise:

(This is the part I need input from your guys)

How do you guys handle every new release of Telerik and do you just upgrade immediately when a release is out or wait due to time constraints etc. The issue here is, we tend not to upgrade EVERY quarter due to time constraints ( usually implementing a new feature)


I need some suggestions or hyperlinks to online material which can help me manage my application life cycle.


Finally, thanks for spending some time reading this and please advise/recommend on some solutions to handle the problems i encounter in my Advise section of this post.


Warmest regards,

Jonathan





Dess | Tech Support Engineer, Principal
Telerik team
 answered on 17 Jul 2020
0 answers
41 views

 

Since this is a "Glory with Telerik Controls" - thought of sharing this. We build Analog World Clock using Telerik Chart Control and it shows time in different parts of the world.

http://www.aisoftwarellc.com/Showoff/Worldclocks

Piyush Bhatt
Top achievements
Rank 1
 asked on 18 Nov 2016
6 answers
90 views
I purchased Telerik controls after spending some time using the demos and trial. However, I did not work very far into the advanced features before purchasing.

It turns out that there is almost zero documentation for anything but the most basic of functions, the controls have major bugs which go unfixed for years, and the support staff is unable to understand most questions.

What was to be a 3 month project has just hit 6 months, and I put the blame for that squarely on Telerik. Out of any given day, I spend almost 6 hours trying to find information on how to work around their controls, or get them to work at all. 

If you are evaluating Telerik, I advise you to search around the web for complaints about them. You will find that there are many, and that they all have a common complaint of poor documentation and bug-ridden controls. 

http://www.gitshah.com/2011/03/telerik-controls-perfect-example-of-how.html

http://www.telerik.com/forums/poor-documentation

Julian
Top achievements
Rank 1
 answered on 04 Jun 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?