Telerik Forums
Kendo UI for jQuery Forum
1 answer
226 views

UI Ref : http://demos.telerik.com/kendo-ui/grid/editing

Service Ref: https://github.com/telerik/kendo-ui-demos-service

 

Hi, 

I have looked at this implementation for KendoUI batch editing but the service end doesn't work with Web API. As the type of controller used in Web API is different than one used in MVC controller. So, this: DeserializeObject<IEnumerable<ProductModel>>("models"); doesn't work in Web API. Do you have any solution for this. An urgent response would be appreciated.

Thx!

Boyan Dimitrov
Telerik team
 answered on 24 Mar 2017
1 answer
461 views

Hi,

I have a treeview and would like users to be able to add a new item to the treeview. When the new item is added I would like to have an AutoComplete field they can type the new node name into and use server-side filtering to retrieve the available values. 

 

How can I do this?

 

Thanks in advance

 

Matt

Ianko
Telerik team
 answered on 24 Mar 2017
8 answers
1.0K+ views

When the user changes the spreadsheet, I use the onchange method to run certain validations. Is there any way to determine which key(s) the user has pressed? I'm interested in keys such as delete and backspace.

Thanks!

Marc
Top achievements
Rank 1
 answered on 24 Mar 2017
3 answers
249 views

My cancel event in my scheduler is like so:

 

cancel: function(e){
                                console.log('Cancelling');
                            console.log(e); 
                                console.log(e.event.ownerId[0].value);
                                console.log(e);
                                if(e.event.id != '0'){
                                    e.sender.dataSource.sync();
                                    //e.sender.dataSource.read();
                                }
                            },

 

The only way I was able to get the scheduler to work somewhat properly is by calling dataSource sync in the cancel method because  before doing that, if you pressed cancel, the data structure of the event was altered and if you tried to re-open that event, it threw an error with my kendo multi-selects inside the edit/create window. However, by calling sync, the scheduler refreshes its data when you cancel and it all goes back to the way it should be.

My issue though... is that when I press cancel and it does its sync, it triggers the update method. So it basically has the same functionality as the save event because it goes through update and alters the data of the event if anything was changed and doesn't actually 'cancel'

I am wondering how I might prevent it from running update when cancel is pressed? And what determines if update CRUD operation is ran? Like I know that create gets triggered when the ID of the event is the default id specified in the schema, but not sure what determines if update should go or not. Is that the dirty bit of the event?

Ianko
Telerik team
 answered on 24 Mar 2017
4 answers
517 views

I am wondering how I might update the scheduler in the databinding event? When I try to call the dataSource read or just refresh the view, it goes into a continuous loop of datasource reading then scheduler databinding and nothing actually gets displayed in the scheduler.

 

My purpose for this is I am trying to filter events based on the start and end date of the current view because I am dealing with potentially thousands and thousands of events. 

 

My databinding event for the scheduler is:

