Telerik Forums
Kendo UI for jQuery Forum
2 answers
2.1K+ views
The style icon button for k-i-close dont appear
Dimo
Telerik team
 answered on 13 Jan 2015
1 answer
187 views
I need some way of selecting a cascadeFrom relationship other than the Id, because there is a dynamic list of cascading dropdowns (see illustration below).



Table
-----------------------------------------------------------------------------------------------------------
 Row 1    [ Dropdown 1 ]  [ Dropdown 2 ]  [ Dropdown 3 ]  [ Dropdown 4 ]
 Row 2    [ Dropdown 1 ]  [ Dropdown 2 ]  [ Dropdown 3 ]  [ Dropdown 4 ]
 Row 3    [ Dropdown 1 ]  [ Dropdown 2 ]  [ Dropdown 3 ]  [ Dropdown 4 ]
-----------------------------------------------------------------------------------------------------------
[ Add more rows ]



Alexander Popov
Telerik team
 answered on 13 Jan 2015
3 answers
368 views
I'm trying to use a kendo chart in a dynamically sized environment. 

To make sure that everything scales properly, I have applied a css transform to the bounding container.

The problem is that when you mouse-over any of the series in the chart, only the series that sit over top of the original size of the chart (before CSS transform is applied) will show the tooltip.  If you mouse over any other series that is scaled outside of the original bounds of the chart, the bar flashes with the highlight color beiefly, then goes back to normal and no tooltip appears at all.

I used the Kendo UI Dojo to generate a sample that exhibits the issue I am seeing:
I copied the chart generation from one of the demos, and applied a transform to the DIV it is inside.

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>Untitled</title>
 
 
  <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
</head>
<body>
  <div id="wrapper" style="width: 300px; height: 300px; position: relative; transform: matrix(1.5,0,0,1.5,150,150)">
    <div id="example">
    <div class="demo-section k-content">
        <div id="chart" style="background: center no-repeat url('../content/shared/styles/world-map.png');"></div>
    </div>
    <script>
        function createChart() {
            $("#chart").kendoChart({
                title: {
                    text: "Gross domestic product growth /GDP annual %/"
                },
                legend: {
                    position: "top"
                },
                seriesDefaults: {
                    type: "column"
                },
                series: [{
                    name: "India",
                    data: [3.907, 7.943, 7.848, 9.284, 9.263, 9.801, 3.890, 8.238, 9.552, 6.855]
                }, {
                    name: "Russian Federation",
                    data: [4.743, 7.295, 7.175, 6.376, 8.153, 8.535, 5.247, -7.832, 4.3, 4.3]
                }, {
                    name: "Germany",
                    data: [0.010, -0.375, 1.161, 0.684, 3.7, 3.269, 1.083, -5.127, 3.690, 2.995]
                },{
                    name: "World",
                    data: [1.988, 2.733, 3.994, 3.464, 4.001, 3.939, 1.333, -2.245, 4.339, 2.727]
                }],
                valueAxis: {
                    labels: {
                        format: "{0}%"
                    },
                    line: {
                        visible: false
                    },
                    axisCrossingValue: 0
                },
                categoryAxis: {
                    categories: [2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011],
                    line: {
                        visible: false
                    },
                    labels: {
                        padding: {top: 135}
                    }
                },
                tooltip: {
                    visible: true,
                    format: "{0}%",
                    template: "#= series.name #: #= value #"
                }
            });
        }
 
        $(document).ready(createChart);
        $(document).bind("kendo:skinChange", createChart);
    </script>
</div>
 
  </div>
</body>
</html>

Are there any work-arounds that can be done to address this, aside from setting the actual size of the chart?  The reason we are not setting the dimensions on the chart explicitly, is because the text does not scale along with the increase in chart size.
Dimo
Telerik team
 answered on 13 Jan 2015
1 answer
324 views
Hello,
I extend multiselect functionality with entering free text and after press ";" key i add item to datasource... Everything looks and works fine until i made kendo.bind (after save i reload data and make rebind - simulating this action on checkbox - primitivechanged). When I enter only one item its working fine, but when i enter more than one I lost everything except last item.

Sometimes i get error 'Cannot read property 'style' of undefined' (in kendo.multiselect.js - _select: function...)

Any suggestions on how to make this work?

Thanks
Georgi Krustev
Telerik team
 answered on 13 Jan 2015
1 answer
372 views
 I am trying to save the modified changes from kendo ui grid, but its not hitting the controller method. Here is my view code,

