Telerik Forums
Kendo UI for jQuery Forum
3 answers
274 views

I've been looking at the licensed source distribution (2017.1.118, retrieved with bower), and had a couple questions/comments.

  • It looks like (aside from jquery) the third-party .js files that come with the minified release package aren't included?  This would be "angular", "jszip" and "pako_deflate".  It would seem that if working with source, one would have to check in the release package to see what was included there?  Might there be a case to include these somewhere in the source package, or perhaps a reference to the versions included with the release package?
  • The "kendo-ui/bower.json" file has the entry "version": "2016.3.1202" (not a public release?), although the js folder has the expected source code for "v2017.1.118".  Did this file just get missed for updating?  I don't think it causes a problem, although the "jquery" dependency has ">=1.9.1 <=2.1.1" and you may have intended this to be "<= 2.1.4" for the current 2.1.x release?
  • Don't forget to update your Javascript Prerequisites doc page to include table entries for 2017.1.118!  Also, Angular 1.6 was recently released; are there any notes on using it with Kendo?  BTW, one of your other Angular articles seems to suggest that the Bad Things that the Prerequisites page warns about with "ng-model" and 1.5 actually started with 1.4.9?  Perhaps the Prerequisites warning should be updated?  I notice the release packages bundles Angular 1.4.6; was there a reason to not include 1.4.7 or 1.4.8?
  • The release package has jQuery 1.12.3 - any reason this wasn't 1.12.4 (May 2016)?  The included "pako_deflate.js" is 1.0.1 - upstream is 1.0.4 and I notice that 1.0.2 "Fixed nasty bug in deflate ... which could cause broken data in some rare cases."
T. Tsonev
Telerik team
 answered on 07 Feb 2017
3 answers
274 views

I have grid working with a detail row. The following code does not fade in the row:

 function detailInit(e) {
 var detailRow = e.detailRow;
 debugger;
 detailRow.find(".grid").kendoGrid({
  animation: {
   open: { effects: "fadeIn" }
  }
 });
 }

 

Dimiter Topalov
Telerik team
 answered on 07 Feb 2017
1 answer
536 views

We've recently undertaken an upgrade from Kendo UI 2013.2.716 to 2016.3.1118 and we've noticed some issues for our drop down lists. Some of our scenarios call for drop down lists with empty ("[]") data sources until other operations cause them to be filled, or they remain hidden.

Upon changing versions we've noticed that upon the initWidget method being called for that drop down list, the data source is being parsed as a string ("[]") when previously it was being recognised as an empty array. Some investigation and comparison of the two versions led me to a particular regular expression that had changed between the versions in parseOption:

2013 - jsonFormatRegExp = /^\{(\d+)(:[^\}]+)?\}/

2016 - jsonFormatRegExp = /^\{(\d+)(:[^\}]+)?\}|^\[[A-Za-z_]*\]$/

In 2013 this was not matching the empty array "[]", causing the code path to return it from a function (well, an "evil") to the initWidget method - now that it's matching, however, it's passing the string value back which is causing errors later in the code with the [] being used in getter names. Is there another way we should be populating this field? How can we get this version to recognise this value as the empty array it was intended to be?

 <input class=" roadmap" data-option-label="Select" data-role="dropdownlist" data-source="[]" data-text-field="Text" data-value-field="Value" id="xxx" name="yyy" style="width:100%;" type="text" value="" />

Veselin Tsvetanov
Telerik team
 answered on 07 Feb 2017
