Telerik Forums
Kendo UI for jQuery Forum
0 answers
131 views
Hello,

I have an Editor where I have setup with the "paste" event.  I am having no problem with the event firing it is that I can't get it to replace the content correctly.  Here is a working example of the problem http://jsfiddle.net/WgvNr/3/.  To test paste in some Microsoft Word content with some formatting.  The paste event will strip the Word formatting.  This works also, but it leaves the original content and the edited content. How can I just have the edited content show in the editor?
$("#txtActions").kendoEditor({
    tools: [
     "bold",
     "italic",
     "underline",
     "insertUnorderedList",
     "insertOrderedList",
 ],
    paste: function (e) {
        var editor = $("#txtActions").data("kendoEditor");
        editor.value(CleanWordHTML(e.html));
        //console.log(editor);
    }
});
Mk
Top achievements
Rank 1
 asked on 12 Sep 2012
2 answers
114 views
I have the following code:

var threshold = 100;
var throughputPer10min = [ 15, 26, 21,  40,  63,
                           16, 38, 79, 120,  54,
                           12, 56, 75, 102, 110,
                          130, 90, 75,  50,   5];
 
var startDate = new Date();
var chartData = [];
 
 
for (i = 0; i < throughputPer10min.length; i++) {
    var date = new Date(startDate);
    date.setMinutes(startDate.getMinutes() + (10 * i));
 
    chartData.push({
        "time": date,
        "threshold": threshold,
        "actual": throughputPer10min[i],
        "below": Math.min(throughputPer10min[i], threshold),
        "above": Math.max(0, throughputPer10min[i] - threshold)
    });
}
 
var endDate = chartData[chartData.length - 1].time;
chartData[chartData.length - 1].threshold = threshold;
 
 
$("#testGraph").kendoChart({
    dataSource:
        {
            data: chartData
        },
    valueAxis:
        {
            majorUnit: 50,
            min: 0,
            max: 150
        },
    categoryAxis:
        {
            field: "time",
            baseUnit: "minutes",
            type: "Date",
            majorGridLines:
                {
                    visible: false
                },
            majorTicks:
                {
                    visible: false
                },
            labels:
                {
                    step: 20
                }
        },
        series: [
        {
            type: "area",
            stack: true,
            missingValues: "interpolate",
            field: "below",
            color: "#55F",
            line: { color: "blue" },
        },
        {
            type: "area",
            stack: true,
            missingValues: "interpolate",
            field: "above",
            color: "green"
        },
         
        {
            type: "line",
            field: "actual",
            missingValues: "interpolate",
            width: 1,
            markers:
            {
                size: 0
            },
            name: "Actual Throughput"
        },
        {
            type: "line",
            field: "threshold",
            missingValues: "interpolate",
            name: "threshold",
            color: "red",
            dashType: "dash",
            width: 1.5,
            markers:
            {
                size:0
            },
            name: "Threshold line"
        }
    ],
    legend: {
        visible: false
    }
});


if I replace the date.setMinutes(startDate.getMinutes() + (10 * i));  with getMinutes() + i, everything looks fine, otherwise, it looks as if I had used missingValues: "zero"


Is this a bug or intended ?
T. Tsonev
Telerik team
 answered on 12 Sep 2012
0 answers
122 views
How to rebind Charts and Grids in kendo ui, which automatically displays data on change, we dont need to create it again ?

Thanks in advance.
Pratik
Top achievements
Rank 1
 asked on 12 Sep 2012
1 answer
69 views

When i am trying to update the value through the join it updated the database but not updating the gridview.
But after refreshing the page it is showing the updated value.
Here is my code.

@(Html.Kendo().Grid(Model)

.Name(

 

"Grid")

 

.Columns(columns =>

{

 

columns.Bound(p => p.RoleTypeName).HtmlAttributes(

 

new { style = "text-align: left" }).Width(90);

 

columns.Bound(p => p.Name).HtmlAttributes(

 

new { style = "text-align: left" }).Width(100);

 

columns.Bound(p => p.Status).HtmlAttributes(

 

new { style = "text-align: center" }).Width(80);

 

columns.Command(command => { command.Edit(); }).HtmlAttributes(

 

new { style = "text-align: center" }).Width(100);

 

})

.Editable(editable => editable.Mode(

 

GridEditMode.PopUp).TemplateName("PopUpTemplate").Window(w => w.Title("Manage Role").Name("editWindow").Width(400).Height(200)))

 

.Pageable(p => p.PageSizes(

 

true))

 

.Sortable()

.Scrollable()

.DataSource(dataSource => dataSource

 

 

//.Server()

 

.Ajax()

.ServerOperation(

 

false)

 

 

.Model(model => model.Id(p => p.RoleID))

.Read(read => read.Action(

 

"ManageRole", "ManageRole"))

 

.Update(update => update.Action(

 

"Update", "ManageRole"))

 

 

)

)

 


