Telerik Forums
Kendo UI for jQuery Forum
1 answer
307 views

I'm implementing a Kendo bar chart representing power usage for 24 hours of a day. I'm following the demo from here.( http://demos.telerik.com/kendo-ui/chart-api/selection ). Assuming the hour axis(x-axis) has 24 points and 24 data values, the start point being 12am and end point 12am next day (or 11:59:59pm same day), how to get value of the 25th axis point. The way chart represents data is, 24 bars placed between 25 axis points. In the above demo,if you select first single unit in x-axis it console logs `Select end :: 0 - 1 (1952 - 1952), Select start :: 0 - 1 (1952 - 1952)` , which is little confusing, How can start and end value be same? In my case, it is working fine till 24th axis point, but once i select 24th bar, the 25th axis point(the end point) logs out undefined. How to get around this? Any suggestions?

 

Iliana Dyankova
Telerik team
 answered on 27 Oct 2016
3 answers
187 views

Hi,

I'm trying to find a way to dynamically trim the pageSizes list of options in the case where the number of rows returned from a read is less than the pageSize originally specified. So, if I have pageSizes set to [5, 10, 15, 20, 25, 30], pageSize set to 20, but the number of rows that are returned is only 13 (because there just ends up not being 20 rows that match the read), I don't want to show the options of 20, 25, and 30.

What I've tried so far is adding a function to the Grid's dataBound event. In this dataBound function callback, I first bind a function to the dataBound event of the pageSizes kendoDropDownList object which will call setTimeout (I wasn't having any luck with using any of the kendoDropDownList methods that manipulate the dropdown without setTimeout. It seemed like the dropdown wasn't fully built out after dataBound) and pass in a function which calls the kendoDropDownList.select with the appropriate index. This will update the selected option from the default pageSizes option to what I calculate to what should be the highest available option based on the number of results returned from read. After I set this dataBound callback on the kendoDropDownList, I call setDataSource on the kendoDropDownList, passing in my calculated list of pageSizes, each in the format {text: "#", value: "#"}.

However, when I try this strategy, I see the dropdown get updated with the correct options and the correct selected option, but the first option has this weird border around it when i click on the dropdown for the first time. In addition to that, the first time the user clicks on the dropdown, and then clicks off, the Grid executes another read, which is not ideal.

I also tried this same strategy with the modification of not using the kendoDropDownList's dataBound event to call .select(), but rather just executing that (again in a setTimeout) just after I set the dataSource. I experienced the same result here as well.

Any idea on how to solve this?

*I've attached a screenshot which describes the result of my code, if this visual helps at all in regards to the weird border i was seeing

Stefan
Telerik team
 answered on 26 Oct 2016
6 answers
324 views

Hi,

We're seeing an inconsistent behavior with the grid filter multi checkboxes that I've been able to reproduce on the demo page (http://demos.telerik.com/kendo-ui/grid/filter-multi-checkboxes).

Here's the scenario using the Client Operations grid.

1. Click the filter for the ProductName column and select the items Chai and Chang, then click the filter button. The filter is applied and the grid updates.

2. Click the filter again and uncheck the Chang item, then click the filter button. The filter is applied and the grid updates.

3. Click the filter again and uncheck the Chai item, then click the filter button. Nothing happens.

This is inconsistent to the user because sometimes you uncheck the checkboxes and the filter updates but sometimes it doesn't.

It looks like if you clear the last checked item on the list the filter will not update, you have to click the 'Clear' button.

Thanks!

Chris

 

Konstantin Dikov
Telerik team
 answered on 26 Oct 2016
5 answers
1.2K+ views

Hi,

I'm using a Kendo DatePicker for my HTML5 grid (Attachment "date1.png").

If you select/pick a date everything's fine, but if you type a date manually and set the focus on any other object, the typed date will jump 1 day before it. For example:

I type "13.07.2016" and click a save-button (that's what I meant with set the focus on any other object), then the date jumps to "12.07.2016".

Do not hesitate to ask if you have any questions.

Andreas
Top achievements
Rank 1
 answered on 26 Oct 2016
2 answers
245 views

I'm trying to export to PDF records of a grid.

I`m folowing the example of this demo http://demos.telerik.com/kendo-ui/grid/pdf-export

And i'm having an issue with this part:

.Pdf(pdf => pdf
                   .AllPages()
                   .AvoidLinks()
                   .PaperSize("A4")
                   .Scale(0.8)  -->
                    .Margin("2cm", "1cm", "1cm", "1cm")
                   .Landscape()
                   .RepeatHeaders() -->
                  .TemplateId("page-template") -->
                   .FileName("Kendo UI Grid Export.pdf")
                   .ProxyURL(Url.Action("Pdf_Export_Save", "Grid")))

 

The compiler of visual studio show me an error of reference for the options (Scale, RepeatHeaders and TemplateId).

I hope someone can help me with this. Please.

Vessy
Telerik team
 answered on 26 Oct 2016
1 answer
5.9K+ views
Hi,

Please tell me how to bind a kendo grid dynamically using a datatable?

I am trying to use the following script but its returning few extra fields [EX: DataView, RowVersion, Row, IsNew, IsEdit] which I do not want to display in my grid.

@model System.Data.DataTable

@(Html.Kendo().Grid(Model).Name("GridExcel")
        .DataSource(dataSource => dataSource
        .Ajax()
        .Read(read => read.Action("Read_Excel", "Home")))
        .Columns(columns =>
        {
            if (Model != null)
            {
                foreach (System.Data.DataColumn column in Model.Columns)
                {
                    if (column.ColumnName != "DataView" && column.ColumnName != "RowVersion" && column.ColumnName != "Row" && column.ColumnName != "IsNew" && column.ColumnName != "IsEdit")
                    {
                        columns.Bound(column.DataType, column.ColumnName);
                    }
                }
            }                 
        })
        .Pageable()
        .Sortable()
        .Scrollable()
        .Filterable()
)
Dimiter Topalov
Telerik team
 answered on 26 Oct 2016
4 answers
636 views

As per the DataSource documentation, the event "requestStart" has the following description:

Fired when the data source makes a remote service request.

However, when the DataSource sorting is set to local, the event "requestStart" is still being fired causing us bugs.

Kindly advise.

Salim
Top achievements
Rank 1
 answered on 26 Oct 2016
3 answers
148 views

Hi,

I have grid with service and their types and their advisors

each advisor also have types.

I want to load type and adviosrs on service name clicks.

and want to load all types of particular advisours on advisor click

 

I have attached image please have look and suggest approch, how can we achieve this

Dimiter Topalov
Telerik team
 answered on 26 Oct 2016
3 answers
399 views

We get results like the attached "LockingNotWorking" snip, with locking: true.  On rare occasions it works more or less, i.e. the locked and unlocked columns show up, but different column heights.  If you you use the tiny scroll bar and start to resize a column it will snap into a correct format.  The attached "NoLocking" snip shows a normal view with no columns locked.  Here's the code:

<div id="orcaangulargrid" ng-app="orcaGridApp" ng-controller="OrcaGridController">
    <div kendo-grid id="grid" k-options="gridOptions" k-ng-delay="gridOptions" class="expand-vertical" }></div>
</div>

angular.module("orcaGridApp", ["kendo.directives"]).controller("OrcaGridController", function ($scope) {
    $scope.gridOptions = {
        sortable: true,
        filterable: true,
        pageable: { pagesize: 25, pagesizes: [25, 50, 100, 500] },
        navigatable: true,
        editable: true,
        enabled: true,
        scrollable: true,
        resizable: true,
        height: 550,
        dataSource: {
            transport: {
                read: {
                    url: "/DataSolutions/Grid/Read/" + formId + "?timePeriodId=" + timePeriodId + "&groupId=" + groupId + "&projectId=" + projectId,
                    type: "POST",
                },
                update: {
                    url: "/DataSolutions/Grid/Update/" + formId + "?timePeriodId=" + timePeriodId + "&groupId=" + groupId + "&projectId=" + projectId,
                    type: "POST"
                },
                create: {
                    url: "/DataSolutions/Grid/Create/" + formId + "?timePeriodId=" + timePeriodId + "&groupId=" + groupId + "&projectId=" + projectId,
                    type: "POST"
                }
            },
            autoSync: true,
            batch: true,
            schema: {
                model: {
                    id: "ContextId",
                    fields: {
                        ContextId: { editable: false, type: "" }
                        , ContextName: { editable: false, type: "" }
                        , m_94: { editable: false, type: "" }
                        , m_96: { editable: false, type: "" }
                        , m_76: { editable: false, type: "" }
                        , m_98: { editable: false, type: "" }
                        , m_77: { editable: false, type: "" }
                        , m_330: { editable: false, type: "" }
                        , m_89: { editable: false, type: "" }
                        , m_93: { editable: false, type: "" }
                        , m_91: { editable: false, type: "" }
                    }
                },
                data: "data",
                total: "total"
            },
            pageSize: 25,
            serverPaging: true
        },
        columns: [
            { title: 'Practice Name', width: 150, filterable: true, field: 'ContextName', headerAttributes: { style: 'white-space: normal' }, template: '<span class="locked-column">#=ContextName#/></span>', locked: true }
        //{ title: 'Practice Name', field: 'ContextName', width: 150, editable: true, filterable: false, sortable: true, locked: true, template: '<span class="locked-column">#=ContextName#/></span>', headerAttributes: { style: 'white-space: normal' } }
            , { title: 'Practice Address', field: 'm_94', width: 100, filterable: false, sortable: false, headerAttributes: { style: 'white-space: nowrap' } }
            , { title: 'Practice City', field: 'm_96', width: 200, filterable: false, sortable: false, headerAttributes: { style: 'white-space: nowrap' } }
            , { title: 'WTF?', field: 'm_76', width: 100, filterable: false, sortable: false, headerAttributes: { style: 'white-space: nowrap' } }
            , { title: '*Practice Zip', field: 'm_98', width: 100, filterable: false, sortable: false, headerAttributes: { style: 'white-space: nowrap' } }
            , { title: 'What The Hell?', field: 'm_77', width: 200, filterable: false, sortable: false, headerAttributes: { style: 'white-space: nowrap' } }
            , { title: 'Other work organization type', field: 'm_330', width: 500, filterable: false, sortable: false, headerAttributes: { style: 'white-space: nowrap' } }
            , { title: 'Report Recipient Email', field: 'm_89', width: 100, filterable: false, sortable: false, headerAttributes: { style: 'white-space: nowrap' } }
            , { title: '200', field: 'm_93', width: 100, filterable: false, sortable: false, headerAttributes: { style: 'white-space: nowrap' } }
            , { title: 'Observed Fax Number', field: 'm_91', width: 100, filterable: false, sortable: false, headerAttributes: { style: 'white-space: nowrap' } }]
    };
})

Dimo
Telerik team
 answered on 26 Oct 2016
3 answers
1.0K+ views

Can anyone help me how to get a notification message after deleting a row of a batch editing grid.

I need to show a success message or not after i click the ok button.

Please i hope you can help me with this issue.

Eduardo Serra
Telerik team
 answered on 25 Oct 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
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
SmartPasteButton
PromptBox
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?