dataBinding: function(e){
                            console.log(e);
                                console.log(e.sender.view());
                                console.log(e.sender.view().startDate());
                                console.log(e.sender.view().endDate());
                                console.log(e.sender.dataSource.data());
                                if(e.action === 'rebind'){
                                console.log('Rebinding data to scheduler!');  
                                    Visualforce.remoting.Manager.invokeAction('{!$RemoteAction.CalendarData.getCurrentViewEvents}', e.sender.view().startDate(), e.sender.view().endDate(), '{!fieldSetMap}', function(result, event){
                                result = result.replace(/\&quot\;/g, '"');
                                    result = result.replace(/\#39\;/g, '\'');
                                    var resultArray = JSON.parse(result);
                                    console.log(resultArray);
                                        var correctedResults = getNewEvents(resultArray);
                                        console.log(correctedResults);
                                        eventData = correctedResults;
                                        //e.sender.dataSource.data(eventData);
                                        //scheduler.view(scheduler.view().name);
                                        
                                });
                                }
                            },

 

It gets tricky trying to update and refresh the eventData (which needs to go to the dataSource read operation because that is all my events) dealing with the remote action, which happens asynchronously, thus it would be ideal to refresh inside the remote action method callback in the dataBinding event function. But yeah, doing so as I have tried just gives me the never-ending loop of dataBinding/reading.

I am grabbing events from a database then storing them locally in eventData, I know there are remote data examples of server filtering based on the start and end date of the current view, but those do not help in my situation with local data.

Ianko
Telerik team
 answered on 24 Mar 2017
7 answers
1.3K+ views

I'm getting the following console error when trying to manually export a grid to Excel:

"Uncaught Error: This method has been removed in JSZip 3.0, please check the upgrade guide."

Code to trigger export:

  function exportGrid() {
        var grid = $("#coingrid").data("kendoGrid");
        grid.saveAsExcel();
  }

Should I revert to a 2.x version of JSZip, is there a work-around, or am I doing something wrong (most probable answer)? I'm using 2016.2 release of UI. Thanks.

Morten
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 23 Mar 2017
1 answer
161 views

Kendo UI Bower Issue:

Package;
https://bower.telerik.com/bower-kendo-ui.git#~2017.1.321

File;
kendo-ui\styles\kendo.common.min.css

Issue;
Invalid selector:

.k-i-tri-state-$1 $2

---

This unfortunately breaks my entire project as it no longer builds :(.

Stefan
Telerik team
 answered on 23 Mar 2017
5 answers
1.9K+ views
Hello!

I have a kendo dropdownlist and a template in it that contains a textbox, but I find the existing dropdownlist events interfere with the textbox.

A pretty rough, yet fully functional, fiddle here: http://dojo.telerik.com/AripU

If you click on the "edit" image, you get a textbox but you are unable to click into it. I have managed to focus but the click is still being ignored.

I was told that b cannot be solved because the widget handles the "mousedown" event in order to keep the focus in the wrapper. Specifically "the widget controls the focus of the wrapper and popup element very restrictively in order to ensure the correct "change" event order when widget is blurred. That is why placing an input element inside the item is not supported. "I wonder if there is a way to override the mousedownn event?

I am keen to somehow work around this, rather than re-doing the whole thing using a grid so any creative solutions that can help me focus the textbox are very welcome.

Thanks
Nencho
Telerik team
 answered on 23 Mar 2017
2 answers
144 views

I'm using the AngularJS configuration options to set up a basic gantt chart for tasks and dependencies (see below for configuration) along with a Web API 2 web service. If I don't include configuration for dependencies, all functionality around tasks behaves exactly as expected. However, including dependencies seems to be causing some odd behaviors. Attempting to delete a dependency triggers a "create" operation within the dependency datasource instead of a "destroy". Deleting a task will also trigger the dependency "create" operation, while a "destroy" operation is still triggered as expected for the task. If I try to create a new dependency between tasks it appears that a "create" operation will be invoked not just for the new dependency, but for all other existing dependencies within the datasource. Is this expected behavior and I'm just not understanding something, or is there a problem that I'm not seeing in my configuration?

The script version I'm using is v2017.1.118.

<div kendo-gantt k-options="vm.ganttOptions"></div>

 

 

var rootUrl = "/api/requestTasks";
var datatype = "json";
var contenttype = "application/json";
var requestId = "1";
$scope.ganttDs = new kendo.data.GanttDataSource({
    batch: false,
    transport: {
        read: {
            url: rootUrl + "/" + requestId,
            dataType: datatype
        },
        update: {
            url: rootUrl,
            dataType: datatype,
            type: "PUT",
            contentType: contenttype
        },
        destroy: {
            url: rootUrl + "/delete",
            dataType: datatype,
            type: "POST",
            contentType: contenttype
        },
        create: {
            url: rootUrl,
            dataType: datatype,
            type: "POST",
            contentType: contenttype
        },
        parameterMap: (options, operation) =>
        {
            if (operation !== "read")
            {
                return kendo.stringify(options);
            }
        }
    },
    schema: {
        model: {
            id: "id",
            fields: {
                id: { from: "Id", type: "number" },
                orderId: { from: "Order", type: "number", validation: { required: true } },
                parentId: { from: "ParentId", type: "number", defaultValue: null, validation: { required: true } },
                start: { from: "StartDate", type: "date" },
                end: { from: "EndDate", type: "date" },
                title: { from: "Title", defaultValue: "new task", type: "string" },
                percentComplete: { from: "PercentComplete", type: "number" },
                summary: { from: "Summary", type: "boolean" },
                expanded: { from: "Expanded", type: "boolean" },

                requestId: { from: "RequstId", type: "number" }

            }
        }
    }
});
var depUrl = "api/requestTaskDependencies";
$scope.ganttDependencyDs = new kendo.data.GanttDependencyDataSource({
    transport: {
        read: {
            url: depUrl + "/" + requestId,
            dataType: datatype
        },
        update: {
            url: depUrl,
            dataType: datatype,
            type: "PUT",
            contentType: contenttype
        },
        create: {
            url: depUrl,
            dataType: datatype,
            type: "POST",
            contentType: contenttype
        },
        destroy: {
            url: depUrl + "/delete",
            dataType: datatype,
            type: "POST",
            contentType: contenttype
        },
        parameterMap: (options, operation) =>
        {
            if (operation !== "read")
            {
                return kendo.stringify(options);
            }
        }
    },
    schema: {
        model: {
            id: "id",
            fields: {
                predecessorId: {from: "PredecessorId", type: "number"},
                successorId: {from: "SuccessorId", type: "number"},
                type: {from: "Type", type: "number"}
            }
        }
    }
});
$scope.ganttOptions = {
    dataSource: ganttDs,
    dependencies: ganttDependencyDs,
    height: 500,
    views: [
        {type: "day", selected: true},
        "week",
        "month"
    ],
    columns: [
        { field: "title", title: "Title", editable: true },
        { field: "start", title: "Start Date", format: "{0:MM/dd/yyyy}", width: 100 },
        { field: "end", title: "End Date", format: "{0:MM/dd/yyyy}", width: 100 }
    ]
};
Andrew
Top achievements
Rank 1
 answered on 23 Mar 2017
1 answer
124 views
Hi,

I am using Kendo UI grid (via JavaScript/Typescript) and would need to allow users to open an Grid Item in the edit popup (or similar popup) with a permalink, i.e. https://somesite/GridTest?id=1234 should open item with id 1234 in a popup window and display the corresponding fields of it.

The grid itself may contain many items and the specific item might not be on the first page.

I am using server side filtering, sorting and paging.

Or is there any other option to display an item with a direct link?
Stefan
Telerik team
 answered on 23 Mar 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
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?