Telerik Forums
Kendo UI for jQuery Forum
3 answers
231 views

I'm having trouble getting date filtering to work. Apologies if this has been answered in another post; searched but didn't find anything that worked for me.

 

Here's what I have:

My data is JSON and looks like this:

[

{
        "Version": “Initial”,  
        "VersionDate": "2016-04-15T13:15:37Z",
},
{
        "Version": “Revision”,  
        "VersionDate": "2016-04-18T14:15:37Z",
    }

]

Here's my relevant grid setup:

$("#grid").kendoGrid({
    dataSource: {
                  transport: {
                        read: {
                              url: dataUrl //returns the JSON as seen above,

                        }
                  },
                  schema:  {
                        model: {
                              fields: {
                                    Version: { type: "string" },
                                    VersionDate: { type: "date" }
                            }
                       }
               } 
    columns: [                 
            field: "Version",
            title: "Version"
        }, {
            field: "VersionDate",
            title: "Date",
            format: "{0:MM/dd/yyyy}",
                filterable: {
                                ui: function(e) {
                                     element.kendoDatepicker({
                                          format: “MM/dd/yyyy”
                                     })
                               }
                }
        }
    ],
    filterable: true
    }
});

My issue:

The dates display in the desired format in the grid, e.g. 04/15/2016; and the filter ui allows me to choose dates with a datepicker in the same format. However, when I filter I get no results. I'm assuming this is because the filtering works on the original data which is a string and is not finding a match because of the different format. What do I need to do in order to get date filtering to work properly? Do I need to do a parse function in my schema set up or some combination of things?

Another note - if I set this up using grid row filtering, I get the following error in console and never see the no results message:

TypeError: n.toLowerCase is not a function

I assume again this has to do with the original data being a date in string format, just can't seem to find the correct set up option(s) to make filtering work.

Please let me know if I need to provide further information; screenshots, example file, etc.

Alan
Top achievements
Rank 1
 answered on 09 May 2016
1 answer
342 views

I have an issue in setting the fixed height to kendo grid. It wont load that fixed height on initial loading time. After that it will work properly.

To fix this I hooked the k-on-data-bound event and trying set the height as follows

kendoEvent.sender.k-grid-content.height(400);

But I am unable to get kendoEvent/grid in this event. Please provide the solution to fix this

Dimiter Topalov
Telerik team
 answered on 09 May 2016
1 answer
168 views

The documentation for `groupable.messages` seems incomplete.  http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#configuration-groupable.messages

I'm looking for a way to remove the field prefix from the grouped headers.

i.e., instead of saying "category: Beverages" to just say "Beverages"

Patrick | Technical Support Engineer, Senior
Telerik team
 answered on 09 May 2016
5 answers
986 views

Hi,

I have two grids on one page in MVC Razor and one DateTime Editor is failing because of a duplicate ID on the page.  

Each grid uses Ajax for its datasource to Bind.   Each grid uses a different model.   However the models both use the same property (eg. Date).   For this particular example I want both grids to be on the page visible in edit mode at the same time (easier editing for the user).  However when I inspect the HTML there are duplicate element ID's.   Both grid editors create input of id="date".   Which causes one of the DateTimePickers to fail /not appear (or bind to).  

Question is:  without having to change the property name of the model, is there a way to tell the grid/editor template to use a different ID or use the ParentsID in combination with the childs?   eg.   Model1_Date   

 

eg

public class Model1

{

  DateTime Date;

  string Surname;

}

 

public class Model2

  DateTime Date;

  string Country;

}

 

 

 

Boyan Dimitrov
Telerik team
 answered on 09 May 2016
3 answers
375 views

On a page I have several charts and a button to export all charts to png.

Is it possible to "stamp" the current date into either the charts or the produced png file?

Morten
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 09 May 2016
1 answer
99 views

Hello,

I am using kendoUI for a site. I am using 

http://kendo.cdn.telerik.com/2016.1.226/js/kendo.all.min.js

https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js

and 

http://kendo.cdn.telerik.com/2016.1.226/styles/kendo.common.min.css

http://kendo.cdn.telerik.com/2016.1.226/styles/kendo.default.min.css

Code:

 $("#ddlCompany").kendoDropDownList({
                dataSource: eventFormDropDownDataSource.Items[0].Items,
                optionLabel: "Select Company",
                dataTextField: "TextField",
                dataValueField: "ValueField"
            });

I have checked that the data source have results. But when I clicking on the dropdown its showing none.

Helen
Telerik team
 answered on 09 May 2016
1 answer
1.1K+ views

Hi I am using the kendo grid with bootstrap and would like to use the css class "table table-condensed" because the default style takes up to much space.

How can I override the kendo css? and where (-:

Alex Gyoshev
Telerik team
 answered on 09 May 2016
1 answer
80 views

Hello,

I'm creating a tree list grid and I have discovered that there is an error formatting a column header:

{
field: "area",
title: "Area Pc (m²)",
format: "{0:n}",
width: 150,
hidden: true  
}

You can see it in the attached screenshot.

Nikolay Rusev
Telerik team
 answered on 09 May 2016
5 answers
1.0K+ views

Hi,

I have an all day event in the scheduler and the allDaySlot is disabled. I expect to see the all day event in the scheduler as an event that occupies through out the day but instead it just seems to hide the event.

http://dojo.telerik.com/inITU/2

In the above example the all day event 'Alex's birthday' on Friday is not seen.

I would like to see the all day event in the scheduler as an event for the entire day. How do I achieve this?

 

 

Vladimir Iliev
Telerik team
 answered on 09 May 2016
1 answer
226 views

Hi,

I am having detail grid for each parent. On custom button, I want to display data of selected detail row. 

I am using template for showing detail data.

<script type="text/x-kendo-template" id="template">
  <div>
                        <div class="gridOptions" kendo-grid k-options="gridOptions" id="gridOptions" k-ng-delay="gridOptions"></div>
                    </div>                
            </script>

Appreciate any help.

Thanks,

Sanjay

Viktor Tachev
Telerik team
 answered on 09 May 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
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
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?