Telerik Forums
Kendo UI for jQuery Forum
2 answers
1.4K+ views
Hello, 

is it possible to select a node by the user to be prevented?


Thanks for your answers!  
Alexander
Alexander
Top achievements
Rank 1
 answered on 08 Jan 2013
1 answer
130 views
So I've been working in jsFiddle for quite a while lately trying to get grid editing working the way I've envisioned.

Essentially I have a grid describing some items, and costs associated with them. When toggling a button I want to be able to prevent my editable fields from being edited which I have been able to do. Because the costs on these items are so minimal they go past 2 decimal places of significance I've had to tell the grid to use an editor in which I create a numericTextBox and edit my values from there.

Here's where I run into an issue. I can no longer figure out how to perform any required field validation of my override columns after a value has been changed. I've tried assigning it as an additional validator on the numericTextBox and as a required field in both the column definitions and dataSource to no avail...

Ideally what I want to find a null value and replace it with the default, however I have not been able to tie into any blur, validate, edit, or save events which will let me change the value to default in the numericTextBox when deleted. I would need it to not only persist to the dataSource, but also reflect the default value in the grid as well. You can see my attempt at trying to do this on blur of my numericTextBox where I attempt to set the value to 5. If you delete the value entirely sometimes the text box will flash "5.00" very briefly before saving the null value.

So on blur of a property in a batch edit I'm looking to get a non-generic grid editor control to validate that a field is required, or in the more optimal case, replace it's value with another value.

I have a link to the jsFiddle I have been using to test this out if it helps: http://jsfiddle.net/sparksterz/YFqNC/
Dimiter Madjarov
Telerik team
 answered on 08 Jan 2013
0 answers
85 views
OK, I'm an idiot. The problem I had was entirely my own fault, and since I can't delete the post I'm just removing the content so it doesn't confuse anyone else.
Dave
Top achievements
Rank 1
 asked on 08 Jan 2013
1 answer
258 views
What is the proper way to cause a row to be moved into another group when the value in the relevant cell of its underlying dataItem is changed programmatically?  For example, assume that the grid is being grouped by [department] and then, with the rows grouped beneath the various departments, the following updateTest() method shown below is invoked. We want the updated row to be moved to into the FOO department grouping when the grid is refreshed; also, if the grid did not previously contain a group for FOO, we want a new group created. 

Why am I trying to do this? My application is polling the database server every 30 seconds, and I am trying to figure out how to update existing data as required,  and how to insert new rows into the dataItems array real-time while the users are looking at the grid on their screens, and to do this without causing the entire grid to be rebound [with dataSource.data(someNewFreshDataWithSameSchema) ] as the dataSource.data() method destroys any groupings the users may have established, expanding all groups by default.

EDIT: Updating the underlying dataitems seemed a promising alternative approach to the data() method, but we need the refresh() method to re-apply the sorting/grouping, if not by default, then as an option:   grid.refresh( {resort:true, regroup:true}).  BUT...the re-sort/re-group should not automatically expand collapsed groups.

EDIT: if the user clicks on the ascending/descending sort button on the grouping widget in the k-grouping-header, then the updated row is correctly moved to the proper group based on its new cell value. The grid.refresh() is apparently not calling whatever re-sort method is invoked by that user action.  If the grid.refresh() called that method as well, then the code below would work. Alternatively, the API could expose the appropriate sort method and I could call it myself.

     
function updateTest() {
         var grid = $("#grid").data("kendoGrid");
         var item = $(grid.tbody).find("> tr:not(.k-grouping-row, .k-detail-row, .k-group-footer):first")       
         var dataitem = grid.dataItem(item);       
         dataitem["department"] = "FOO";
        grid.refresh();
     }
Alexander Valchev
Telerik team
 answered on 08 Jan 2013
1 answer
244 views
I'm trying to get a couple of 'From', 'To' datepickers to open automatically on focus. I've got it working fine, apart from the fact that the calendar opens above the inputs - which looks weird. 

How do I get it to open below them, as per convention?

$(".dp").bind("focus", function() {
        $(this).data("kendoDatePicker").open();
});
<div id="datePickers" class="k-group">
    <label>Date Range</label>
    @(Html.Kendo().DatePicker()
        .Name("From")
        .Min(new DateTime(2012, 01, 01))
        .Max(new DateTime(2020, 12, 31))
        .Value(new DateTime(DateTime.Today.Year, DateTime.Today.Month, 1))
        .HtmlAttributes(new { @class = "dp" })
    )
    @(Html.Kendo().DatePicker()
        .Name("To")
        .Min(new DateTime(2012, 01, 01))
        .Max(new DateTime(2020, 12, 31))
        .Value(DateTime.Today)
        .HtmlAttributes(new { @class = "dp" })
    )
     
    <button class="k-button" id="search">Search</button>
</div>
  
Wael
Top achievements
Rank 1
 answered on 08 Jan 2013
10 answers
175 views
With external content loaded into a resizable pane, clicking on the resize handle/bar places an overlay on the page that is never removed, breaking the page.

http://jsfiddle.net/cyphiotic/rXef8/
Lee
Top achievements
Rank 1
 answered on 08 Jan 2013
1 answer
132 views
I'm walking through a basic Kendo UI Mobile setup since our existing app navigation buttons have seemed to have stopped working... and I am experiencing similar issues on a bare-bones html page which can be found here : http://mt.skyprofit.com

I am referencing the code sample walkthrough found here: http://docs.kendoui.com/howto/build-apps-with-kendo-ui-mobile

The problem currently is specifically dealing with the tabstrip... it navigates to the About (Page1.html) page without issue... but going back to Home doesn't work at all.... is the code sample incorrect?? Or is Kendo UI Mobile not working correctly? Thanks in advance!
Alexander Valchev
Telerik team
 answered on 08 Jan 2013
3 answers
855 views
I am following the examples from the wensite but the following configuration still displays the currency in US Dollars.  Is there something else I need to specify in addition to the culture?  Thanks!

$("#currency").kendoNumericTextBox({

format: "c",

culture: "de-DE",

decimals: 3

});

Alexander Valchev
Telerik team
 answered on 08 Jan 2013
1 answer
72 views
I have a Kendo UI Mobile app that uses an index.html file with a few layouts and one initial view, #navigation.
All other views are loaded from separate files in subdirectories like this:

chapter01/page01.html,
chapter01/page02.html
etc.

I intend to use the app in cordova project. Everything seems to be working nicely if i don't use a browser, but only xcode simulator.

One thing bothers me: if I exit from the app after navigating to some pageXX view, and then load the app again, the last viewed view appears briefly, but the application quickly goes to the starting index.html page.

How can I control this behaviour. I'd like to have my application either always go straight to the starting page or stay in the last showed page from the previous app start. Current flashing of previous content is rather annoying. Any idea what I could do to control this in either way I choose?
Alexander Valchev
Telerik team
 answered on 08 Jan 2013
3 answers
153 views
Hi i'd tryed to put splitview and tabstrip together but i faild . Is it possible? Thanks Elios
Kamen Bundev
Telerik team
 answered on 08 Jan 2013
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
AIPrompt
TimePicker
AICodingAssistant
BottomNavigation
Ripple
SkeletonContainer
Avatar
Circular ProgressBar
FlatColorPicker
SplitButton
Signature
Chip
ChipList
VS Code Extension
PropertyGrid
Sankey
Chart Wizard
OTP Input
SpeechToTextButton
InlineAIPrompt
StockChart
ContextMenu
DateTimePicker
RadialGauge
ArcGauge
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
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
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?