2 answers
299 views
@(Html.Kendo().Grid<MyModel>()
        .DataSource(ds => ds
            .Custom()
            .Batch(false)
            .Schema(schema => schema.Parse(@<text>parseData</text>))
            .Transport(r => r.Read(c => c.Action("GetStuff", "MyController",
                new
                {
                     prop = Model.prop
                })
                .Data("getExtraData()").Type(HttpVerbs.Post)))
            .PageSize(1)
            .ServerPaging(true)
        )

 

The getExtraData() method runs the first time the grid is loaded. I want to refresh the grid later, so I use this c

$('#messagesgrid').data('kendoGrid').dataSource.read();
$('#messagesgrid').data('kendoGrid').refresh();

 

The method getExtraData() has changed, so when it refreshes I want it to call this method again to attach the data to my request. However the method does not run even though the grid is refreshed.

 

How can I make sure that it runs every time the grid is updated?

Viktor Tachev
Telerik team
 answered on 07 Feb 2017
6 answers
1.2K+ views

For batch mode (inCell editing), when a value is changed in a cell, is there an event that can be used where I can know what field changed and what the previous value was?

I asked about this several years ago, so I'm asking now again in 2017 hoping you have an answer.

Konstantin Dikov
Telerik team
 answered on 07 Feb 2017
1 answer
403 views

During user operations, we refresh the datasource contents and reload the treelist.  If our users have a row selected, we need to reselect that row.  If a child row was last selected, we need to expand its parent and select the child.  I've looked through the docs, but all it shows is how to select a row based on the index; I also see nothing on how to expand the parent of a child row.

You can see my code in this dojo:  http://dojo.telerik.com/epOQe/3

After running it, select a row and then click the Refresh button; the point is that the selected row should be selected after the refresh *and* if be visible (e.g., if it's a child node, the parent should be expanded as well).  The selected row remains selected, but if it's a child row, the parent row won't be expanded.  (I based this off the code found here.)

So my questions are thus:

1) Why won't the parent row expand?

2) Is there a way to automatically expand the parent when a child is selected?

Any guidance would be greatly appreciated!

Tsvetina
Telerik team
 answered on 07 Feb 2017
4 answers
1.0K+ views

Hi there,

I'm having a problem with Kendo Grid UI and setOptions. When I setOptions, hidden fields have an extra display:none attribute added. I've attached an image of my options variable (data.selectedGridState) compared with the the getOptions value directly after the setOptions command. I believe they should be identical. Could you advise?

My code looks like this:
var selectedGrid = $(jQuerySelectors.selectedMembersGrid).data("kendoGrid");
selectedGrid.setOptions(JSON.parse(data.selectedGridState));

Kind regards,
Karl

Karl
Top achievements
Rank 1
 answered on 07 Feb 2017
8 answers
1.3K+ views
I've looked through the demos and docs but am still scratching my head.

My goal is to present the user with a filterable drop down list which fetches "paged" data from the server as the user scrolls down.

The scenario is that I don't want to retrieve 1000's of rows from the database at once, instead I want to fetch a page (page size = 100) of data at a time, and stream that data as needed as the user scrolls down.  But the example I see here (http://demos.telerik.com/aspnet-mvc/dropdownlist/virtualization) doesn't appear to do this, nor can I find anything to explain how this would be done.

Indeed, that demo (http://demos.telerik.com/aspnet-mvc/dropdownlist/virtualization) uses a Controller that appears to fetch ALL rows from the database multiple times, is that correct? I'm lost when it comes to the value mapper function as it accepts a parameter of int[] values, then AGAIN fetches ALL rows from the database, loops through ALL those rows, attempting to find and generate an index for each passed-in value...

Isn't the point of implementing virtualization and paging to make it so that we're limiting the amount of data returned from the database?  Or is the actual/only benefit that we're not delivering a huge payload to the browser (ignoring any performance issue with the database)?

Georgi Krustev
Telerik team
 answered on 07 Feb 2017
2 answers
159 views
I am building a point of sale system using Kendo UI. The POS page will have a header section and then a grid to handle sale line items. The user needs to be able to enter lines items (up to 100 or more in a sale) very quickly. Ideally I don't want to force the user to have to reach for the mouse and click the  Add New Record button each time he/she wants to enter a new line item (row) in the grid. This is going to be too slow and awkward. What I would really like is for the grid to automatically start a new row as soon as the user enters a value in the last column of the last row in the grid and moves off the column. I don't see anyway to have the Kendo grid do this. Is it possible?
Randy
Top achievements
Rank 1
 answered on 06 Feb 2017
1 answer
3.9K+ views

Hi --

We have a grid with an action button in the column. When the user clicks the button this code executes.

function showDetails(e) {
     e.preventDefault();
 
     var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
     var grid = $("#gridEnrollments").data("kendoGrid");
     grid.select($(e.currentTarget).closest("tr"));
 
     selectedIndex = grid.select().index();
}

 

The selected row index value is now in the selectedIndex variable.

I would like to then be able to do grid.select(selectedIndex +1).

However, when I do this the selected row is the one above as opposed to below the currently selected row.

How can I achieve what I am looking to do?

Thanks

Rich

 

 

 

 

Eduardo Serra
Telerik team
 answered on 06 Feb 2017
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
DropDownTree
ListBox
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
Styling
ColorPicker
Pager
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
Licensing
PivotGridV2
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
LLM Kit
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?