@(Html.Kendo().Grid(Model.BisStudentModel)
 .Name("grdStudent")
 .Columns(columns =>
 {
 columns.Command(cmd => cmd.Edit());
 columns.Bound(c => c.ContractNumber).Title("Contract No.").Filterable(ftb => ftb.Cell(cell => cell.Operator("contains").InputWidth(60))).Width("30%");
 columns.Bound(c => c.TeacherLastName).Title("Last Name").Filterable(ftb => ftb.Cell(cell => cell.Operator("contains").InputWidth(80))).Width("30%");
 columns.Bound(c => c.TeacherFirstName).Title("First Name").Filterable(ftb => ftb.Cell(cell => cell.Operator("contains").InputWidth(80))).Width("30%");
 columns.Bound(c => c.SchoolCode).Title("School Code").Filterable(ftb => ftb.Cell(cell => cell.Operator("contains").InputWidth(60))).Width("30%");
 columns.Bound(c => c.SchoolId).Title("School ID").Filterable(ftb => ftb.Cell(cell => cell.Operator("contains").InputWidth(60))).Width("30%");
 columns.Bound(c => c.EducationLevel).Title("Education Level").Filterable(ftb => ftb.Cell(cell => cell.Operator("contains").InputWidth(60))).Width("30%");
 columns.Bound(c => c.StudentLastName).Title("Student Last Name").Filterable(ftb => ftb.Cell(cell => cell.Operator("contains").InputWidth(80))).Width("30%");
 columns.Bound(c => c.StudentFirstName).Title("Student First Name").Filterable(ftb => ftb.Cell(cell => cell.Operator("contains").InputWidth(80))).Width("30%");
 columns.Bound(c => c.StudentSsn).Title("SSN").Filterable(ftb => ftb.Cell(cell => cell.Operator("contains").InputWidth(60))).Width("30%");
 columns.Bound(c => c.StudentStn).Title("STN").Filterable(ftb => ftb.Cell(cell => cell.Operator("contains").InputWidth(70))).Width("30%");
 columns.Bound(c => c.ClockHoursofStudent).Title("Clock Hrs.").Filterable(ftb => ftb.Cell(cell => cell.Operator("contains").InputWidth(70))).Width("30%").Format("{0:n2}");
  
 })
.HtmlAttributes(new { Style = "height:500px" })
.Sortable()
.Pageable(pager => pager.PageSizes(new int[] { 10, 20, 50, 100 })
.ButtonCount(20))
.Filterable(ftb => ftb.Mode(GridFilterMode.Row))
.DataSource(dataSource => dataSource
.Ajax() 
.Model(model => model.Id(m => m.BisEnrollment))
.Destroy(destroy => destroy.Action("Products_Destroy", "EnrollmentViewEdit"))
.Update(up => up.Action("SaveBisStudentClassdata", "EnrollmentViewEdit").Type(HttpVerbs.Post)))
.Editable(ed => ed.Mode(GridEditMode.PopUp).TemplateName("_StudentEditor").Window(w => w.Title("Edit " + Model.HeaderLabelText).Width(1200))
 ))
 
 And my update actionmethod in the controller is,
 
  public ActionResult SaveBisStudentClassdata([DataSourceRequest] DataSourceRequest request, [Bind(Prefix = "models")]  IEnumerable<StudentDataModel> studentDataModels)
   {
if (studentDataModels != null && ModelState.IsValid)
{
var model = studentDataModels[0];
var studentDataModel = new StudentDataModel
{
BisEnrollment = model.BisEnrollment,
ContractNumber = model.ContractNumber,
StudentFirstName = model.StudentFirstName,
StudentLastName = model.StudentLastName,
StudentSsn = model.StudentSsn,
StudentStn = model.StudentStn,
SchoolId = model.SchoolId,
SchoolCode = model.SchoolCode
};
var result = _eApiClient.UpdateStudentData(StudentDataModel).Result.StudentFileEnumerable;
       }
       
return Json(new[] { studentDataModels }.ToDataSourceResult(request, ModelState));
    }

Dimiter Madjarov
Telerik team
 answered on 13 Jan 2015
4 answers
201 views
I'm including the css below in my page, however, still have to set the theme explicitly to "bootstrap".

1. Am I missing a file?

"~/Content/kendo/kendo.common-bootstrap.css",
"~/Content/kendo/kendo.bootstrap.css",
"~/Content/kendo/kendo.dataviz.css",
"~/Content/kendo/kendo.dataviz.bootstrap.css",
Morten
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 13 Jan 2015
5 answers
121 views
When trying to create recordings for test cases in Microsoft Test Manager 2013, we are running across the 3 issues below:

