Telerik Forums
Kendo UI for jQuery Forum
1 answer
1.3K+ views
Hi,
I have a set of rules like.
Allow to increase value ,
Allow to decrease value.

If we set above rules to false then I should prevent user increasing /Decreasing value from KendoNumericTextBox.

So how can I achieve this?

Code Example:

HTML Code:

<input class="inputMyCall" id="${Id}" type=number min=1 />

JS Code:
_InputMycallObj=$(".inputMyCall").kendoNumericTextBox({

         format: "#",

         spin: OnMyCallsChanged,

     }).data("kendoNumericTextBox");

Please advice.

Regards,
Shankar

 

Dimiter Madjarov
Telerik team
 answered on 15 Feb 2013
8 answers
586 views

Hello,

I have a ListView defined with a corresponding pager. I have my selection being applied similar to your selection demo and my issue occurs when paging through the list view items, after selecting an item, if navigating to a new page I would expect one of the following two scenarios to occur:

1) The selection is retained...Selected data and UI style selection upon return to page of items containing selected item
2) The selection is cleared....Selected data is cleared and UI style selection is removed from previously selected item upon return

What I am experiencing appears to be that the selected data is retained but the UI selection style is removed from the selected item upon return to page of items containing selected item.

This undesirable behavior can bee seen on your demo here:  http://demos.kendoui.com/web/listview/selection.html


Are the UI selection styles being intentionally cleared from the selected item when paging to a different page?


(I am aiming to toggle the enabled state of my 'Ok' button based on whether an item is currently selected or not...)


Thanks,
Lee


Iliana Dyankova
Telerik team
 answered on 15 Feb 2013
6 answers
547 views
if I bind to a nullable integer which has an initial value of null, the combobox always returns a null value value to the controller, even if a value has been selected. if I change it to work with a  standard integer, it returns the correct value, but it also sets an initial value in the list which I do not want.

thoughts?

no initial value, but not updating either: public int? QuoteId { get; set; } 
returning values as expected, but populating 0: public int QuoteId { get; set; } 

@(Html.Kendo().ComboBoxFor(m => m.QuoteId)
                  .DataSource(dataSource => dataSource
                                                .Read(read => read.Action("GetQuoteList", "Payment")))
                  .DataTextField("Text")
                  .DataValueField("Value")
                  )
Josiah
Top achievements
Rank 1
Veteran
 answered on 15 Feb 2013
3 answers
137 views
Hi,

