Telerik Forums
Kendo UI for jQuery Forum
9 answers
240 views
Hi, I am using kendo ui editor and I created a custom tool to clean format.
I need to register an entry to undoRedoStack to make the changes reverted when pressing ctrl+z and redo changes when pressing ctrl+y.

This is the fragment of what I have done:

01.var editor = $("#symptom-editor, #resolve-editor").kendoEditor({
02.    tools: [
03.        "formatBlock",
04.        "bold",
05.        "italic",
06.        "underline",
07.        "insertUnorderedList",
08.        "insertOrderedList",
09.        "indent",
10.        "outdent",
11.        "createLink",
12.        "insertImage",
13.        {
14.            name: "formatting",
15.            tooltip: "Insert code syntax",
16.            items: [
17.                { text: "C#", value: "pre.brush-csharp" },
18.                { text: "C++", value: "pre.brush-cpp" },
19.                { text: "CSS", value: "pre.brush-css" },
20.                { text: "Java", value: "pre.brush-java" },
21.                { text: "JavaScript", value: "pre.brush-js" },
22.                { text: "Perl", value: "pre.brush-perl" },
23.                { text: "PHP", value: "pre.brush-php" },
24.                { text: "Python", value: "pre.brush-py" },
25.                { text: "Ruby", value: "pre.brush-ruby" },
26.                { text: "SASS", value: "pre.brush-sass" },
27.                { text: "SQL", value: "pre.brush-sql" },
28.                { text: "Visual Basic", value: "pre.brush-vb" },
29.                { text: "HTML / XML", value: "pre.brush-xml" }
30.            ]
31.        },
32.        {
33.            name: "clearFormat",
34.            tooltip: "Clear format"
35.        },
36.        "viewHtml"
37.    ],
38.    stylesheets: [
39.        "css/kendo.editor-custom.css"
40.    ],
41.    keyup: function (e) {
42.        $(".vld-tooltip").remove();
43.    },
44.    execute: function (e) {
45.        var editor = this,
46.            sel = editor.getSelection(),
47.            element = sel.baseNode.parentNode,
48.            stateBefore;
49.        switch (e.name) {
50.            case "clearformat":
51.                //saves the current history
52.                stateBefore = editor.undoRedoStack.stack;
53.                //cleans the style and class attributes
54.                element.innerHTML = $(element).attr({"class":null, "style":null}).html();
55.                //TODO: Create an entry to stack
56.                //editor.undoRedoStack.stack = stateBefore;
57.                //editor.undoRedoStack.currentCommandIndex = stateBefore.length - 1;
58.                break;
59.            case "formatting":
60.                //TODO: clean the children <pre> tags
61.                break;
62.        }
63.    } //end execute
64.}); //end kendoEditor

 
As a mentioned, I would like to support undo and redo throught the undoRedoStack.
Also, I am re-using the formatting formatBlock command, I would like to create a new one that behaves like the formatting command. How do I can make it?

Thank you very much for your help.

Alex Gyoshev
Telerik team
 answered on 04 Sep 2014
1 answer
590 views
I have a case where users do not want to use the buttons to create new rows in the grid. Instead they want to have the rows created when they tab out of some input controls. I was able to achieve this but ran into a problems with Shift+Tab or clicking outside the grid with out tabbing out. Below is the approach:

1. I have a text box just above the grid. I am creating new row once the user leaves that text box.
2. I will create a second new row if they tab out of the last input control in the grid.
3. I will delete the existing row and stop creating a new row if they tab out of all the controls in a grid row with out entering anything. Row will be deleted once the user tabs out of the last control in the grid.

This is perfectly working if they follow this exactly. But at any point if they come out of the Grid by using mouse and then do a Shift+Tab to go back into the Grid they are stuck in there and cannot get out of the grid. I have noticed this is happening because of the empty row that is already in the grid which is not deleted. To avoid this scenario I want to change the Point 3 above such that I will delete the row even if the user comes out of the grid from any control in the grid line.

However when I try to do this, using removeRow() is not deleting the row when I use it for the first control but it works if I uses it in blur of the second control (Considering only two column for the row)

Here is the DoJo for the case but this one has a problem as this is not even deleting the row at all where as I can delete the row from the second control in my application.

In simple words what I want to achieve is : I want to delete the rwo if user tabs out with our entering anything in the input control.

I cannot use Cancel changes as I am saving the records along with other information on the form. Cancel changed delete all unsaved records from grid which is not suitable for my case.
Dimo
Telerik team
 answered on 04 Sep 2014
1 answer
281 views
Hello,

This is my view:
<div id="viewemail" data-role="view" data-title="Email" data-layout="main" data-show = "email_loaded">
  <div id="email-subject"></div>
  <div id="email-body"></div>
</div>

This is how I open the view:
<a data-role="button" href="#viewemail?emailId=5" ><div class="row" id="5">Random Subject</div></a>

The function called on data-show:
function email_loaded(e) {
    id = e.view.params.emailId;
    $('#email-subject').text('Subject with id:'+id);
}

If the first block of code (the view) is inside my index.html file - it works.
If I move the view to a separate html file (views/email.html) it throws the following error:

