Telerik Forums
Kendo UI for jQuery Forum
1 answer
186 views
Hello,

I have created Numeric textbox in Grid. I Don't want it to accept decimal. Why does it accept decimal? I dont want to use custom editor to specify decimal places.

dataSource = new kendo.data.DataSource({
            data: myArray, //empty data
            schema: {
                model: {
                    id: "id",
                    fields: {
                       
                        MINUTES: {
                            type: "number", validation: {
                                decimals: 0,
                                required: true,
                                min: 0
                            }, format: '0.'
                        },

It should accept only number. Please help.


Alexander Popov
Telerik team
 answered on 02 Mar 2015
3 answers
257 views
Hi.

I've noticed that when uploading multiple files in async mode the progress bar reaches 100% and then starts over again. This goes for about 3 times. It happens specially when uploading big files (over 100 Mb). I've register a handler to the progress event and log to the console. In the extract below from chrome browser you may see how the file.004 reaches 100% and then starts a 1% again.

    [16024:10352:0202/210719:INFO:CONSOLE(598)] "file.002: 65%"
    [16024:10352:0202/210719:INFO:CONSOLE(598)] "file.004: 97%"
    [16024:10352:0202/210719:INFO:CONSOLE(598)] "file.005: 39%"
    [16024:10352:0202/210719:INFO:CONSOLE(598)] "file.006: 42%"
    [16024:10352:0202/210719:INFO:CONSOLE(598)] "file.002: 68%"
    [16024:10352:0202/210719:INFO:CONSOLE(598)] "file.003: 27%"
    [16024:10352:0202/210719:INFO:CONSOLE(598)] "file.004: 99%"
    [16024:10352:0202/210719:INFO:CONSOLE(598)] "file.001: 27%"
    [16024:10352:0202/210719:INFO:CONSOLE(598)] "file.002: 71%"
    [16024:10352:0202/210719:INFO:CONSOLE(598)] "file.004: 100%"
    [16024:10352:0202/210719:INFO:CONSOLE(598)] "file.005: 40%"
    [16024:10352:0202/210719:INFO:CONSOLE(598)] "file.006: 43%"
    [16024:12948:0202/210719:VERBOSE1:http_auth_controller.cc(256)] The server http://localhost:89/ requested auth
      Has header WWW-Authenticate: NTLM
      Has header WWW-Authenticate: Basic realm="localhost"
    [16024:12948:0202/210719:VERBOSE1:http_auth_sspi_win.cc(24)] AcquireCredentialsHandle returned 0x0
    [16024:12948:0202/210719:VERBOSE1:http_auth_sspi_win.cc(108)] InitializeSecurityContext returned 0x90312
    [16024:10352:0202/210719:INFO:CONSOLE(598)] "file.002: 74%"
    [16024:10352:0202/210719:INFO:CONSOLE(598)] "file.003: 27%"
    [16024:10352:0202/210719:INFO:CONSOLE(598)] "file.004: 1%"
    [16024:10352:0202/210719:INFO:CONSOLE(598)] "file.001: 28%"
    [16024:10352:0202/210719:INFO:CONSOLE(598)] "file.002: 76%"
    [16024:10352:0202/210719:INFO:CONSOLE(598)] "file.004: 2%"
    [16024:10352:0202/210719:INFO:CONSOLE(598)] "file.005: 41%"

I'm using NTLM for authentication and I've noticed the has header WWW-Authenticate: NTLM message everytime that the progress bar goes from 100% to 1%. I think that the file payload is sent 3 times for every http request of the NTLM handshake which is really bad.

Is there a way to solve this?

I've also noticed that the upload component starts the upload of all the files at the same time. In our case the user may salect to upload thousands of files so I would be better to have the control to send only 4-6 files simultaneously, or even being able how many.

Attached is the full log for an upload of 6 big files. Because of implementation issues I can only test the upload in Chrome.

Thanks
Lutfi
Top achievements
Rank 1
 answered on 02 Mar 2015
5 answers
359 views
Hello,

Is there currently a supported way of adding new elements to the diagram using the ShapeOptions type that also provides the underlying dataItem? Currently I can do diagram.addShape(shape, options) to pass in a ShapeOptions object, or diagram.dataSource.add(dataItem) to provide the dataItem and rely on the shapeDefaults. I would like the ability to combine this functionality by either passing the dataItem as part of the ShapeOptions object or as a parameter to a method with the ShapeOptions.

Thanks
T. Tsonev
Telerik team
 answered on 02 Mar 2015
3 answers
329 views
I'm trying to dynamically populate the dropdown list on the grid filter popup. A sample of my approach so far.

filterMenuInit: function(e){
    if(e.field === "City"){
        e.container.data(
"kendoPopup").bind("open", function() {
            var ddl = e.container.find("input").data("kendoDropDownList");
            var ds = ddl.dataSource.data();
            ds.push(
'Another City');
            ddl.setDataSource(
new kendo.data.DataSource({
                data: ds
            }));
        });
    }
}

This seems to be working to update the list just fine. However, the height of the dropdown is getting messed up after subsequent updates. The first time it opens, a scrollbar is correctly shown. Each time thereafter, the height is 'auto' and no longer shows a scrollbar. I believe I've isolated the cause down to the popup deliberately calculating height on first open but never again after.

Changing the .one() call to a .bind() fixes the scrolling issue but I'd like a solution that doesn't involve manually tweaking internal Kendo UI code. Is there a better workaround that will force the popup to recalculate its height on open?
Scott
Top achievements
Rank 1
 answered on 27 Feb 2015
1 answer
169 views
Hi,

I want to know if there is a manual way to commit changes in Data Source for specific rows only and not all data. Is that possible?

Thanks
Alexander Valchev
Telerik team
 answered on 27 Feb 2015
1 answer
82 views
Hi,

I am creating records in batch using Grid / External Form.

Is there a way to commit changes on records inside Data Source manually? i.e. newly  created becomes existing records and those updated becomes updated and committed?

Thanks
Alexander Valchev
Telerik team
 answered on 27 Feb 2015
1 answer
124 views
In one of our editable fields, I've changed it to a readonly textarea for display - because there's sometimes quite a bit of text, how can I change the container for editing that data in to a textarea?

Thank you very much for your time!
Boyan Dimitrov
Telerik team
 answered on 27 Feb 2015
3 answers
812 views
I'm having a hard time getting a model property of type 'date' to bind to inputs of type 'date', 'datetime', or 'datetime-local'. I think the problem is that these inputs require value to be in a particular format or it gets ignored, but the binding isn't formatting the date properly.
<input type=date> requires 'YYYY-DD-MM'
<input type=datetime> requires 'YYYY-DD-MMTHH:mm:ssZ'
<input type=datetime> requires 'YYYY-DD-MMTHH:mm:ss'

Also I can't tell if it's properly parsing the value from the different types once a date is selected.

Gonzalo
Top achievements
Rank 1
 answered on 27 Feb 2015
1 answer
398 views
Hi there, I have a treeview that I add some HTML to after the treeview is rendered.  (For example I add a button after the last child item).  I thought about including the button within my template but I have no way of knowing that the current node being rendered is the last child.  The datasource doesn't have that information either.  So I add the buttons dynamically after the tree is rendered.

I have dragAndDrop = true.   So what is happening is that when I drag and drop a node that had a button it is removing my button that I previously added.  I assume that is because it is running the node through the template again?

Here is my nodes HTML - I added a note below in bold that shows the tag that is added dynamically.
<li role="treeitem" class="k-item" data-uid="05d9dd05-11b4-48d1-8824-e8cd5b998eba" aria-selected="false " id="treeview7469_tv_active"><div class="k-top"><span class="k-in k-state-focused">
    <span class="agendaitem-child"><span style="font-size: .9em;">a</span>. <a id="119366">test</a></span>
    <div class="iteminfo" data-order="1" data-id="119366" style="display: none"></div>
</span></div>
\\The edit-controls tag is dynamically added after tree is rendered
<
div class="edit-controls" style="margin-left: .5em; margin-bottom: .2em;"><a href="#" class="action action-left has-icon btnNewSubItem" data-order="1"><span class="inner"><span class="ui-icon ui-icon-plusthick"></span><span class="button-text">Sub-item</span></span></a><a href="#" class="action action-right has-icon btnNewSubItemQuick" data-order="1"><span class="inner"><span class="ui-icon-rabbit"></span><span class="button-text">Q</span></span></a><div class="invisText" style="display: none; padding-left: 0%;"><input type="text" value="" class="field-thin" style="width: 60%;"><a href="#" class="action action-left has-icon btnAddQuickItem"><span class="innerquick"><span class="ui-icon ui-icon-quickadd"></span></span></a><a href="#" class="action action-right has-icon btnCancelQuickItem" data-order="1"><span class="innerquick"><span class="ui-icon ui-icon-x"></span></span></a><span class="validate" style="width: 100%; display: block;"></span></div></div></li>

I need to re-add that code after I drop the node because it gets removed.  It appears it can't be done in the "drop" event because it is remove AFTER the drop event is finished.

I tested this by looking at the HTML in the drop event:
function onDrop(e) {
            if (e.dropPosition === 'over') {
                console.log("Drag", e.sourceNode, "over", e.destinationNode);
                console.log("SourceNode", e.sourceNode);
            }
        }
Are there any events for "DropEnd" or "Dropped" that happen after the action is completed?

Thanks for your help!

Coty


Coty
Top achievements
Rank 1
 answered on 27 Feb 2015
1 answer
347 views
Hi,
I am trying to create an event to the click of an item from the kendomenu (see bold part in example).
I'm quite new to this and am using a datasource. Is this possible?

window.onload = () => {
$(document).ready(function () {
//Main Ribbonbar Menu
$("#RibbonMenu").kendoMenu(
{
        
dataSource: [
{
text: "Main", imageUrl: "icons/flight.png",
items: [
{
text: "Flights", encoded: false, imageUrl: "icons/flight.png",
items: [
{
text: "Operation Flights", imageUrl: "icons/flight.png", select: function (e) { alert('e');} },
{ text: "Flights", imageUrl: "icons/flight.png" },
{ text: "Timetable Flights", imageUrl: "icons/flight.png" }
]
},
{
Plamen
Telerik team
 answered on 27 Feb 2015
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
Licensing
ScrollView
Switch
TextArea
BulletChart
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
TimePicker
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
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
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?