Telerik Forums
Kendo UI for jQuery Forum
1 answer
99 views
Hi Kendo Team,

I've got a parent grid and in the detail view I've got another grid which is inside a panel. The problem here is, if I open the detail view of two records and click on edit of the first detail view grid and then click on edit of the second detail view grid, the edit mode goes haywire. I'm attaching the pictures of the scenario. Please have a look at the pictures, it didn't happen in Telerik MVC controls. May be I'm doing something wrong. Please let me know.

Thank you
Alexander Valchev
Telerik team
 answered on 08 May 2013
3 answers
1.4K+ views
please refer the  attached  sample chart 

I have a requirement in which we have to show a stacked column chart with two series
we want to show every category in the category axis  to be in a 100 % scale ,but in the data we will be sending only the absolute value not the percentage value, is it possible to achieve this ? if so please advice
Iliana Dyankova
Telerik team
 answered on 08 May 2013
7 answers
945 views
I can't figure out exactly why the scrollbar highlighted in the attached image is being applied. It looks to me like it stems from the css rule for .ksplitter:
.k-splitter {
    height: 300px;
    position: relative;
}
I've created a jsfiddle demonstrating the issue.
Dimo
Telerik team
 answered on 08 May 2013
10 answers
490 views
Hi,

I am trying to create a kendo TreeView (html version) using the following code:

01.var div = $("#divColours");
02.var oid = "12312312", rnd = ((new Date()).getTime()).toString();
03.div.kendoTreeView({
04.  dataTextField: "label",
05.  dataSource: new kendo.data.DataSource({
06.    type: "json",
07.    serverFiltering: false,
08.    transport: {
09.      read: function (options) {
10.        $.ajax({
11.          url: "Controllers/GenericController.ashx?rnd=" + rnd,
12.          dataType: "json",
13.          data: { "parms": ko.toJSON({ cmd: "coloursroot", sysoid: oid }) },
14.          contentType: "application/json; charset=utf-8",
15.          success: function (payLoad) {
16.            if (payLoad.Success) {
17.              var i = ko.toJSON(payLoad.Items);
18.              options.success(i);
19.            } else {
20.            };
21.          },
22.          error: function (jqXHR, textStatus, errorThrown) {
23.            debugger;
24.          },
25.          complete: function () {
26.          }
27.        })
28.      } //read
29.    },
30.    schema: {
31.      model: { hasChildren: false }
32.    } //transport
33.  }) //datasource
34.});
At line 17 my payload items array (which actually is a JSON array)  is converted to string and this is the result:

[{"label":"Zwart","value":"4","haschildren":"true"},{"label":"Wit","value":"1","haschildren":"true"},{"label":"Grijs","value":"7","haschildren":"true"},{"label":"Bruin","value":"8","haschildren":"true"},{"label":"Beige","value":"9","haschildren":"true"},{"label":"Rood","value":"10","haschildren":"true"},{"label":"Geel","value":"11","haschildren":"true"},{"label":"Groen","value":"12","haschildren":"true"},{"label":"Blauw","value":"13","haschildren":"true"},{"label":"Overige kleuren","value":"14","haschildren":"true"}]

Next I set the "options.success" with the result and this is giving me an exception (this exception occurs in the custom kendo js):
"Unable to get value of the property 'toLowerCase': object is null or undefined."

I have tried many things (like using integers for "value" and booleans for "haschildren") but could not find a solution to this problem. Also changed the model, but no success either.

Even when I (manually) change the result to a simplified array like :
"[{"label":"Zwart"},{"label":"Wit"},{"label":"Grijs"},{"label":"Bruin"},{"label":"Beige"},{"label":"Rood"}]"
The same error occurs!

Please help.

Regards,
Robert
Alex Gyoshev
Telerik team
 answered on 08 May 2013
1 answer
128 views

Hello,

Just pulled down the 2013.1.506 bits and a few methods and properties are missing from some of the definitions. Here's what I've found:

interface FlatColorPickerEvent is missing "value:string"

AutoComplete.dataItem, ComboBox.dataItem and DropDownList.dataItem should be declared as "dataItem(index?: number): any;" given that the kendo.ui.List.dataItem uses the selected index if a value is not provided.

Shouldn't TabStrip.remove also be defined as "remove(element: number): kendo.ui.TabStrip;"?

Should TabStrip a definition for "items(): HTMLCollection;"?  It's not documented, but I have referenced it to get the number of tabs in the TabStrip.

Thanks,

Sean


Atanas Korchev
Telerik team
 answered on 08 May 2013
1 answer
217 views
Hello Guys.

Im trying to use the Kendo Date Picker (Not DateTimePicker)

I use it in ASP.Net MVC 4 with Razor 2. In my Model it looks like this :

[Required(ErrorMessageResourceName = "GeburtstagFehlt", ErrorMessageResourceType = typeof(Resources.Shared.ValidationMessages))]
       [Display(Name = "Geburtstag", ResourceType = typeof(Resources.Models.Kontakt))]
       [DataType(DataType.Date, ErrorMessageResourceName = "GeburtstagUngueltig", ErrorMessageResourceType = typeof(Resources.Shared.ValidationMessages))]
       public DateTime Geburtstag { get; set; }