How can I make it work when the view is in a separate file?
Kiril Nikolov
Telerik team
 answered on 04 Sep 2014
1 answer
142 views
I am trying to use the Diagram control and have found that it does not respond to touch events on tablets.

I have tried this on iPads and Android tablets and it seems that the touch event does not act the same as a click.  Therefore, selecting and dragging nodes in the diagram does not work.  It only pans the entire view.  These show up as Pan events only and no other events seem to fire.

For example, try opening this on an ipad: http://demos.telerik.com/kendo-ui/diagram/index

However, the pie chart control seems to respond to touch events as clicks from tablets.

Is there some trick to getting this to work or is there a problem within the Diagram control that needs fixed in order for it to work on tablets?
T. Tsonev
Telerik team
 answered on 04 Sep 2014
1 answer
111 views
Hello,

i have a schudler where user has Setting for working day start and end and when Show Business hour clicked i should be displaying that range. So i am Setting like this
​ .WorkDayStart(new DateTime(System.DateTime.Today.Year, System.DateTime.Today.Month,System.DateTime.Today.Day,ViewBag.StartHour, ViewBag.StartMinute, 00))
.WorkDayEnd(new DateTime(System.DateTime.Today.Year, System.DateTime.Today.Month,System.DateTime.Today.Day,18, 00, 00))

Workday start seem to be working find but workdayend do not Show 6 PM as end day rather Shows 5 PM. Am i doing anything wrong here?

Anamika
Anamika
Top achievements
Rank 1
 answered on 04 Sep 2014
1 answer
157 views
Hello,

Is it possible to group diagram elements using the value in a dataItem property?
Let's say I'm creating a diagram where I will have different people (like the one in the demos) but for each job department there might be 1 or more persons. So I would group them by the name of the department and I place a title for that group that would be the name of the department. Then if I move the title of that group I would move all the items in that group.
T. Tsonev
Telerik team
 answered on 04 Sep 2014
1 answer
308 views
Hi,

I am trying to use 3rd party control (jquery autocomplete control) inside Kendo grid and I have no luck making it work.
Is this option exists?
All the demos and examples that I saw only shows how to use Kendo controls inside the grid and I didn't find any example for using 3rd party controls.

Thanks,
Doron
Dimo
Telerik team
 answered on 03 Sep 2014
1 answer
184 views
Is there any way to change a drawer's open/close animation time?  The default time seems too fast.
Kiril Nikolov
Telerik team
 answered on 03 Sep 2014
2 answers
161 views
Hi, I've got question about the kendo editor. I usually find my answer inside doc or forums, but i found no clue on that one.

I'm currently using a kendo editor on my website that change depending on user culture. With this github projet (https://github.com/loudenvier/kendo-global), I was able to translate almost all kendo interface to french or other language based on user config.

The problem is that it doesn't convert every labels. Some seems to be hard-coded inside kendo javascript. For example, I just added the dropdown style selector tool that contain label like "Heading 1" or "quotation". These labels are not converted by the github project that I found and I have no clue on how to dynamically override label hard-coded inside kendo. An other label is the one that appear when using the table tool : "Create a i x j table". 

How can we easily override label inside kendo?

Thanks for your help.
Alex Gyoshev
Telerik team
 answered on 03 Sep 2014
1 answer
219 views
Hi,
I can't use any OLAP technologies in my project.
So we store our data in one huge flat table.
How can I make PivotGrid to send requests to my service and refresh itself whenever user drills down or deletes a column/row/measure without XMLA?

Currently I was able to configure datasource with type : 'odata'. But PivotGrid uses it only once to retrieve initial json list. 
Georgi Krustev
Telerik team
 answered on 03 Sep 2014
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
DatePicker
Spreadsheet
Upload
ListView (Mobile)
ComboBox
TabStrip
MultiSelect
AutoComplete
ListView
Menu
Templates
Gantt
Validation
TreeList
Diagram
NumericTextBox
Splitter
PanelBar
Application
Map
Drag and Drop
ToolTip
Calendar
PivotGrid
ScrollView (Mobile)
Toolbar
TabStrip (Mobile)
Slider
Button (Mobile)
Filter
SPA
Drawing API
Drawer (Mobile)
Globalization
LinearGauge
Sortable
ModalView
Hierarchical Data Source
Button
FileManager
MaskedTextBox
View
Form
NavBar
Notification
Switch (Mobile)
SplitView
ListBox
DropDownTree
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
ColorPicker
Pager
Styling
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
ScrollView
Switch
TextArea
BulletChart
Licensing
QRCode
ResponsivePanel
Wizard
CheckBoxGroup
Localization
Barcode
Breadcrumb
Collapsible
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
TimePicker
BottomNavigation
Ripple
SkeletonContainer
Avatar
Circular ProgressBar
FlatColorPicker
SplitButton
Signature
Chip
ChipList
VS Code Extension
AIPrompt
PropertyGrid
Sankey
Chart Wizard
OTP Input
SpeechToTextButton
InlineAIPrompt
StockChart
ContextMenu
DateTimePicker
RadialGauge
ArcGauge
AICodingAssistant
SegmentedControl
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?