Telerik Forums
Kendo UI for jQuery Forum
1 answer
170 views
Hi,
i'm trying to fix a code that resets the "end time" minimum value to be half hour more than the "begin time".

var value = $("#begin").data("kendoTimePicker").value();
var end = $("#end").data("kendoTimePicker");
 
                if(value.getHours().toString() == "18" && value.getMinutes().toString() == "30")
                {
                    var minimo = new Date(value.getTime() + 30*60000);                   
                    end.value(minimo);
                    end.enable(false);
                }
                else
                {
                    var minimo = new Date(value.getTime() + 30*60000);
                    end.min(minimo);
                    end.enable(true);
                }

For some reason, the code ends in error because it says that "min is not a function". In the docs it says it is? Is this some kind of bug of some sort?

Don't think it's due to wrong reference because the value function works. Can you help me here?
David Beck
Top achievements
Rank 1
 answered on 15 Aug 2012
1 answer
112 views
Combine the AutoComplete and ComboBox and include features from http://ivaynberg.github.com/select2/
Jonathan
Top achievements
Rank 1
 answered on 14 Aug 2012
0 answers
176 views
Hello Telerik Team,

I have a grid with in-cell editing enabled and the grid is bound to my DepositDepartment model below.  Each DepositDepartment can optionally have a DepositDivision.  This DepositDivision can be chosen by the dropdown list I have on the grid.  The dropdown list gets its Text field from DepositDivision.Name and the Value field from DepositDivision.Id.  I also wire the Save event of the grid, so I can set DepositDivisionId property of the model.  I also need to set the DepositDivisionName property as it will be used for display when the cell comes out of the edit mode. 

public class DepositDepartment
{
    public int Id { get; set; }
    public string Name { get; set; }
    public int? DepositDivisionId { get; set; }
    public string DepositDivisionName { getset; }      
    /* other fields omitted */
}
 
public class DepositDivision
{
    public int Id { get; set; }
    public string Name { get; set; }
    /* other fields omitted */
}

With this setup, everything is working fine except for one specific scenario.  If I select "(None)" on the dropdown and get out of the edit cell.  The next time go into that cell and try to select some legit DepositDivision, when I come out of the cell, it won't have any effect (it will still show blank).  And when that happens, the Save event of the grid won't fire.  I've managed to narrow down the issue and found that in the code snippet below, it will somehow determine that the DepositDivisionId property is an observable object after I select the "(None)" option.  Specifically, when I select "(None)"  (which has empty string as its value) and get out of the edit cell, the grid fires the Save event properly and I set the DepositDivisionId property of my model to empty.  So far so good.  However, when I try to edit the dropdown again (without saving changes on the grid), the "this.widget.value()" will return null instead of empty.  The null value will cause _isObservableObject to be true.  And a little further down the value will be replaced by "value = source[idx];".  At this point the value variable will be the model corresponding to the grid row instead of just blank.  I think this is what causes the this.bindings.value.set(value) to fail and as a result, it won't trigger the Save event of the grid.

change: function () {
    var value = this.widget.value();
    var idx, length;
 
    var field = this.options.dataValueField || this.options.dataTextField;
 
    if (field) {
        var source,
            isObservableObject = this._valueIsObservableObject;
 
        if (this.bindings.source) {
            source = this.bindings.source.get();
        }
 
        if (value === "" && isObservableObject) {
            value = null;
        } else {
            if (!source || source instanceof kendo.data.DataSource) {
                source = this.widget.dataSource.view();
            }
 
            for (idx = 0, length = source.length; idx < length; idx++) {
                if (source[idx].get(field) == value) {
                    if (isObservableObject) {
                        value = source[idx];
                    } else {
                        value = source[idx].get(field);
                    }
                    break;
                }
            }
        }
    }
 
    this.bindings.value.set(value);
},

The sample project size is slightly large than the attachment limit but you can download it from the external link below.

http://dl.dropbox.com/u/18673670/TelerikSamples.zip

I know this is a very specific issue. So if you need further clarification, please feel free to let me know.

Thank you,
ben
Top achievements
Rank 1
 asked on 14 Aug 2012
2 answers
153 views
Hello everyone

Is there a way to set up a specific color to a serie? I am using a webservice.

I am bringing status, description and count... if I want put all that series with the estatus "disabled" in red...

I tried to work with my colors string array but the behavior it isn't standar
 series: [{ field: "count"}],
 seriesColors: ["#FF0000", "#0000FF", "#74DF00", "#DF3A01"],
