Telerik Forums
Kendo UI for jQuery Forum
1 answer
895 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
288 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
265 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
3 answers
264 views
I have the following code.

$(

'span[data-class=ModalLink]').click(openmodal);
$('a[data-class=ModalLink]').click(openmodal);

    $('span[data-class=ModalLink]').click(openmodal);
    $('a[data-class=ModalLink]').click(openmodal);
    function openmodal(event) {
        event.preventDefault();
        var contentUrl = $(this).attr("data-content");
        if (!contentUrl) {
            contentUrl = $(this).attr("href");
        }
        if (contentUrl) {
            var dialog = $("#modalwindow");
            dialog.kendoWindow({
                modal: true,
                title: $(this).attr("data-title"),
                actions: ["Close"],
                draggable: $(this).attr("data-draggable"),
                resizable: $(this).attr("data-resizable"),
                height: $(this).attr("data-height"),
                width: $(this).attr("data-width"),
                content: contentUrl
            });
            dialog.data("kendoWindow").center();
            dialog.data("kendoWindow").open();
        }
        else {
            alert("The URL to populate the modal window is missing.");
        }
I want the window configuration value like width, height etc. to change every time I open the window. It is not happening. I can see in the debugger that new values are there window is not updating the values except content. How can do this?
 
Alex Gyoshev
Telerik team
 answered on 14 Aug 2012
6 answers
273 views
Hi guys,

Been working with the new Action Sheet control and it's been really great! Just struggling with one thing at the moment.

I'm trying to open a Kendo ActionSheet control in javascript with the following sort of approach:

$("#MyTestActionSheet").data("kendoActionSheet").open();

I assume the open method (Which I found in the documentation) is correct but i'm not accessing the Kendo data object correctly to call it. I've tried using "kendoActionSheet" (based on how it is done with other controls) but It doesn't seem to exist and I'm struggling to find documentation on how to do it.

Am I missing something?

Thanks in advance,

Rob

Iliana Dyankova
Telerik team
 answered on 14 Aug 2012
1 answer
171 views
Which IDE has code completion, intellisense, and error checking for use with Kendo?
N Mackay
Top achievements
Rank 1
 answered on 14 Aug 2012
7 answers
183 views
I found statements on an Accessibility page regarding support for these standards for the ASP.Net controls. I have been unable to find any similar statement regarding the Kendo UI controls. Can you clarify the current status/planned support.

Thanks
Doug Hay
Sebastian
Telerik team
 answered on 14 Aug 2012
1 answer
145 views
I'm receiving the following error when a date is either typed in or selected in a DatePicker in IE8 (doesn't happen in IE9)

Microsoft JScript runtime error: Object doesn't support property or method 'substr'
The error is happening on line 1346 of kendo.web.js

The DatePicker is in a pop-up editor:
The data is queried via a web service with a JSON response.

I am using a custom parser for the date returned from the service

I'm not sure why I'm receiving this error.
function customParser(data) {
    if (data != null) {
        var str = data.toString();
        if (str.indexOf("Date") >= 0)
            return new Date(parseInt(data.substr(6)));
    }
    else
        return data;

<!-- datepicker editor for field: "ManufactureDate" -->
        <input type="text"
            name="ManufactureDate"
            data-type="date"
            data-bind="value:ManufactureDate"
            data-role="datepicker" />

Cyndie
Top achievements
Rank 1
 answered on 14 Aug 2012
11 answers
724 views
Hi,

Is it possible to have different color on each column in a column chart and also to have different color depending on the value.
For instance if a column can have values from 0 -100 and you would like to have one color on values from 0-25 and one between values 26-75 and so on..

Kriti
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
Drag and Drop
Application
Map
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
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?