Telerik Forums
Kendo UI for jQuery Forum
5 answers
197 views
Hi there,

I have created a sample at: http://dojo.telerik.com/uveVo
Noticed that I have 3 data but the grid only shows 2.

I suspect that because the name is identical, somehow the grid ignores the second data with the same name.

I have found 2 ways to address this issue:

1) Revert back to 2014.2.903. 
    http://dojo.telerik.com/uveVo/2

2) Instead of declaring a dataSource, declare it within kendoGrid.dataSource. 
    http://dojo.telerik.com/uveVo/3

Is this an issue with the new version 2014.2.1008?
Because I would really love to declare my dataSource externally so that perhaps it can be shared later.

Regards,
Peteriman



Dimo
Telerik team
 answered on 17 Oct 2014
4 answers
337 views
I am creating tabs dynamically for a tabstrip, using a contentUrl. Within the HTML for the 'template' file, i have a ng-repeat that calls a method in my angular controller and I want to pass the tab (as a jquery element).

<li ng-repeat="game in tabSchedule(**need tab here**)">{{game.date}}</li>

I'm not a jquery expert and was wondering if there is an easy way to get the tab element. I added data properties to the tab when I created it and need access to them in the controller method.

I assume there is a simple selector that will work on my tabstrip (id=tabs), like so:
<li ng-repeat="game in tabSchedule($('#tabs li.k-item.k-*****')">{{game.date}}</li>

but I'm not sure how to ensure that the li is the one associated with the tab that is rendering.
Ray
Top achievements
Rank 1
 answered on 17 Oct 2014
1 answer
290 views
I have a Kendo UI Grid that has n-levels of hierarchy that's based on this solution here: http://stackoverflow.com/questions/24004905/kendo-ui-grid-multi-level-hierarchy-n-levels-of-hierarchy . I have buttons inside the rows that need to update some table data, but every time i make it refresh() or read(), the table closes the hierarchy.here is the update function, if needed:

function updateStatus(uN, tId, isSub, tAct, lN) {
    $.ajax({
        url: "supersecretwebsite.com",
        type: "POST",
            success: function (a) {
                $("#LoanTasksTop").data("kendoGrid").dataSource.read();
                $("#LoanTasksTop").data("kendoGrid").refresh();
            }
     });
}
Alex Gyoshev
Telerik team
 answered on 17 Oct 2014
1 answer
378 views
I have a requirement to display separators within the DropDownList widget. For example, I'd like to list all states in the U.S., followed by all Canadian provinces. These 2 collections should be separated with a line, and that line should not be selectable. Is this possible using a template with the DropDownList widget?
Alexander Popov
Telerik team
 answered on 17 Oct 2014
2 answers
399 views
Hi, I'm using the Kendo DropDownList with server side validation.  When submitting my form the first time, the server validation fires and the expected error message appears by the dropdown control.  However, if I submit form again, the DropDownList actually disappears during postback, doesn't bind to model, and is not in Request.Form collection.

Any ideas?  I've seen posts elsewhere but no replies (see below).

http://stackoverflow.com/questions/16633498/jquery-validate-hides-kendo-ui-controls
http://www.codeproject.com/Questions/753507/Kendo-combobox-control-disappears-while-clicking-o
Bob
Top achievements
Rank 1
 answered on 17 Oct 2014
3 answers
802 views
Hi,

I have to prevent user form editing a row. I am using a custom  validation on edit event. I can validate and closeCell but I am having difficulties with  providing some feedback to user.
My grid also contains custom edit drop down, I am also having difficulties with displaying feedback for that field. 

Code example http://dojo.telerik.com/odeKI/2

I would appreciate any suggestions
Alexander Popov
Telerik team
 answered on 17 Oct 2014
1 answer
261 views
Since the problem is quite complex, I have included a sample project in attachment to reproduce the problem. I had to leave out the downloaded NuGet packages, Content/kendo and Scripts/kendo to get the zip under 2 Mb. I thrust you can get it working again. If not, it is basically an MVC5 project with KendoUI added, a model, and some changes to the HomeController and its _Layout and Index views.

Due to the combination of Kendo UI NumericTextBox, jquery validation, server-side model validation, the numeric text box disapears.

Steps to reproduce with solution in attachment:
- Run the project ;-)
- Click Post
- Empty the non-Telerik textbox
- Click Post again
- Watch the NumericTextBox disappear.

My analysis so far:
- In the first postback, client-side validation doesn't find an error, but server side validation does (the NumericTextBox is required)
- Then, with the second postback, client-side validation does find an error with the non-Telerik textbox, but not with the NumericTextBox
- jQuery validation empties all spans with the class "input-validation-error", where it can no longer find a validation error
- the initialised NumericTextBox fits this description, so the span is emptied, making the NumericTextBox disappear.

My questions:
- Why doesn't the "Required" error get caught on client-side validation?
- How do we keep the described side effect from happening for cases where we verify certain business rules on server-side only?
Georgi Krustev
Telerik team
 answered on 17 Oct 2014
1 answer
254 views
I would like to get the global index of a given Grid row in order to implement a multi-selection across a grid with virtual scrolling enable.  It's easy to get the index within the displayed rows:

var kendoGrid = $("#myGrid").data("kendoGrid");
var index = kendoGrid.items().index(kendoGrid.select());


At this point, to logic would be to use the page number / page size to determine what is the global index of the selected row.

//Pages are base 1
index += (kendoGrid.dataSource.page() - 1) * kendoGrid.dataSource.pageSize();


However, this ain't working with the Kendo grid (except for the first page) as the grid is displaying rows from page previously loaded.

Example: You have records from 1 to 200 with a page size of 100. When you'll scroll down to the record #100, the dataBound grid event will be triggered and you'll be able to notice the dataSource page has changed from 1 to 2.

You'll also notice some rows from page 1 are still visible and their index will be calculated as a page 2 element.

For instance, the record #96 has the index 95 as long as the grid remain on page 1. When you'll switch to page 2, the record #96 will be displayed (as the first item). At this point, index returned by the grid for that row will be 0. If you apply the page number / size rule above, you'll end up with the index 100.

Is there any solution that doesn't involve a row index calculated on the server side?

Note If we had a PK column, it could be possible to use it to build a list of index, but we don't always have a PK column so this isn't an option.
Petur Subev
Telerik team
 answered on 17 Oct 2014
1 answer
83 views
My code runs without errors, however when I run the Kendo Linter in Chrome (great tool btw), I get the message:

Unknown option: CountryName

which refers to the "optionLabel: { CountryName" in the following code:

$("#recent-country-filter").kendoDropDownList({
    dataTextField: "CountryName",
    dataValueField: "CountryId",
    dataSource: countryDs,
    value: "1",
    optionLabel: {
        CountryName: "Any country",
        CountryId: "0"
    },

Just curious. Is the code not correct?
Mihai
Telerik team
 answered on 17 Oct 2014
1 answer
133 views
Is it possible to keep the 'old' content of a view with data-reload="true" when hitting the back button ?
Petyo
Telerik team
 answered on 17 Oct 2014
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
Drag and Drop
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
Marco
Top achievements
Rank 4
Iron
Iron
Iron
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
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
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
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?