I have a similar code as your sample (http://demos.kendoui.com/web/grid/editing.html)

@(Html.Kendo().Grid<Kendo.Mvc.Examples.Models.ProductViewModel>()    
    .Name("Grid")    
    .Columns(columns => {        
        columns.Bound(p => p.ProductName);
        columns.Bound(p => p.UnitPrice).Width(140);
        columns.Bound(p => p.UnitsInStock).Width(140);
        columns.Bound(p => p.Discontinued).Width(100);
        columns.Command(command => command.Destroy()).Width(110);
    })
    .ToolBar(toolbar => {
        toolbar.Create();
        toolbar.Save();        
    })
    .Editable(editable => editable.Mode(GridEditMode.InCell))
    .Pageable()
    .Sortable()
    .Scrollable()
    .DataSource(dataSource => dataSource        
        .Ajax()         
        .Batch(true)
        .ServerOperation(false)
        .Events(events => events.Error("error_handler"))
        .Model(model => model.Id(p => p.ProductID))
        .Create("Editing_Create", "Grid")
        .Read("Editing_Read", "Grid")
        .Update("Editing_Update", "Grid")
        .Destroy("Editing_Destroy", "Grid")
    )
)
When I tried to add a new record, the count is incremented (say from 6 to 7), but once I hit the Save button, the count goes back to 6. If I refresh the page, the count will be correct (7). Any idea on how to fix this? Thank you so much.
Rosen
Telerik team
 answered on 15 Feb 2013
2 answers
41 views
The ComboBox binding to remote data demo is broken.  When it tries to bind the combobox, it throws the error "Uncaught SyntaxError: Unexpected token > ".  This happens in both Chrome 26 and IE8.

I tried to submit a bug report about this, but kept getting server errors when I tried to submit.
Richardsonke
Top achievements
Rank 1
 answered on 15 Feb 2013
3 answers
139 views

I have this situation:

I have some Views and by default they have assigned a Layout for them. The problem is that in some specific cases, I need to change the Layout of some of these Views in the Javascript file.

I am using this way:

$("#tabstrip-dash").setAttribute('data-layout', 'mobile-tabstrip-layout2');

This solution works only if I reload the application, but I want to change it instantly.

Is there any way to set the new Layout?

Thanks!

Alexander Valchev
Telerik team
 answered on 15 Feb 2013
1 answer
173 views
Hi,

I encountered a problem with listview endless scrolling.
The endless scrolling stops working after refesh the datasource.

I made a jsFiddle http://jsbin.com/amifov/3/edit

Try to make an endless scroll action and then hit the refresh button.

Thanks,
Martin
Georgi Krustev
Telerik team
 answered on 15 Feb 2013
1 answer
141 views
Hi All,

Just wondering if there is an out of the box solution for my small but frustrating issue: 

I am plotting bubbles on a chart, that has a y-axis of, say, min 0 and max 200. If I plot a bubble at y-0 the bubble will naturally cover the x-axis, which is correct. However, the way my chart has been designed (drop shadow involved!), I do not want the bubble to cover the x-axis line, I need some sort of buffering so min y-axis value appears higher up, therefore the whole bubble can fit into the chart, within the x-axis.

Any advice would be appreciated!

Cheers
Chris
Alexander Valchev
Telerik team
 answered on 15 Feb 2013
2 answers
95 views
So I have a scenario which I believe should be do-able in some form however I can't seem to figure out how to do it. Take for example the batch editing on the demo page: Batch Demo

Now imagine I've added another column which is now "Total Cost". What I'd like to do is trap on either a change in "Unit Price", or change in "Unit Stock" and be able to update the "Total Cost" field, and mark that as dirty.

I can go into the datasource and alter the value, but it seems when I refresh the grid, the dirty statuses are cleared. Is there a nicer way to do this that I'm missing?
Brian
Top achievements
Rank 1
 answered on 15 Feb 2013
4 answers
403 views
I'm just evaluating the Kendo grid for an upcoming project and I'm hunting for demos for the functionality that I need.

I have created a grid in an asp.net razor view that takes a viewmodel.  A couple of the model properties are enums which display nicely but when clicking into the cell just render a text box with the enum value (1,2,3,etc).

Does anyone have a demo where the edit field is an appropriate dropdown rather than the raw value of the enum?

Thanks in advance :)

=================================================================================

For reference the model and view I'm using are:
public class HomeMonitorViewModel {
 
  public int Id { get; set; }
  [Required, StringLength(255)]
  public string Name { get; set; }
  [Required, StringLength(128)]
  public string HostSystem { get; set; }
  public string Description { get; set; }
  public Data.MonitorClassification Classification { get; set; }
  public DateTime DateAdded { get; set; }
  public bool HasBeenAdministered { get; set; }
  public Data.MonitorSource Source { get; set; }
  public int MonitorAliasId { get; set; }
  public string MonitorAliasName { get; set; }
 
}
 
public enum MonitorClassification {
  Default = 1,
  Standard = 2,
  Bespoke = 3
}
 
public enum MonitorSource {
  Policy = 1,
  Adhoc = 2,
  Unknown = 3
}
@(Html.Kendo().Grid<ProjectBlackSun.Models.Home.HomeMonitorViewModel>()
  .Name("MonitorGrid")
  .Columns(c => {
    c.Bound(m => m.Name);
    c.Bound(m=>m.MonitorAliasName);
    c.Bound(m=>m.Description);
    c.Bound(m=>m.HostSystem);
    c.Bound(m=>m.Classification);
    c.Bound(m=>m.Source);
  })
  .ToolBar(t => {
    t.Create();
    t.Save();
  })
  .Editable(e => e.Mode(GridEditMode.InCell))
  .Pageable()
  .Sortable()
  .DataSource(d => d
    .Ajax()
    .Batch(true)
    .ServerOperation(false)
    .Events(e => e.Error("error_handler"))
    .Model(model => model.Id(monitor => monitor.Id))
    .Create("MonitorGridCreate", "Home")
    .Read("MonitorGridRead", "Home")
    .Update("MonitorGridUpdate", "Home")
    .Destroy("MonitorGridDestroy", "Home")
  )
)
 
<script type="text/javascript">
    function error_handler(e) {   
        if (e.errors) {
            var message = "Errors:\n";
            $.each(e.errors, function (key, value) {
                if ('errors' in value) {
                    $.each(value.errors, function() {
                        message += this + "\n";
                    });
                }
            });       
            alert(message);
        }
    }
</script>



Nick
Top achievements
Rank 1
 answered on 15 Feb 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
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
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?