Telerik Forums
Kendo UI for jQuery Forum
3 answers
130 views

Hello,

I can't seem to find a way to sort my filter values into alpha order when the values are being pulled from JSON. Previously filtername.sort() had worked when I had the JSON data directly on the page but that is not an option with this implementation. 

Live page:

https://www.ccah-alliance.org/Urgent-Visit-Providers.html

 

Code:

  <div id="grid"></div>

            <script>



                $(document).ready(function () {

                    var myDataSource =
                        new kendo.data.DataSource({
                            data: JSON,
                            schema: {
                                model: {
                                    fields: {
                                        "ProviderName": { type: "string" },
                                        "OfficeName": { type: "string" },
                                        "OfficeAddress": { type: "string" },
                                        "OfficeCityStateZip": { type: "string" },
                                        "PrimarySpecialty": { type: "string" },
                                        "ProviderLanguages": { type: "string" },
                                        "Hospitals": { type: "string" }
                                    }
                                }
                            },
                            transport: {
                                read: "/aspnetforms/UrgentVisitProviders.ashx"
                            },
                            pageSize: 15,
                            sort: [
                                { field: "OfficeCityStateZip", dir: "asc" },
                            ]
                        });

                    myDataSource.read();


                    $("#grid").kendoGrid({
                        dataSource: myDataSource,
                        dataBound:
                            function (e) {
                                var data = $("#grid").data("kendoGrid").dataSource._data;
                                for (i = 0; i < data.length; i++) {

                                    if (myCities.indexOf(data[i].OfficeCityStateZip) === -1) {
                                        myCities.push(data[i].OfficeCityStateZip);
                                    }

                                    if (mySpecialty.indexOf(data[i].PrimarySpecialty) === -1) {
                                        mySpecialty.push(data[i].PrimarySpecialty);
                                    }

                                    if (myLanguages.indexOf(data[i].ProviderLanguages) === -1) {
                                        myLanguages.push(data[i].ProviderLanguages);
                                    }

                                    if (myHospitals.indexOf(data[i].Hospitals) === -1) {
                                        myHospitals.push(data[i].Hospitals);
                                    }

                                }
                            },
                        columns: [{
                            field: "ProviderName",
                            title: "Provider",
                            width: 80,
                            filterable: false
                        },
                        {
                            field: "OfficeName",
                            title: "Office",
                            width: 110,
                            filterable: false

                        },
                        {
                            field: "OfficeAddress",
                            title: "Address",
                            width: 100,
                            filterable: false
                        },
                        {
                            field: "OfficeCityStateZip",
                            title: "City/State/Zip",
                            width: 105,
                            filterable: {
                                ui: cityFilter
                            }
                        },
                        {
                            field: "PrimarySpecialty",
                            title: "Specialty",
                            width: 80,
                            filterable: {
                                ui: specialtyFilter
                            }
                        },
                        {
                            field: "ProviderLanguages",
                            title: "Languages Spoken",
                            width: 85,
                            filterable: {
                                ui: languagesFilter
                            }
                        },
                        {
                            field: "Hospitals",
                            title: "Hospital",
                            width: 100,
                            filterable: {
                                ui: hospitalFilter
                            }
                        }],

                        sortable: true,
                        height: 900,
                        navigatable: true,
                        filterable: {
                            extra: false,
                            operators: {
                                string: {
                                    eq: "Only show"
                                }
                            }
                        },
                        pageable: {
                            alwaysVisible: true,
                            pageSizes: [5, 10, 20, 100]
                        }
                    });






                    var myCities = [];
                    var mySpecialty = [];
                    var myLanguages = [];
                    var myHospitals = [];




                    myCities.sort();
                    mySpecialty.sort();
                    myLanguages.sort();
                    myHospitals.sort();





                    function languagesFilter(element) {
                        element.kendoDropDownList({
                            dataSource: myLanguages,
                            optionLabel: "--Select Language--"
                        });
                    }


                    function cityFilter(element) {
                        element.kendoDropDownList({
                            dataSource: myCities,
                            optionLabel: "--Select City--"
                        });
                    }

                    function specialtyFilter(element) {
                        element.kendoDropDownList({
                            dataSource: mySpecialty,
                            optionLabel: "--Select Specialty--"
                        });
                    }

                    function hospitalFilter(element) {
                        element.kendoDropDownList({
                            dataSource: myHospitals,
                            optionLabel: "--Select Hospital--"
                        });
                    }






                });


            </script>

Alex Hajigeorgieva
Telerik team
 answered on 13 Aug 2020
3 answers
546 views

Hello, I am referring to the Filters section of https://docs.telerik.com/kendo-ui/controls/data-management/spreadsheet/end-user/user-guide