and my editor template contains dropdownlist

@(Html.Kendo().DropDownListFor(model => model.StatusName)

.Name(

 

"StatusName")

 

.DataTextField(

 

"StatusName")

 

.DataValueField(

 

"StatusName")

 

.DataSource(source =>

{

source.Read(read =>

{

read.Action(

 

"GetStatus", "ManageRole");

 

});

})

 

)

When i update the status from the dropdownlist updates in data but not show in grid, it appear when refreshing the page.How can i remove this problem please help me out. 

 

Daniel
Telerik team
 answered on 12 Sep 2012
2 answers
153 views
So I'm using MVC3, creating a textbox for the date-time like so:

@Html.TextBoxFor(e => e.EndDtTm, new { id = "endDtTm", style = "width: 200px;" })

and in Ready creating the kendo control

$("#endDtTm").kendoDateTimePicker();

The problem I'm having is that after I load up the model the control shows the date and time correctly but if I click the time icon and pick a new time the date resets to todays date.  The opposite happens if I select the date icon and pick a new date then the time is reset to 12:00 am.

How do I prevent this from happening?
Georgi Krustev
Telerik team
 answered on 12 Sep 2012
2 answers
5.1K+ views
When i set the value for the datepicker programatically, the change event does not fire. The basic code is below:



                $("#datePicker").kendoDatePicker({
                    change: function (e) {
                        selectedDate = $("#datePicker").data("kendoDatePicker").value();
                        console.warn(selectedDate);
                    }
                });
$("#datePicker").data("kendoDatePicker").value(selectedDate);
Georgi Krustev
Telerik team
 answered on 12 Sep 2012
2 answers
524 views
Is it possible to format numbers based on variable rather than fixed values? I know that there are various ways you can
do this normally, like padding etc but is it possible to do something directly in the grid?

This is very important btw.
Marcus
Top achievements
Rank 1
 answered on 12 Sep 2012
0 answers
100 views

Hi

I have:
 
1. The table of the Program of training
2. The table courses
3. Questionnaires ( Of this table is construction CHART)
 
I want to construct Cascading ComboBox in which selecting programs of training and then courses. After a selection of course, making data from table Questionnaires and construction Chart

How to connect Chart at the first start of page when still it is not known on what identifier to select the data from the table

See my code.

How it to make?

 

 

 

Leonid
Top achievements
Rank 1
 asked on 12 Sep 2012
5 answers
928 views
I previously used the Telerik MVC combobox control so that it only returns results when at least 3 characters have been entered. I was able to specify this in my controller by simple checking the text string that was passed in the ajax request.

With the KendoUI combobox, I cannot figure out how the text is being passed and what to check for in my controller to see if at least 3 characters have been entered.

Can you provide any assistance with this? Thanks.

UPDATE:

So I found by looking at the AutoComplete control, that I can set the ComboBox to not retrieve results until at least 3 characters are entered by using minLength: 3

I still have the issue on the controller side, however, that I don't want to bring back the entire list...I only want to bring back results that contain the text entered. What do I need to include on the controller side to get the text entered in the ComboBox?

Thanks!
Ryan Lege
Top achievements
Rank 1
 answered on 12 Sep 2012
0 answers
84 views
Hi,

I'm loading the content of a window by using the refresh method with a URL. Is there a way to find out which URL the content was really fetched from (if it is redirected)?

I know that I could just check the content and look for some unique element to discern which page was loaded if I know the content, but this is not always feasible.
Nocklas
Top achievements
Rank 1
 asked on 12 Sep 2012
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
MultiColumnComboBox
Chat
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Effects
Accessibility
PivotGridV2
ScrollView
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Breadcrumb
Collapsible
Localization
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
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?