Telerik Forums
Kendo UI for jQuery Forum
1 answer
231 views
Hi

It seems it is not the default that only one row at a time is selected.

Try to select "Nancy" and then any row below her in the demo http://demos.telerik.com/kendo-ui/grid/hierarchy. Both "Nancy" and any row below her will be simultaneously selected.

I only want to be able to select one row at a time (this works on a level basis but not generally).

I am trying to accomplish this using grid.clearselection() however this function does not clear rows that are not on the "top" level?!


http://dojo.telerik.com/odIKu

Many thanks
Dimo
Telerik team
 answered on 26 Feb 2015
2 answers
162 views
I have a template that gets data bound. 

<script type="text/x-kendo-template" id="filtering-template">
    <table class="edit-panel">
        <colgroup>
            <col class="fields-col">
            <col class="operator-col">
            <col class="value-col">
            <col class="delete-col">
        </colgroup>
        <tbody data-template="filtering-row-template" data-bind="source: filter.Rows"></tbody>
    </table>
    <a id="add-filter-row" data-role="button" data-bind="click: addRow">Add</a>
</script>

In this format the link at the bottom does not get set to a kendo button.
If I change the order to this:

<script type="text/x-kendo-template" id="filtering-template">
    <a id="add-filter-row" data-role="button" data-bind="click: addRow">Add</a>
    <table class="edit-panel">
        <colgroup>
            <col class="fields-col">
            <col class="operator-col">
            <col class="value-col">
            <col class="delete-col">
        </colgroup>
        <tbody data-template="filtering-row-template" data-bind="source: filter.Rows"></tbody>
    </table>
</script>

Then the button gets created correctly but the body of the table never gets created.

There are no JS errors being displayed at all.







Wayne Hiller
Top achievements
Rank 1
Veteran
Iron
 answered on 26 Feb 2015
2 answers
793 views
I am able to add rows, delete rows, and update my Kendo Grid via the CRUD operations in my controller. The issue I am having is that whenever I use the following drag and drop function the "remove()" triggers the Destroy event in my controller which deletes the row that was inserted and this is not what I am looking to do. The delete button is located in a column and only when this button is clicked do I want to trigger the Destroy event. My grid is editable and fully functional besides this issue which I have already spent a good amount of time trying to troubleshoot. Any help or work around for this matter would be greatly appreciated.


 function onChange(e) {

        var grid = $("#DropGrid").data("kendoGrid");
        
        var oldIndex = e.oldIndex;
        var newIndex = e.newIndex;
        var data = grid.dataSource.data();
        var dataItem = grid.dataSource.getByUid(e.item.data("uid"));
        var numRows = grid.dataSource.view().length; //total # of rows

       grid.dataSource.remove(dataItem);  //  <--- This is the line triggering the Destroy event.

        grid.dataSource.insert(newIndex, dataItem);
}

James
Top achievements
Rank 1
 answered on 25 Feb 2015
3 answers
256 views
I am trying to use class directive to attach click event to the next page button on the kendo grid.

Directive:

.directive('kPagerNav', function () {
return {
restrict: 'C',
controller: function ($scope, $element, $attrs, $location) {

if (typeof $scope.testFunc === "function") {
$element.click(function () {
$scope.testFunc();
});
}
}
}
})

Example
http://dojo.telerik.com/AKiqO

I have exactly the same directive working for a 'cancel changes' button , but I can't get next page click working.
Petyo
Telerik team
 answered on 25 Feb 2015
1 answer
180 views
Iam building an application using the combination of MVC - KendoUI widgets - Sitefinity 
the problem is Iam not able to retrieve  records to the grid from the data source at all 
while using the same code out of sitefinity within Visual Studio - MVC - KendoUI is working fine 
Thanks
Svetoslav Manchev
Telerik team
 answered on 25 Feb 2015
4 answers
177 views
Greetings,

When my browser window is small enough that the entire (horizontal) Splitter doesn't fit on screen, clicking the Splitter's collapse/expand thumb (handle) causes the window to scroll up to a point where the top of the Splitter is at the top of the screen.  Then clicking again causes the expected collapse/expand behavior.  I have a feeling that this may not be specifically a Splitter issue but it is the only place I have seen it.  To me this is a very annoying behavior and it makes my users think the Splitter is not working correctly.  Can anyone suggest a way to suppress the scrolling and get the click event straight to the Splitter?

Thanks,
Will 
Alex Gyoshev
Telerik team
 answered on 25 Feb 2015
1 answer
99 views
If you have a Grid with virtual scrolling enabled, and it has a bad transport read while scrolling (eg mangled JSON response), then it just shows the loading bar forever and becomes completely stuck. It does also not call any of the appropriate error handling methods.

This is because DataSource.prefetch does not provide an error handler for its transport.read call. So if the transport fails, the DataSource just sits there forever thinking that the request is still outstanding.

On the other hand DataSource.read works as expected, as it provides an error handler to transport.read that cancels the request and raises the appropriate error events. However the issue is that virtual scrolling bypasses DataSource.read.

regards,
Rowan
Kiril Nikolov
Telerik team
 answered on 25 Feb 2015
2 answers
288 views
I'm trying to connect to my local JSON file, but it's not working. I thought I'd start with the basics and copy the demo XML to a local file, but that's still not working. Just wondering if anyone can spot why it won't work locally? I'm using the basic grid setup code.

$("#grid").kendoGrid({
    dataSource: {
        type: "odata",
        transport: {
            read: "app/js/swagger-test.xml"
        },
        pageSize: 20
    },
    height: 550,
    groupable: true,
    sortable: true,
    pageable: {
        refresh: true,
        pageSizes: true,
        buttonCount: 5
    },
    columns: [{
        field: "ContactName",
        title: "Contact Name",
        width: 200
    }, {
        field: "ContactTitle",
        title: "Contact Title"
    }, {
        field: "CompanyName",
        title: "Company Name"
    }, {
        field: "Country",
        width: 150
    }]
});

There are no errors showing, but neither is the data. If I change it to point to my JSON file and change the type to json, I get an undefined error.

Thanks for any help.
Kiril Nikolov
Telerik team
 answered on 25 Feb 2015
11 answers
803 views
Hi! I need to compare the data in a specific field in selected rows in order to disable/enable some external buttons. Initially, I only needed to enable the buttons based on whether rows were selected or not, so it was pretty trivial:

1.if (selected.length == 0) {
2.$('#fancyButton1, #fancyButton2').attr('disabled', 'disabled');
3.} else if (selected.length > 0) {
4.$('#fancyButton1, #fancyButton2').attr('disabled', false);
5.}


Now, I need to compare the numeric values in a specific field, and if they are all equal, THEN enable the buttons.. can someone provide an example?
Dimiter Madjarov
Telerik team
 answered on 25 Feb 2015
1 answer
340 views
I have a data source that returns data from a remove source (data = [{"i":27,"p":10,"o":"Yes"},{"i":29,"p":0,"o":"No"},{"i":30,"p":10,"o":"Yes"},{"i":31,"p":10,"o":"Yes"},{"i":32,"p":10,"o":"Yes"},{"i":33,"p":10,"o":"Yes"},{"i":35,"p":10,"o":"Yes"},{"i":37,"p":0,"o":"No"},{"i":38,"p":0,"o":"No"}...).

On the client side I'd like to filter, group and sum/count the data in various ways fx:

filter: i = 32
group by: o
sum p

is this possible using only datasouce methods?
or should I look into using another js framework like underscore.js?

http://jsbin.com/tosito/2/edit?js,console,output
Kiril Nikolov
Telerik team
 answered on 25 Feb 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
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?