In View:
@model DateTime?
 
@(Html.Kendo().DatePickerFor(m => m))


When i post the Form it show a Validation Failure but the Date is valid.

I am use the swiss/german format dd.MM.yyyy  i am gone to be crazy. Since 4 Hourse i am trying it to fixt this -_-''

So please help me.
Daniel
Telerik team
 answered on 08 May 2013
2 answers
314 views
Hello,

I'm using server side aggregation. It works perfectly when reading data. But if an item is destroyed or updated the aggregate is not recalculated (my update/destroy response contains "aggregates" data). 

For this reason, I need another request to server to read data again - which is not a case in our business application. Is this a known issue? Or maybe there is a workaround for that?

Thanks.

My datasource declaration:

viewModel = kendo.observable({
        gridSource: new kendo.data.DataSource({
            serverAggregates: true,
            transport: {
                read: function(options) {
                    $.ajax({
                        url: "/ajax/getProducts",
                        type: "GET",
                        cache: false,
                        dataType: "json",
                        success: function(result) {
                            options.success(result);
                        }
                    });
                },
                destroy: function (options) {
                    var id = {id: options.data.id};
                    $.ajax({
                        url: "/ajax/deleteProduct",
                        cache: false,
                        type: "DELETE",
                        contentType: "application/json",
                        data: JSON.stringify(id),
 
                        success: function(result) {
                            options.success(result);
                        },
                        error: function(result) {
                            options.error(result);
                            viewModel.gridSource.cancelChanges();
                        }
                    });
                },
 
                update: function (options) {
                    $.ajax({
                        url: "/ajax/updateItem",
                        cache: false,
                        type: "POST",
                        contentType: "application/json",
                        data: JSON.stringify(options.data),
 
                        success: function(result) {
                            options.success(result);
                        },
                        error: function(result) {
                            options.error(result);
                        }
                    });
                }
            },
            schema: {
                data: "data",
                aggregates: "aggregates",
                model: {
                    id: "id",
                    fields: {
                        id: {
                            type: "string"
                        },
                        description: {
                            type: "string"
                        },
                        price: {
                            type: "number"
                        },
                        quantity: {
                            type: "number"
                        }
                    }
                }
            },
            aggregate: [
                { field: "totalPrice", aggregate: "sum" }
            ]
        })
});

My destroy action json response:

{"totalSize":null,"data":[],"aggregates":{"totalPrice":{"sum":51.1}}}

Thank you!


Aurimas
Top achievements
Rank 1
 answered on 08 May 2013
1 answer
156 views
Hi,

I use the Template Grid Column in a lot of places throughout my app to link to related objects. For example, Contacts can be directly linked to an Account, therefore I allow users to navigate to the Account via the Account Name link in the Grid. 
.Columns(columns =>
        {
            columns.Template(c => c.ContactID)
                .ClientTemplate("<a href=\"/Contacts/Details/#=ContactID#\">#=Name#</a>")
                .Title("Name");
            columns.Template(c => c.Account.AccountName)
                .ClientTemplate("<a href=\"/Accounts/Details/#=AccountID#\">#=Account.AccountName#</a>")
                .Title("Account");
        })
Since both columns have an underlying field that is bound (ContactID & AccountID), is there a way to group/filter on these columns like you would on a regular "Bound" field? 

Thanks,
Landon

Petur Subev
Telerik team
 answered on 08 May 2013
3 answers
250 views
I build a menu using a data source to supply the items.  The data source is just an array of objects that have text, url, and items properties (for sub menus)

Subsequently, i want to select some menu item and apply some API function to it, like say enable.
To do so, I need to first find the particular menu item of interest.  It would be nice if the menu item had an ID property. Its easy enough to add that property to my data source, but it doesn't carry through when the menu is rendered.

And, it is pretty easy to see the change that i would like to make to the menu's item template. Just add something like this:
     #= item.id ? 'id=\"'+item.id+'\"' : '' # 
to the item member of the templates object in kendo.menu.js

Problem is, the templates object is a function scoped "private" variable and I can't really see any good way to override or augment Menu to achieve this.

Any suggestions?

Thanks 
roger
Kamen Bundev
Telerik team
 answered on 08 May 2013
1 answer
135 views

Hi,

I've got a snipplet of C# razor syntax below which builds up columns for a 12 month period.

The Month1-12 fields can be null.
I would like to be able to sort on Month<number>.EHR.

For example I want to sort on month 'Month12.EHR'.
Because Month12 is null, the grid continuously looks like it's loading.

How am I able to sort the grid on columns that have null?

@for (int i = 12; i > 0; i--)
{
    <text>
    {
        field: 'Month@(i).EHR',
        title: 'Month@(i)',
        template: '#if (Month@(i) != null) {#$#:Month@(i).EHR#.00 (#:Month@(i).TotalTime#)#} else {# #:"--"# #} #',
        width: 20
    },
    </text>
}

Thanks, Mike.
Daniel
Telerik team
 answered on 08 May 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
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
ScrollView
Switch
BulletChart
Licensing
QRCode
ResponsivePanel
TextArea
Wizard
CheckBoxGroup
Localization
Barcode
Breadcrumb
Collapsible
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
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
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?