that describes the Sort fields spreadsheet function ("Sort range A to Z" and "Sort range Z to A" options appears when you click the filter button on the top of a column.

I would like to know how to change the javascript sorting function used for each of these options (it seems to be described on page https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/configuration/columns.sortable in the "EXAMPLE - DEFINE CUSTOM COMPARE FUNCTION" section, but I am having difficulty getting this to work).

Thank you!

Aleksandar
Telerik team
 answered on 13 Aug 2020
2 answers
209 views

I have a grid populating local data with endless scrolling. I have a custom column with ng-repeat in template. Here the grid is duplicating values for that custom column against each data item whenever the loading of new items happens.  

Please refer attached files. 

Please check below link. In that there is Order Detail Grid and then look for custom column.

https://dojo.telerik.com/EWisALuH

rajesh
Top achievements
Rank 1
 answered on 13 Aug 2020
2 answers
125 views
I want to add language support to my Kendo UI Menu widget. There is no culture specific to it, how can I do it?
Furkan
Top achievements
Rank 2
 answered on 12 Aug 2020
1 answer
546 views

Hi, is it possible to do this? It is easy to import the data from one excel workbook (using the fromFile method), but then I would like to allow the user to load in data from additional excel workbooks and have the data display on new tabs of the kendo workbook. At the moment, each additional import overwrites the previous one.

 

Thanks for any help :)

Martin
Telerik team
 answered on 12 Aug 2020
1 answer
276 views

Just a quick request to modify one of the examples in the angular js demo of the drop down list to include basic ng-model code.

https://demos.telerik.com/kendo-ui/dropdownlist/angular

I know it's well documented in the API but I think it would be a minimum requirement for a demo.

 

Cheers

 

Aleksandar
Telerik team
 answered on 11 Aug 2020
6 answers
1.5K+ views

Ok so!

 

I am following a tutorial and the tutorial show how you can take an existing visual studio program and add Telerik to it.

 

Under the telerik menu option in visual studio I select Telerik UI for asp.net mvc then I select upgrade wizard.

Well silly me thought that the wizard after all its wizarding would add what I needed to my visual studio mvc project.

well well... I guess not. Gullible me thought something that we paid alot of money for would do what it claimed it would do.

NOPE!

Can some one tell when what is going wrong here...

I am adding a date time picker to a page. It does not work.

 

I did notice that the location that the wizard added was not in my actual file directory 

where it is looking... so do I have to manually copy those files there??

 

 

 

Here is the source code:

 

The Razor index.cshtml page

@{
    ViewBag.Title = "My Kiosk";
}


@(Html.Kendo().DatePicker().Name("Date").Value(DateTime.Today))

 

The Layout page for the mvc application there the link to the kendo stuff is:

<!DOCTYPE html>
<html>
<head>

    <meta http-equiv="X-UA-Compatible" content="IE=11,chrome=1">

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>@ViewBag.Title - XXXXX</title>

    @Styles.Render("~/Content/css")
    @Scripts.Render("~/bundles/modernizr")


    <link href="@Url.Content("~/Content/bootstrap.min.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/kendo/2020.2.617/jszip.min.js")"></script>
<script src="@Url.Content("~/Scripts/bootstrap.min.js")"></script>
</head>
<body>

 

 

Here are the errors I get on the the web browser 

GET http://localhost:50296/Scripts/kendo/2020.2.617/jszip.min.js net::ERR_ABORTED 404 (Not Found)

bootstrap.min.js:6 Uncaught Error: Bootstrap's JavaScript requires jQuery at bootstrap.min.js:6
(anonymous) @ bootstrap.min.js:6
(index): 71

Uncaught ReferenceError: kendo is not defined at (index):71 (anonymous) @ (index):71

Aleksandar
Telerik team
 answered on 11 Aug 2020
1 answer
345 views

Hi Everyone,

The company I work for use KendoUI through JQuery and MVC.

We are doing Ajax calls via KendoGrid using Razor Pages. We have been getting a few status code 0 Ajax errors and are unsure how to proceed.
We log all of our errors into Raygun but once logged these Ajax errors do not have a stacktrace other than the message.

    I.E: "AJAX ERROR: error POST /File/Controller/Method/Parameters".

 

Theses errors do not always occur to every customer, and often happen sporadically.

We have ruled out the possibility of firewall/timeouts due to other calls becoming success seconds before and after these calls.
What else could be the reason for these status code 0 ajax calls?
What is the most efficient way log an error stacktrace through these KendoGrid Ajax calls?
Or better how can we avoid status code 0?

Thanks in advance.

Angel Petrov
Telerik team
 answered on 11 Aug 2020
3 answers
403 views

Hi, its me again with (gantt) dataSource and changes... and this is pretty urgent :(

I have a following situation, I need to change 5-10 resources/assignments on gantt task and I do it using pushUpdate method by sending an array of items to be updated. (dataSource.pushUpdate(arrayOfItemsForChange))

However this slows widget down because even if one pushUpdate is called, dataBound and dataBind events are triggered for each of them, and these events have some custom code as well (some proposed by support people here as well).
I did some measurements and for 7 items it takes approx 6 seconds to handle this on gantt, during which gantt "freezes" not allowing any action on the timeline.

Is there any way I can have widget (gantt) trigger dataBound and dataBind only once, at the and end then render everything it needs?

Thank you very much.

Best regards,

Vedad

Veselin Tsvetanov
Telerik team
 answered on 11 Aug 2020
3 answers
149 views

Hi,

     I'd like to use stockchart to display my data across thirty years scale with proximately two data per week. However, setting baseUnit to "days" will cause categoryAxis's label overlapping each other. How can I display the data "daily" in chart and make categoryAxis's label display act like setting baseUnit to  "monthly" or "yearly"? 

Thanks,

Bob

 
Nikolay
Telerik team
 answered on 11 Aug 2020
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
Drag and Drop
Application
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
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
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
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
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?