Telerik Forums
Community Forums Forum
0 answers
17 views

I have a TelerikEditor and I have also a List-View, I want to insert in the TelerikEditor what is selected from List-View, similar to the Knedu-ui Editor. Is there any way to do this?

 

https://demos.telerik.com/kendo-ui/editor/snippets?_ga=2.185885487.768973806.1708748600-1556274050.1704398428&_gac=1.79606246.1707819915.Cj0KCQiAw6yuBhDrARIsACf94RW6QB0GISn8O6M41zw6097jzfLc0Pa7m07eijHkyh0eA-nEwbj6dVEaAr5LEALw_wcB&_gl=1*55bc3c*_ga*MTU1NjI3NDA1MC4xNzA0Mzk4NDI4*_ga_9JSNBCSF54*MTcwODc0ODU5OS4yNS4xLjE3MDg3OTQzNzUuMS4wLjA.*_gcl_aw*R0NMLjE3MDc4MTk5MTUuQ2owS0NRaUF3Nnl1QmhEckFSSXNBQ2Y5NFJXNlFCMEdJU244TzZNNDF6dzYwOTdqemZMYzBQYTdtMDdlaWpIa3loMGVBLW5Fd2JqNmRWRWFBcjVMRUFMd193Y0I.*_gcl_dc*R0NMLjE3MDc4MTk5MTUuQ2owS0NRaUF3Nnl1QmhEckFSSXNBQ2Y5NFJXNlFCMEdJU244TzZNNDF6dzYwOTdqemZMYzBQYTdtMDdlaWpIa3loMGVBLW5Fd2JqNmRWRWFBcjVMRUFMd193Y0I.*_gcl_au*MjAxMzkxMjIyNi4xNzA0Mzk4NDI3

Sua
Top achievements
Rank 1
 asked on 24 Feb 2024
0 answers
24 views

Hello,

Although Telerik is awesome I wish to delete my Telerik account, Telerik Forums account and all of the data associated with this account. Please help me out with this.

 

Thanking You,

With Regards,

Missing User
 asked on 21 Feb 2024
0 answers
18 views

你好!

我想知道如何删除我不久前为了下载试用版而必须创建的 telerik 用户帐户。不幸的是,我找不到任何关于如何做到这一点的提示。

任何帮助表示赞赏。
提前致谢!

asd
Top achievements
Rank 1
 asked on 20 Feb 2024
0 answers
15 views
I m using kendo-treelist-checkbox-column component, can i  display this conditionally?.....i dont want to enable the check boxes for particular rows in treelist...is this possible ??
Kavin
Top achievements
Rank 1
 asked on 12 Feb 2024
0 answers
18 views

I'm currently fine-tuning a project that involves MySQL and Telerik, and I've hit a roadblock when it comes to understanding the nuances between CHAR and VARCHAR. Specifically, I'm interested in how these choices may impact UI development with Telerik controls. Can someone help me decode these intricacies?

Let's start by sharing a CodeIgniter model snippet and MySQL table structure:


class Customer_model extends CI_Model {
    public function add_customer($customer_id, $customer_name, $email) {
        $data = array(
            'customer_id' => $customer_id,
            'customer_name' => $customer_name,
            'email' => $email
        );

        $this->db->insert('customers', $data);
        return $this->db->insert_id();
    }
}



CREATE TABLE customers (
    id INT AUTO_INCREMENT PRIMARY KEY,
    customer_id CHAR(8),
    customer_name VARCHAR(50),
    email VARCHAR(255)
);

Question 1: CHAR vs. VARCHAR in MySQL
I've opted for CHAR(8) for customer_id and VARCHAR(50) for customer_name. Could someone shed light on the primary distinctions between CHAR and VARCHAR in MySQL, particularly concerning storage efficiency and how these choices might influence Telerik controls used in UI development?

Question 2: Telerik and MySQL Integration
Considering Telerik controls in the UI development landscape, are there specific considerations when working with VARCHAR fields like customer_name or email in MySQL? How do these considerations align with best practices for Telerik UI components, and are there potential pitfalls to be mindful of during integration?

Question 3: Effective Data Handling using Telerik.
In the context of data transmission between MySQL and Telerik, as seen here, how does the decision between CHAR and VARCHAR affect the effectiveness of data retrieval or processing within Telerik controls? Are there any ideas or best practices for managing variable-length fields in Telerik UI components?

Question 4: The impact on Telerik Grids and Forms.
Finally, when developing Telerik Grids or Forms, how do the MySQL data types used effect the layout, performance, and validation? Are there any special obstacles or benefits to using CHAR or VARCHAR fields in MySQL when working with Telerik UI components?

Your expertise on these questions will be invaluable as I strive for a seamless integration of MySQL data and Telerik controls in my UI development. Thanks a bunch for sharing your insights!

jhonson
Top achievements
Rank 1
Iron
Iron
 asked on 30 Jan 2024
1 answer
24 views

how to set ragdgridview row numbers in the highlighted cells ,tried RowIndicatorVisibility="Visible" but not working in c#

 

Dimitar
Telerik team
 answered on 26 Jan 2024
0 answers
20 views

Hello,

As per your documentation and example - https://docs.telerik.com/blazor-ui/components/multiselect/overview - if a user enters a text to filter the items from a multiselect list, then text will disappear as soon as the user clicks away from the multiselect box.

However, I've implemented the same functionality in my project, but for whatever reason the text still persists when I click away from the box. 
Please see my code below:



<TelerikMultiSelect Data="@ClientNames"
                    @bind-Value="@ClientValues "
                    Placeholder="ALL"
                    Filterable="true"
                    ClearButton="true" AutoClose="false">
</TelerikMultiSelect>

@code{

       List<string>? ClientNames { get; set; } = new() {"John",  "Elena" , "Michael" };

       List<string>? ClientValues { get; set; } = new();
}

 Please screenshot attached (Screenshot 2024-01-11 124224.png).

The behaviour is the same in Microsoft Edge and Google Chrome.

Please advise.

Many thanks,

Astig

 

n/a
Top achievements
Rank 1
Iron
Iron
Iron
 updated question on 11 Jan 2024
1 answer
26 views

Hi ,

We are evaluating Telerik Reporting for our .NET 8 ERP application.

Could you please provide Win UI3 Example with Binding ObjectDataSource where Report is embedded in to the winui3 sample and bind local dto object and render also locally .

We tried from our end but  unable to use  binding ObjectDataSource.

We have attached sample for your reference.

 

 

Todor
Telerik team
 answered on 10 Jan 2024
0 answers
26 views
I want to convert a numeric to string using = CStr(Sum(Fields.CURYEXTCOST).  Example: $123,000 ->  one Hundred and twenty three thousand. 
George
Top achievements
Rank 1
 asked on 08 Jan 2024
1 answer
92 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>
  );
}

Narrow your results
Selected tags
Tags
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?