Telerik Forums
Kendo UI for jQuery Forum
1 answer
103 views

In Editor for imageBrowser and fileBrowser need progressBar.

If upload big file or slow connection user upload file and nothing see

Dimitar
Telerik team
 answered on 28 May 2019
4 answers
777 views

I'm following the example here: https://demos.telerik.com/aspnet-mvc/grid/server-export

But I'm getting a null pointer if any of the grid values are null. Shouldn't it act like the client export and just put in an empty value?

Is there some workaround for this?

 

 

◢ $exception {"Object reference not set to an instance of an object."} System.NullReferenceException

   at System.Object.GetType()
   at Kendo.Mvc.Export.Helpers.SetCellValue(ICellExporter cell, Object value)
   at Kendo.Mvc.Export.Helpers.CollectionToStream(SpreadDocumentFormat format, IEnumerable data, IList`1 model, String title, Action`1 columnStyleAction, Action`1 rowStyleAction, Action`1 cellStyleAction)
   at Kendo.Mvc.Export.ExportExtensions.ToXlsxStream(IEnumerable instance, IList`1 model, String title, Action`1 columnStyleAction, Action`1 rowStyleAction,

Alex Hajigeorgieva
Telerik team
 answered on 27 May 2019
1 answer
243 views

Hello,

 

I have a problem with export to excel when treelist contains columns in group

See Dojo 1

1. Last name is second column in browser, however in excel it is last one.

The problem is not so big if data corresponded to header, but header and data do not match!!

2. Group is not a merged column 

 

In certain scenarios we get completely broken file. Dojo 2.

Excel offers to restore file, but after restore, header is even more broken than in first scenario (see attachments)

 

I tested it in chrome with jszip 2.4.0, 3.1.5, 3.2.0

 

Any possibilities to fix it?

 

Tsvetina
Telerik team
 answered on 27 May 2019
6 answers
2.2K+ views

Hi,

I have a Jquery grid that has a column with dropdown values as below.   All the CRUD functions work 100% and data displays correctly.

The problem is that the filter for the dropdown list shows the object  "[object] [Object]" and not the drop down values from the grid.

I thought I could just use the Filter Menu customization example below... but this doesn't work and doesn't seem to trigger the javascript at all.

https://demos.telerik.com/kendo-ui/grid/filter-menu-customization

 

var dataSource = new kendo.data.DataSource({
            type: "aspnetmvc-ajax",
            transport: {
                "read": {
                    url: "/Admin/Wells/GetWells"
                },
                "update": {
                    url: "/Admin/Wells/Update"
                },
                "create": {
                    url: "/Admin/Wells/Create"
                },
                "destroy": {
                    url: "/Admin/Wells/Delete"
                }
            },
            //batch: true,
            pageSize: 20, 
            serverPaging: true,
            serverSorting: true,
            serverFiltering: true,
            serverGrouping: true,
            serverAggregates: true,
            schema: {
                data: "Data",
                total: "Total",
                errors: "Errors",
                model: {
                    id: "Id",
                    fields: {
                                "Id":{"type": "string", "nullable": false},
                                "NAME":{"type": "string", "nullable": false, "validation": {"required": { "message": "This field is required" }}},
                                "OPERATORFK":{"defaultValue": { "ID": "0", "NAME": ""}}
}
                }
            }
        });
$(gridID).kendoGrid({
            sortable: true,
            autoBind: false,
            dataSource: dataSource,
            filterable: true,
            filter: function (e) {
                console.log("filter event is fired");
            },
            columnMenu: true,
            resizable: true,
            selectable: "single",
            autoFitColumn: false,
            pageable: {
                pageSize: 20
            },
            columns:[
                { field: "Id", nullable: "false", title: "ENO", minResizableWidth: "125px", type: "string" },
                { field: "NAME", title: "Borehole Name", minResizableWidth: "350px" },
                { field: "OPERATORFK", filterable: { ui: categoryFilter } , title: "Operator Name", minResizableWidth: "350px", values: values, editor: categoryDropDownEditor, template: "#= (OPERATORFK.NAME == null) ? '' : OPERATORFK.NAME#"}
            ],
            editable: "popup"
 
        });

 

function categoryFilter(element) {
    alert(JSON.stringify(values));
    element.kendoDropDownList({
        dataSource: values,
        optionLabel: "--Select Value--"
    });
 
}
Tsvetina
Telerik team
 answered on 27 May 2019
2 answers
320 views

Hi

Is there a way to get the selected item's group in kendo Dropdownlist with grouping?

Thanks!

Jimmy
Top achievements
Rank 1
Iron
Veteran
 answered on 27 May 2019
5 answers
1.2K+ views
Hi,

I know there is plenty of question about formatting Date in DatePicker but I just can`t get it to work.

I have this:

View(razor)
<script src="~/Scripts/kendo/2014.1.415/cultures/kendo.culture.hr-HR.min.js"></script>

<script type="text/javascript">
   kendo.culture("hr-HR");
<script type="text/javascript">

<div id="form-container">
@Html.Kendo().DatePickerFor(m => ugrozenostSvojte.DatumProcjene).Events(ev => ev.Change("onPickerChange")).Culture("hr-HR").HtmlAttributes(new { data_bind = "value: selectedUzrok.DatumProcjene" })

<button id="save">Save</button>
</div>
<script type="text/javascript">
 $(document).ready(function () {
...

kendo.bind($("#form-container"), viewModel);

viewModel.productsSource.read();

$("button").click(function (e) {
            var validator = $("#form-container").kendoValidator();
         if (validator.validate() == true) {
                viewModel.productsSource.sync();
            }
});

});
<script type="text/javascript">

webconfig
 <globalization uiCulture="hr-HR" culture="hr-HR" enableClientBasedCulture="true" />
 
 This part about binding, selecting value from datepicker works fine. But in the value o datepicker is always something like:
 "Wed May 07 2014 00:00:00 GMT+0200 (Central European Daylight Time)".
 
 This same value have been sent to server. Of course, my model in the backend is datetime and is null.

 And if I put some format on datepicker (like .Format("{0:dd.MM.yyyy}")) the I am getting validation message: "The field DatumProcjene must be a date."
 
controller - model.DatumProcjene is null

  public ActionResult UpdateUgrozenostiSvojte(customDataSourceRequest request, UgrozenostSvojteViewModel model)
        {
            var ugrozenostSvojte = this.UgrozenostSvojteService.Update(model);

            return Json(ugrozenostSvojte, JsonRequestBehavior.AllowGet);
        }


model
 public class UgrozenostSvojteViewModel
    {
public DateTime DatumProcjene { get; set; }
}

Please help.
Robert
Top achievements
Rank 2
 answered on 24 May 2019
13 answers
2.0K+ views

I have a Kendo UI Grid in Angular that includes several foreign keys.  For the most part, the columns' displays can be handled using the 'values' property for the column.  However, I have a column in which I want to display both text and a font awesome image based on the foreign key ID.  I assume this will need a template, but do not know what to enter in the template.  For this column, I want something similar to the following:

$ctrl.columns = [{
    field: 'typeId',
    title: 'Type',
    values: $ctrl.types,
    editor: typeComboboxEditor,
    template:
        '<div>' +
            '<i class={{dataItem.typeId.image}} aria-hidden="true"></i>' +
            '<br/>{{dataItem.typeId.text}}' +
        '</div>'
}, {
    field: 'text',
    title: 'Item',
    width: '500px'
},
// etc.
{
    command: [
        { name: "edit", text: "" },
        { name: "destroy", text: "" }
    ]
}];

Obviously, dataItem.typeId is not what I need to use to get to the image and text, but I do not know what to put here.  For a different column, I created a component and passed in the entire dataItem, but that seems overkill for this.  

Is there a simpler way to reach two fields of the parent table when using a foreign key?

Thanks!

Donny
Top achievements
Rank 1
 answered on 24 May 2019
3 answers
1.9K+ views
Does the Kendo Spreadsheet have the functionality to have a drop down list in a row like Excel?
Veselin Tsvetanov
Telerik team
 answered on 23 May 2019
5 answers
509 views
I have used hasChanges() to detect dirty flag in dataSource. But it behaves in strange way when we have 1 row inside Grid and if i we delete that still hasChanges() return false. 
              I have created DOJO demo https://dojo.telerik.com/alOHiyOV  
      What is official solution
Tsvetomir
Telerik team
 answered on 23 May 2019
5 answers
369 views

Hello,

I would like to be able to filter my chart according to dates. The problem is that the filter does not apply correctly. If I put the beach from May 1st to the end of May, I have dates of April and even February 2018 coming up. 

Here is an example Dojo (Normally I receive the datasource dynamically)

Thank you for your help. 

n/a
Top achievements
Rank 1
 answered on 23 May 2019
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?