Telerik Forums
Kendo UI for jQuery Forum
1 answer
157 views

Hello,

I have an issue when I do a drag and drop event when the resources' datasource is filled by a remote service. The error message is something like "cannot read property 'value' of null" (I'm not 100% sure of translation of the message since I have it in French).

I don't have any issue if I double-click on an task to edit it and then close it or if the datasource is hardcoded in json.

Thank you. 

 

 

    $(document).ready(function () {
                    initScheduler(new Date());
                });

                var initScheduler = function (date) {
                    kendo.culture("fr-BE");
                    $("#scheduler").kendoScheduler({
                        date: moment(date).hours(0).minutes(0).seconds(0).toDate(),
                        startTime: moment(date).hours(7).minutes(0).seconds(0).toDate(),
                        eventHeight: 40,
                        majorTick: 60,
                        eventTemplate: $("#event-template").html(),
                        dataSource: {
                            sync: function () {
                                this.read();
                            },
                            transport: {
                                batch: true,
                                read: {
                                    url: "Services/ServiceScheduler.asmx/GetInterventions",
                                    type: "POST",
                                    contentType: 'application/json; charset=utf-8',
                                    dataType: 'json',
                                    data: { pDate: moment(date).format("DD/MM/YYYY") },
                                    cache: false,
                                    complete: function (e) {
                                        $('<p>- Interventions ok</p>').appendTo('#console');
                                    }
                                },
                                update: {
                                    url: "Services/ServiceScheduler.asmx/UpdateInterventions",
                                    contentType: 'application/json; charset=utf-8',
                                    dataType: "json",
                                    type: "POST"
                                },
                                parameterMap: function (options, operation) {
                                    if (operation !== "read") {
                                        return kendo.stringify({ models: kendo.stringify(options) });
                                    } else {
                                        return kendo.stringify(options);
                                    }
                                }
                            },
                            schema: {
                                data: function (data) { // the data which the data source will be bound to is in the values field
                                    return data.d; //Sinon ça plante!
                                },
                                model: {
                                    id: "taskID",
                                    fields: {
                                        taskID: { from: "TaskId", type: "number" },
                                        roomId: { from: "RoomId", type: "number" },
                                        start: { from: "DateDebut", type: "date" },
                                        end: { from: "DateFin", type: "date" },
                                        title: { from: "Description" },
                                        description: { from: "Description" },
                                        PatientDescription: { from: "PatientDescription", editable: "true" }
                                    }
                                }
                            },
                            error: function (e) {
                                console.log(e.errors); // displays "Invalid query"
                            }
                        },
                        views: [
                            { type: "timeline", selected: true }
                        ],
                        group: {
                            resources: ["Salles"],
                            orientation: "vertical"
                        },
                        resources: [
                            {
                                field: "roomId",
                                name: "Salles",
                                dataSource: {
                                    transport: {
                                        read: {
                                            url: "Services/ServiceScheduler.asmx/GetRooms",
                                            dataType: "json",
                                            contentType: "application/json; charset=utf-8",
                                            type: "POST",
                                            complete: function (e) {
                                                $('<p>- Salles ok</p>').appendTo('#console');
                                            },
                                        }
                                    },
                                    schema: {
                                        // describe the result format
                                        data: function (data) { // the data which the data source will be bound to is in the values field
                                            return data.d; //Sinon ça plante!
                                        },
                                        model: {
                                            id: "value",
                                            fields: {
                                                value: { from: "IDAgenda", type: "number" },
                                                text: { from: "Description" }
                                            }
                                        },
                                        error: function (e) {
                                            console.log(e.errors); // displays "Invalid query"
                                            //alert("alalal");
                                        }
                                    }
                                },
                                parameterMap: function (options, operation) {
                                    if (operation !== "read" && options.models) {
                                        return { models: kendo.stringify(options.models) };
                                    }
                                }
                            }
                        ]
                    });
                }

 

Resources datasource from my remote service :

{"d":[{"__type":"GestionRendezVous.Services.RoomsTask","IDAgenda":1737,"Description":"Infirmière instrumentiste XXXXX"},{"__type":"GestionRendezVous.Services.RoomsTask","IDAgenda":1660,"Description":"Marie Curie Dicom"},{"__type":"GestionRendezVous.Services.RoomsTask","IDAgenda":1709,"Description":"Marie Curie Salle 0"},{"__type":"GestionRendezVous.Services.RoomsTask","IDAgenda":1689,"Description":"Marie Curie Salle 01"},{"__type":"GestionRendezVous.Services.RoomsTask","IDAgenda":1682,"Description":"Marie Curie Salle 02"},{"__type":"GestionRendezVous.Services.RoomsTask","IDAgenda":1548,"Description":"Marie Curie Salle 03"},{"__type":"GestionRendezVous.Services.RoomsTask","IDAgenda":1584,"Description":"Marie Curie Salle 04"},{"__type":"GestionRendezVous.Services.RoomsTask","IDAgenda":1688,"Description":"Marie Curie Salle 05"},{"__type":"GestionRendezVous.Services.RoomsTask","IDAgenda":1704,"Description":"Marie Curie Salle 06"},{"__type":"GestionRendezVous.Services.RoomsTask","IDAgenda":1728,"Description":"Marie Curie Salle 08"},{"__type":"GestionRendezVous.Services.RoomsTask","IDAgenda":1686,"Description":"Marie Curie Salle 09"},{"__type":"GestionRendezVous.Services.RoomsTask","IDAgenda":1585,"Description":"Marie Curie Salle 10"},{"__type":"GestionRendezVous.Services.RoomsTask","IDAgenda":1683,"Description":"Marie Curie Salle 12"},{"__type":"GestionRendezVous.Services.RoomsTask","IDAgenda":1736,"Description":"Marie Curie Salle Cathé Cardio"},{"__type":"GestionRendezVous.Services.RoomsTask","IDAgenda":1735,"Description":"Marie Curie Salle EEP"},{"__type":"GestionRendezVous.Services.RoomsTask","IDAgenda":1702,"Description":"Marie Curie salle endoscopie 1"},{"__type":"GestionRendezVous.Services.RoomsTask","IDAgenda":1703,"Description":"Marie Curie salle endoscopie 2"},{"__type":"GestionRendezVous.Services.RoomsTask","IDAgenda":1643,"Description":"Z Test Marie Curie Angio Vidéo"},{"__type":"GestionRendezVous.Services.RoomsTask","IDAgenda":1610,"Description":"Z Test Marie Curie Vidéo"}]}

 

 