1-     MTM is unable to pass parameters that we set in the test cases for the dropdowns selected

2-     MTM is unable to select multiple (3) dropdowns on the same row within a table; it crashes after selecting the first dropdown

3-     MTM is unable to record any actions in the Kendo UI Grids

We are currently running Kendo UI version Q3 2014.

Are any of these issues resolved in the latest version of Kendo UI?

Thanks,
Atanas Georgiev
Telerik team
 answered on 13 Jan 2015
5 answers
905 views
From my understanding, Kendo chart can handle 2 kind of values:

-Absolute where the value represent the number of item matching a given category / subcategory. (Ex. Basic Area)
-Percent where the value is a percent (express in a 0.0 to 1.0 form) of item in a given category compare to siblings categories. (Ex: 100% Stacked area)

I've been dealing with Kendo chart for a couple of weeks and I just find out that the Pie Chart does some kind of internal conversion from absolute values to a percent values.  Indeed, if you give following value to a Pie Chart: category A = 2000, category B = 1000, category C = 1000, the Pie chart will calculate the right ratio for each categories and the chart will render with the expected 50% / 25% / 25% percentages.

My question is the following: If the charts has an internal way to calculate the percentage, is there a way to generate percent charts (like the 100% stacked area) by providing only the absolute values?

Best regards,

Simon





Iliana Dyankova
Telerik team
 answered on 13 Jan 2015
7 answers
2.4K+ views

I would like the grid to not display the vertical scroll bar if there is not enough information in the grid to warrant it being there. So that the vertical scroll will work like the horizontal scroll which is set to auto. I think that this behavior should be added to the kendo grid and included in a upcoming release.

I was able to do this by extending the Grid widget. Which sets the (".k-grid-content").css("overflow-y", "auto") and either adds or removes the padding on the (".k-grid-header") depending on if the scroll is there or not.

See code below:

$(function () {
	MyGrid = kendo.ui.Grid.extend({
		element: null,
		_rightPaddingHeader: 0,
		options: {
			name: "MyGrid"
		},
		init: function (element, options) {
			var that = this;
			kendo.ui.Grid.prototype.init.apply(that, [element, options]);
			that.element = $(element);
 
			that.bind("dataBound", that._dataBound);
 
			//hide the scrollbar if not needed.
			that._rightPaddingHeader = $(element).find(".k-grid-header").css("padding-right");
			$(element).find(".k-grid-content").css("overflow-y""auto");
			that._setScrollBars(that);
		},
		//fired when data is bound to the grid.
		_dataBound: function () {
			var that = this;
			that._setScrollBars(that);
		},
 
		_setScrollBars: function (grid) {
			//found with webkit browsers need to hide and show inorder for style changes to take efect :( 
			$(grid.element).find(".k-grid-header").hide();
			if ($(grid.element).find(".k-grid-content").hasScrollBarVertical()) {
				$(grid.element).find(".k-grid-header").css("padding-right", grid._rightPaddingHeader);
			}
			else {
				$(grid.element).find(".k-grid-header").css("padding-right""0px");
			}
 
			$(grid.element).find(".k-grid-header").show();
		}
	});
	kendo.ui.plugin(MyGrid);
});

//Function to check is a element has a Vertical scrollbar.
(function ($) {
	$.fn.hasScrollBarVertical = function () {
		var results = true;
		//for IE and FF do it this way
		 if (this.scrollHeight  != undefined) {
			 results = this.scrollHeight > this.clientHeight;
		 }
		else {
			 // else for webkit do it like this.
			results = this.get(0).scrollHeight > this.get(0).clientHeight;
		}
		return results;
		
	};
})(jQuery);
 

Chris
Top achievements
Rank 1
 answered on 13 Jan 2015
6 answers
517 views
Hi, 

I'd like to offer a customer the ability to build gantt charts 'on the fly' without requiring that they know the start and end date of each task.   I understand that 'start' and 'end' are mandatory fields of a gantt task however our users like to build out plans iteratively and may not know the start and end dates of a task until late in the planning process.

I have tried displaying tasks without start and end dates and they do indeed show up as list items in the tree however the calendar then defaults the earliest visible task date to the machines current day -  In which case other tasks that do have start dates prior to 'today' are displayed incorrectly.

It looks like the widget is close to supporting this functionality.  Is there a way to make this work that I have missed in the documentation?  If not I'd like to suggest that it would be a great feature to include in your next release.

Regards,

Jim Karavias
Mfallestedt
Top achievements
Rank 1
 answered on 12 Jan 2015
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?