Telerik Forums
Kendo UI for jQuery Forum
2 answers
1.1K+ views

Right now I'm working through removing an item from the grid. I can't seem to find a way to use the destroy transport to mark a row as one that should be deleted, make a request to delete those rows, and only if those rows were successfully deleted from by a service, THEN visually remove the row from the grid. Everything I try (grid.removeRow, dataSource.remove, dataSource.sync) just removes the row from the grid right away, before the request is made to the server to remove the row. I need the ability to notify the user of a failed attempt to remove those rows, and keep those rows displayed if the service was unable to delete those rows.

Any ideas?

Stephen
Top achievements
Rank 2
 answered on 17 Nov 2016
2 answers
390 views

Hi, 

I'd like to use the Grid's detailTemplate, but is it possible to only render it based on a condition?

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

This is a basic example, that only displays the template contents if the 'male' field is true. But is it possible to prevent the details template drop down arrow from being displayed, I mean its useless displaying a way to view a details template if its empty.

Thanks,
Grant

Grant
Top achievements
Rank 3
Iron
Iron
Iron
 answered on 17 Nov 2016
3 answers
138 views
Hi, I have appended a menu item on grid's columnmenuinit event.
But my new item won't close menu after select and the others will.
I have tried This and This . Hope someone can give me a hand.
Stephen
Top achievements
Rank 2
 answered on 17 Nov 2016
2 answers
292 views

Hi,
I have a data model for an everlive datasource, and I've added some extra fields that help manage some functions around what is displayed in a ListView. However I don't want the extra field saved back to the dataSource when it is synced.

I've sketched what I thought might work below. Am I on the right track? And/or what sort of code would I need to ensure the showAnimalDetails is not saved?

Many thanks

-Paul

In the following, the animalName is from the dataSource and the showAnimalDetails is an extra field.

01.var animalModel = {
02.    id: 'Id',
03.    fields: {
04.        animalName: {
05.            field: 'animalName'
06.        },
07.        showAnimalDetails: {
08.            defaultValue: false
09.        }
10.    ...

 

That all works fine. However, I don't want to include the showAnimalDetails field when I sync the dataSource back via Everlive. 

I thought the way to do it would be like this ...

01.var animalsDataSource = new kendo.data.DataSource({
02.    type: 'everlive',
03.    schema: {
04.        model: animalModel
05.    },
06.    transport: {
07.        typeName: 'Animals',             
08.        update: function(options) {
09.            // Put code here to remove extra field before sync?
10.        }
11.    }
12.});
ptw
Top achievements
Rank 1
 answered on 17 Nov 2016
4 answers
317 views

Hi,

 

I'm using MVVM paradigm with the kendo scheduler. I am attempting to add custom templates for editing and display of tasks. Using the following code the templates seem to be ignored and the default templates used instead. These templates are fine, I use them in non MVVM mode. 

 

<div id="responsiveCalendarView">
    <div class="k-content wide">
        <div>
            <div id="responsiveCalendar" 
            
                 data-role="scheduler"
                             
                 
                 data-views="[{ type: 'day', title: 'Day' },
                              { type: 'week', title: 'Week', eventTemplate: $('#event-template').html()},
                              { type: 'workWeek', title: 'Work Week'},
                              { type: 'agenda', title: 'Agenda' },
                              { type: TasksView, title: 'Tasks' }]"
                              
                 data-editable= "{template: $('#customEditorTemplate').html()}"   
                 
                 data-bind="source: tasks,
                            visible: isVisible,
                            events: {edit: onEdit, requestStart: requestStart, requestEnd: requestEnd, navigate: navigate, dataBound: dataBound, dataBinding: dataBinding}"  style="height: 800px"></div>
        </div>
    </div>
</div>

 

Has anyone else had similar problems using templates with MVVM on the scheduler? Has anyone successfully used templates in the scheduler with MVVM?

 

Appreciate any assistance.

 

John
Top achievements
Rank 1
 answered on 17 Nov 2016
1 answer
929 views

My back-end prefers a null value in the primary key for adding new records, but kendo uses 0 for numeric fields. If I change the "defaultValue" for a numeric model field that is defined as the 'id' field for the model, will this cause any problems with create operations or anything else that deals with new instances of the model?  Model has a "isNew" function, so it looks like things should work even if the defaultValue is changed from the normal zero value, I just wanted to be sure in the real world there won't be any nasty side-effects or anything that explicitly compares to zero instead of relying on isNew().  So:

var dataSource = new kendo.data.DataSource({
  schema: {
    model: {
      id: "dbID"
      fields:{
         dbID: {type:"number", defaultValue:null},
      }
    }
  }
});

 

Rosen
Telerik team
 answered on 17 Nov 2016
1 answer
792 views
Hello,
I have a problem with saving excel. I need to save it synchronously.
For pdf there is:
 var $grid = $('#grid').data('kendoGrid');
 $grid.saveAsPDF().then(function () {});
 I need the same functionality for excel, but I dindn't found any. Basically I need to execute $grid.saveAsExcel(); then after that to do something like alert("Excel export is done!"); but now alert is displayed before $grid.saveAsExcel() finish to execute.
 Please provide a solution. Thanks.
Stephen
Top achievements
Rank 2
 answered on 16 Nov 2016
1 answer
380 views

Hi,

Please have a look at http://jsbin.com/noqaqitoko/edit?html,css,js,console,output

I've tried to hook something up to the sync promise, but it is not called, why is that?

 

 

Nikolay Rusev
Telerik team
 answered on 16 Nov 2016
6 answers
541 views
Title says it. I have a stacked area chart with a few series in it. I want to flip the chart so the values go horizontally instead of vertically. Is this possible?
Iliana Dyankova
Telerik team
 answered on 16 Nov 2016
1 answer
304 views

Hi, 

So I have Treeview that reads Channel Data from a remote Hierarchical DataSource:

var hierarchical_dataSource_channelNodes = new kendo.data.HierarchicalDataSource({
  transport: {
    read: {
      url: "/planner/channelnodes/forTree",
      type: "GET",
      dataType: "json"
    }
  },
  schema: {
    model: {
      id: "id",
      hasChildren: "hasChildChannelNodes"
    }
  }
});

 

So as above, tree nodes (child channels) are retrieved on an as needed bases, when a node is opened, this is donw by executing this URL: "/planner/channelnodes/forTree/1" (for example I expans the first node).

So this is where my issue starts, Id like to implement serverFitlering as well, how can I also execute a filter (ie. add the filter param to the URL) when a tree node is expanded and the read URL is executed? Is there a way to execute a read and filter together or to append the 'filter' param & value to the read URL during a 'requestStart' or 'parameterMap' or a read request?

Thanks and kind Regards,
Grant

Stefan
Telerik team
 answered on 16 Nov 2016
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
ScrollView
Switch
TextArea
BulletChart
Licensing
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
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
TimePicker
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
SegmentedControl
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?