Iliana Dyankova
Telerik team
 answered on 14 Aug 2012
1 answer
209 views
I want to change the standard select button to my own image.  How can I do this?
Alexander Valchev
Telerik team
 answered on 14 Aug 2012
1 answer
216 views
When TreeView is defined as static structure, or dataSource parameter is array type, expand method works correctly. But if items are bind by Kendo dataSource object the expand method works only if tree node was previously expanded "manually". This issue have consequence also for append method - if we use it to add item to "not-expanded" node it will destroy all child items for this node.

I've added simple example of this issue.

regards,
Piotr
Alex Gyoshev
Telerik team
 answered on 14 Aug 2012
1 answer
891 views
I want to create a custom toolbar. Here is my code:

toolbar:[{
    text: "Go to Add User Page",
    className: "k-grid-custom",
    imageClass: "k-add"
}],

function createUser(){
alert('Hello World');
}

I want to call the function named createUser when this button is clicked. How to make it possible?
dave
Top achievements
Rank 1
 answered on 14 Aug 2012
3 answers
282 views
Hallo,
it's me first step in Kendo Web and I have a big Problem. (Sorry for my bad englisch)
I have a APS.NET MVC 4 Projekt. 

In the @Code -Area I get the data with Linq. I convert it also to a Json-String

@Imports Newtonsoft.Json
@code

  ' -- die Teams einlesen
  Dim ccT = (From p2 In ctx.TeamSet Order By p2.TeamName Select p2.TeamName, p2.Id).ToList()
  Dim ccTeams = JsonConvert.SerializeObject(ccT , Formatting.None)
End Code

Then I have the HTML-Code for my KendoDropDownList

<input id="ecolor" value="1" />

And now my Script

<script>
    $(document).ready(function () {
 
        // create DropDownList from input HTML element
        $("#ecolor").kendoDropDownList({
            dataTextField: "TeamName",
            dataValueField: "Id",
            dataSource: '@ccTeams',
            index: 0,
            change: onChange2
        });
 
        var color2 = $("#ecolor").data("kendoDropDownList");
        function onChange2() {
            var value = $("#ecolor").val();
            alert(value)
        }
    });
 
</script>

That dosn't work. The DropDownBox is empty. What is wrong? 
Thanks in advance 

Roland




John DeVight
Top achievements
Rank 1
 answered on 14 Aug 2012
2 answers
245 views
Hello
when use Ajax binding sorting and filtering parameter where not correctly passed on server handler:
I usethe following code in my MVC view:
<%:
 
Html.Kendo().Grid<Totalcom.XBase.Biz.Base.Models.Elements.Element>()
.Name("Grid").Columns(columns =>
{
     
    columns.Bound(p => p.IsActive).Title("Attivo");
    columns.Bound(p => p.Name);
    columns.Bound(p => p.Key);
     
})
.DataSource(dataSource => dataSource
        .Ajax() // Specify that the data source is of ajax type
        .Model( model =>
            {
            model.Id (x => x.Key);
            model.Field(x => x.IsActive);
            model.Field(x => x.Name);
            model.Field(x => x.Key);
            })
          .Sort(sort => sort
              .Add(x => x.Name)) 
        .Read(read => read.Action("GetChildren", "Documents", new { Area = "CMS", Id = Model.Key, ApplicationKey = Html.GetSessionInfo().ApplicationKey}))  
         
        )
.Sortable()
.Pageable()%>

and when I try to sort the get query is the following:

/CMS/Documents/GetChildren/xx?&take=10&skip=0&page=1&pageSize=10&sort%5B0%5D%5Bfield%5D=Name&sort%5B0%5D%5Bdir%5D=desc

it seems that the sort parameter is not correctly encoded. on my controller the code is the following :

public ActionResult GetChildren([DataSourceRequest]DataSourceRequest request)
      {
         ...
          DataSourceResult result = children.ToDataSourceResult(request);
          return Json(result, JsonRequestBehavior.AllowGet);
      }


request.Sort and request.filter are NULL
Any suggestion?
Lorenzo
Top achievements
Rank 2
 answered on 14 Aug 2012
2 answers
261 views
I would like to implement an outlook style panel bar similar to what is implemented in the Telerik ASP.NET Ajax Panel Bar demo here: 
http://demos.telerik.com/aspnet-ajax/panelbar/examples/applicationscenarios/outlooknavigation/defaultcs.aspx 

Is this possible with the KendoUI panel bar?
David
Top achievements
Rank 1
 answered on 14 Aug 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
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
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?