Telerik Forums
Kendo UI for jQuery Forum
7 answers
2.6K+ views
Hello,
I'm posting something that should be highlighted in the documentation.
A great feature i discovered playing with the source code.
You can assign, not only a string to a COLUMN.template ( es. #= column_a # ) , but also a function.
This function has a parameter that is the current-row data item.
So no need for complicated strings, escaping, conditional clause inside strings...
Just put your logic in this function and return just the formatted value
You can even return the classic string template that is parsed by the kendo template engine.

colby
Top achievements
Rank 1
 answered on 01 Nov 2013
1 answer
207 views
Hello,

I see how to specify a dropdownlist for a column filter, however it appears to require a data source for the list items. Is it possible to specify that this data source be the unique values in the column being filtered on?

Thanks,
Gary
Dimiter Madjarov
Telerik team
 answered on 01 Nov 2013
1 answer
77 views
Not sure what the problem is, but here is my JS Console out put from Chrome while I try to log in.
Svetoslav Petsov
Telerik team
 answered on 01 Nov 2013
9 answers
1.0K+ views
I want to map different 'Series' on 'Stacked Bar Chart' at run time utilizing remote JSON file.

My JSON file include following attribute Project ID, Year, Month and Expense. No. of projects is decided at run time.

[{"ProjectID":1,"Year":2011,"Month":11,"Expense":202.02},{"ProjectID":1,"Year":2011,"Month":12,"Expense":266.91},{"ProjectID":1,"Year":2012,"Month":1,"Expense":274.91},{"ProjectID":1,"Year":2012,"Month":2,"Expense":287.3},{"ProjectID":1,"Year":2012,"Month":3,"Expense":279.47},{"ProjectID":5,"Year":2011,"Month":11,"Expense":261.16},{"ProjectID":5,"Year":2011,"Month":12,"Expense":258.13},{"ProjectID":5,"Year":2012,"Month":1,"Expense":315.84},{"ProjectID":5,"Year":2012,"Month":2,"Expense":344.66},{"ProjectID":5,"Year":2012,"Month":3,"Expense":346.18}]

I have seen the example on the Demo Page in which 'Series' is mapped to the field names.

series:
[{
field
: "nuclear",
name
: "Nuclear"
}, {
field
: "hydro",
name
: "Hydro"
}, {
field
: "wind",
name
: "Wind"
}],

Is it possible to bind 'Series' by specifying fields along with values like

series:
[{
field
: "ProjectID=1",
name
: "My First Project"
}, {
field
: "ProjectID=5",
name
: "My Fifth Project"
}, {
field
: "ProjectID=8",
name
: "Most Eighth Project"
}],

Thanks!
Hristo Germanov
Telerik team
 answered on 01 Nov 2013
1 answer
141 views
I am using the Kendo Grid Batch Editing Tool. I do not want to use the create button. I want to save(create) the records if the do not exist and if they do exist I want to update the records.

This should all be performed under the update function.

Basically I want to combine the following lines of code somehow:

xxx.Entry(entity).State = EntityState.Added;
xxx.Entry(entity).State = EntityState.Modified;
Vladimir Iliev
Telerik team
 answered on 01 Nov 2013
5 answers
354 views
Hi!

i am creating a custom schedule view like that:

var SchedulerWeekView = kendo.ui.MultiDayView.extend({
          options: {
              selectedDateFormat: "{0:D} - {1:D}"
          },
          nextDate: function () {
              var startDate = this.startDate();
              return new Date(startDate.setDate(startDate.getDate() + 7));
          },
          previousDate: function () {
              var endDate = this.endDate();
              return new Date(endDate.setDate(endDate.getDate() - 7));
          },
          name: "SchedulerWeekView",
          calculateDateRange: function () {
 
              var selectedDate = this.options.date,
                  start = kendo.date.dayOfWeek(selectedDate, this.calendarInfo().firstDay, -1),
                  idx, length,
                  dates = [];
 
              for (idx = 0, length = 7; idx < length; idx++) {
                  if (start.getDay() <= 5 && start.getDay() > 0) {
                      dates.push(start);
                  }
                  start = kendo.date.nextDay(start);
              }
 
              this._render(dates);
          }
 
      });
I would like to show the week number on selectedDateFormat. Right now it shows: {week start date} - {week end date}.
Is that possible to change format to show the week number?

Thanks!
Igor
Top achievements
Rank 2
 answered on 01 Nov 2013
1 answer
89 views
I encountered this problem awhile back and am just now getting around to troubleshooting it. I am using an iPad Mini with iOS 7.0.3. This issue does not occur on a Samsung Galaxy S3 or a Nexus 7 tablet. This bug occurs with KendoUI 2013.2.716 and the most recent internal build 2013.2.1024.

On the iPad Mini, we loaded up our app website in portrait mode, and it looked normal. But when rotating the iPad to landscape mode, the top navbar suddenly lost about 50% height, so it was now half hidden. You can still scroll the content like normal, but the navbar remains half hidden. The strangest thing is that if you tap anywhere above the address bar (where the time and battery level indicators are displayed), the navbar will suddenly scroll back fully into view. What the heck is going on?

I uploaded a Youtube video so you can see the process in action. This bug is occurring on our own web project AND on Kendo's mobile application overview demo located at http://demos.kendoui.com/mobile/m/index.html#/mobile/m/application/index.html
Petyo
Telerik team
 answered on 01 Nov 2013
1 answer
42 views
I am having Sample record in Grid as following

No               Name                     Price
1                  Wheat                    12
2                  Bread                     15
3                  Egg                          20
4                  Milk                        15
5                  Egg                          13

In grid i edit the 3rd record price (Egg) to 15 and saved in grid
once it is done the fifth record (Egg) Price also need to automatically update to 15.

is it possible with Kindo UI.
Thanks in Advance..
Daniel
Telerik team
 answered on 01 Nov 2013
3 answers
627 views
I am trying to load the tree data on demand using the read and sending down id, hasChildren, and expanded - since I want to expand the root initially.  Only the root node has the expanded value true, all others have it false.

My data source is:
dataSource: new kendo.data.HierarchicalDataSource({
    transport: {
        read: {
            url: '/WidgetJson/OrgTree',
            type: 'POST',
            dataType: 'json',
            data: function (currentParams) {
                var params = {};
                params['includeCardAccounts'] = true;
                return params;
            }
        }
    },
    schema: {
        model: {
            id: 'OrgId',
            hasChildren: 'HasChildren',
            expanded: 'Expanded'
        }
    }
}),
dataTextField: 'OrgDescription'

and the first JSON response from the server is:
[{"OrgId":46431736,"OrgDescription":"XYZ DEPT Company","HasChildren":true,"Expanded":true}]
and this is the root item and is properly expanded in the tree view - properly reflecting the "Expanded":true.
the second JSON response from the server is (truncated for brevity):
[{"OrgId":46431761,"OrgDescription":"OPExxxxxx - Ixx","HasChildren":true,"Expanded":false},{"OrgId":46431760,"OrgDescription":"OS xxxxxx IBA","HasChildren":true,"Expanded":false},{"OrgId":46431759,"OrgDescription":"ODSxxxxxx- IBx","HasChildren":true,"Expanded":false}]
Note that the first item in this JSON object ("OPExxxxxx - Ixx") is shown with the "Expanded":false, but in the treeview it is displayed as expanded.

...and there are about 26 total AJAX requests that load the tree (all with "Expanded":false).  Is there anything here that would indicate why we are expanding each node and therefore loading all children?

One odd thing to note is that the plus/minus of all nodes including the root are in the "+" state even though all nodes are expanded.  When I click the plus/minus to collapse a node, it remains "+" and when I click it again to expand it, it changes to "-".  Not sure that sheds any light on the issue, but thought it was odd and perhaps useful.

Thanks,
--Ed
Alex Gyoshev
Telerik team
 answered on 01 Nov 2013
1 answer
265 views
Is there a way to have the validation token with kendo grid ?
Ignacio
Top achievements
Rank 1
 answered on 31 Oct 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?