Vladimir Iliev
Telerik team
 answered on 29 Apr 2015
2 answers
347 views

Hi,

I'm have found the following example for pure JQuery:

http://jsfiddle.net/7PXu7/70/

So basically its about moving an item from 1 box to another. I have been trying to replicate this with AngularJS but without success.

Does anyone have a similar example to this fiddle but within an AngularJS setup?

Thanks,

Arno

arno
Top achievements
Rank 1
 answered on 29 Apr 2015
1 answer
109 views

Need to develop a grid with "New record" on top toolbar, when clicked, should show up New row at bottom with following specification"

- Row should be filled with all "Combobox" in all column fields 

- Once item changed in Combobox1 of Column1, should auto populate Combobox2 of Column2  and Vice-versa (both columns are dependent)

 Please suggest.

 

Alexander Popov
Telerik team
 answered on 29 Apr 2015
5 answers
3.3K+ views
Hello,

I'm trying to upload multiple files at a time; I'm receiving both of the files but they're coming one after another and passing a single file rather then an array of two files like I would have hoped and expected.

Here is the code that I've written:

in Html
   <input name="docs[]" id="docs" type="file" />


in js:
$("#docs").kendoUpload({
        async: {
            saveUrl: '/Form/'+selectedSubscription.subscriptionId+'/uploadTransactionDocs',
            autoUpload: false
        },select: attachClickHandler, 
        success : function(e){
        if(e.response.status=='success'){
        docsReceivedLoad = e.response.msg;
        }
        }
    });


function attachClickHandler(e)
{
window.setTimeout(function() {
        $(".k-upload-selected").click(function(e) {
            // custom logic
        if (false) {
                e.preventDefault();
                return false;
            }
       
        });
    }, 1);
}

Any idea why the saveUrl is being called twice with two files rather then 1 time with an array of 2 files?

Thank you.
Keith
Dimiter Madjarov
Telerik team
 answered on 29 Apr 2015
1 answer
744 views

I am using a Kendo File Upload control to upload multiple files. Only few of the files are getting uploaded (especially first and last) or some random ones. Is there any solution for this ?

Index.cshtml :<input name="files" id="files" type="file" multiple="multiple" />

JS File :$("#files").kendoUpload
({
async: {
saveUrl: "/Controller/GetUserUploadedFiles",
removeUrl: "/Controller/Remove",
autoUpload: false,
allowmultiple: true,
batch: true
},
select: function (e) {
onSelect(e);
},
success: function (e) {
},
error: function (e) {
}
});

//Controller Method

[HttpPost]
public void GetUserUploadedFiles(IEnumerable<HttpPostedFileBase> files)
{
//Custom logic here
}

Also, it would be great if i can get all the files as Enumerable in one controller method call rather than having it called multiple times for multiple files.Is there anything i am missing or doing wrong ?

Thanks, Srini

Dimiter Madjarov
Telerik team
 answered on 29 Apr 2015
5 answers
169 views
I have 2 grids with identical data structures but 2 different initializations. I am using the popup editor for both and both have an "Add new Record" button at the top. When I click the first it opens 2 Add/Edit popup windows. Any way to stop this?
Dimiter Madjarov
Telerik team
 answered on 29 Apr 2015
3 answers
443 views

Hi,

I am trying to filter on CategoryID inside the Grid. I am getting an exception that can be shown in this example: 

http://dojo.telerik.com/@bhaidar/ipoYU/2

 

Even the filter is not reflecting the fact that the field is a number but assuming it's a string.

 

Thanks

Plamen
Telerik team
 answered on 29 Apr 2015
8 answers
80 views

My sortable items sometimes have scrollbars. On Chrome, this works fine, but on IE, I have issues.

On a sortable item with a scrollbar, click on the thumb and drag it to move the scrollbar, when you do a mouseup, the drag event of the sortable continues and won't release until I press the esc key.

I am currently using IE9 (9.0.8112.16421)

Thanks,

--Ed

Petyo
Telerik team
 answered on 29 Apr 2015
1 answer
122 views

Hi, 

I was wondering whether we can modify the Gantt chart control to show a profile picture next to resources for selection and in the resources. 

 

If so, where abouts should the modifications take place ?

 

 

thanks

Dimitar Terziev
Telerik team
 answered on 29 Apr 2015
2 answers
119 views

This issue happens only in chrome. works perfectly fine in IE and Firefox.

There is a related issue here :

http://www.telerik.com/forums/datasource-different-sorting-causes-chrome-to-mess-up-stacked-grouped-barcharts

The data in the category axis appears mixed and does not state the values correctly.

Is there a solution to this, so that the grouped stacked charts (column or bar charts) appear properly in Chrome???

Thanks,

Rohit

Iliana Dyankova
Telerik team
 answered on 29 Apr 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
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
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?