Telerik Forums
Kendo UI for jQuery Forum
2 answers
303 views

We have to retro fit the KendoUI Grid to existing pages which means the grid has to post back the form when a record is selected so that the details will load for that record and then grid would have to reload the current state (filtering state, page, grouping, etc). I  have managed to make all the work by saving the grid's options that get lost and successfully reloaded the grid. 

The one issue I have now is when I turn on filterable option to Mode: "row", it fails once I set the datasource to the grid.  It comes up with an Length is not defined JS error message and I noticed that the datasource didn't even get a chance to load the data so I'm sure that's part of the reason but I'm curious what is different about setting the mode to row vs true that would cause this.

Here is the snippet of the load data function that worked under filterable = true vs mode = "row":

function () {
            var savedOptions = QuicxKendo.getPageState();
            var pageSize = QuicxKendo.options.pageSize || 15;
    
            if (savedOptions != null) {
                pageSize = savedOptions.pageSize;
            }

            var dataSource = new kendo.data.DataSource({
                transport: {
                    read:
                        function (pageOptions) {
                            QuicxKendo.setPageState(pageOptions.data);
                            var data = "{ options: " + QuicxKendo.stringifyData(pageOptions.data) + "}";

                            $.ajax({
                                type: "POST",
                                url: QuicxKendo.options.dataUrl,
                                datatype: "json",
                                contentType: "application/json; charset=utf-8",
                                data: data,   // ParameterMap does not work when transport methods are using functions
                                success: function (result) {                            
                                    if (result.d.Success) {
                                        if (QuicxKendo.isPostback()) {
                                            var gridOptions = QuicxKendo.getGridOptions();

                                            //-- grouping is lost on postback so set it back in
                                            if (gridOptions) {
                                                QuicxKendo.grid.dataSource._group = gridOptions.dataSource.group;                                        
                                            }
                                
                                            QuicxKendo.setIsPostback(false);                                
                                        }

                                        // notify the DataSource that the operation is complete
                                        pageOptions.success(result);
                                        QuicxKendo.kendoGridSetSelectedRow(QuicxKendo.grid);
                                        $('#' + QuicxKendo.options.detailContainerId).show();
                                    } else {
                                        toastr.error("There was an issue loading the grid.", "Error");
                                        pageOptions.error(result);
                                    }
                                },
                            });
                        }
                },
                serverSorting: true,
                serverPaging: true,
                serverFiltering: true,
                serverGrouping: false,
                pageSize: pageSize,
                schema: {
                    data: "d.Data.Data",
                    total: function (result) {
                        return result.d.Data.Total;
                    },
                    model: JSON.parse(QuicxKendo.columnSchema.schema)
                },
                change: function (e) {
                    QuicxKendo.saveGridState();
                }
            });
    
            if (savedOptions) {
                dataSource._page = savedOptions.page;
                dataSource._sort = savedOptions.sort;
                dataSource._group = savedOptions.group;
                dataSource._filter = savedOptions.filter;
            }
    
            QuicxKendo.grid.setDataSource(dataSource);    
        };

 

 

Georgi Krustev
Telerik team
 answered on 20 May 2016
3 answers
344 views

hello there,

There is an common bug in bar chart with the type of "bar", if the value become 0 along with some other negative values, the label of value 0 will overlap the category axis label, please see the attached image.

So here I want move the series label to left of the value axis with the visual function. please refer to telerik demo.

With the visual function, the series label is clipped, and no matter what number of the plot area margin I set , it cannot show the label completely. Is there any way to realize this effect?

It is great if there is a good way to make the label which value is 0 will not overlap the category label.

 

Thanks in advance.

T. Tsonev
Telerik team
 answered on 20 May 2016
10 answers
1.5K+ views

Am using Kendo datepicker Range for dates showing from date and to date  in my application developing in AngularJs. 

  My requirement is once to date is selected , the from date has to show the dates after  selected to-date as disabled  . I am using k-max = "vm.maxDate" and dates after the to-date is not visible.  Similarly for to-date , the dates prior to from-date is not visible where as it should be disabled as per my requirement .

<input kendo-date-picker k-max = "vm.maxDate" k-rebind = "vm.maxDate" id="fromdate" />

<input kendo-date-picker k-min = "vm.minDate" k-rebind = "vm.minDate" id="todate" />

While loading the page , we are setting the default values as :

    vm.maxDate = new Date();
    vm.minDate = new Date(2000, 0, 1, 0, 0, 0);

Please help me on this 

 

Kiril Nikolov
Telerik team
 answered on 20 May 2016
1 answer
84 views
  • in a grid configured to groupable = false
  • using a datasource that is grouped will allow selecting a grouping row, it does not show in the ui, but the select() method will return the grouping row. 

demo: 
http://dojo.telerik.com/aDevo

Nikolay Rusev
Telerik team
 answered on 20 May 2016
2 answers
290 views

Hello,

I've been asked to migrate an existing KendoUI grid to Kendo UI pivot grid....  before I was doing 

 

.DataSource(dataSource => dataSource
      .Ajax()
      .ServerOperation(false)
      .Read(action => action.Action("LoadOperations", "InquiryOperations").Data("getData"))
  )

How can I do this with pivot since the Transport helper doesn't support Data?

 

.DataSource(dataSource => dataSource
        .Ajax()
        .Transport(transport => transport.Read("LoadOperations", "InquiryOperations").Data("getData")))

Thanks

Mahesh
Top achievements
Rank 1
 answered on 19 May 2016
4 answers
135 views

Working with Kendo UI version 2016.2.504, I have tested two filtering method calls across the same odata-v4 dataSource:

1. via .filter() - gridStage.model.DS.filter(DSfilter()) results in:

/app/odata/vwgriddc_info?%24format=json&%24orderby=dc_name&%24filter=dc_id+eq+109&%24count=true

2. via .query() - gridStage.model.DS.query(DSfilter()) results in:

/app/odata/vwgriddc_info?%24format=json&logic=and&filters%5B0%5D%5Bfield%5D=dc_id&filters%5B0%5D%5Boperator%5D=eq&filters%5B0%5D%5Bvalue%5D=109&%24count=true

 

The former works perfectly; the latter fails to properly encode the filter in odata-v4 format and ignores the existing sort parameter. 

I would prefer to render the return within the .query().then() promise, but have worked around the problem with .filter() and requestEnd/setTimeout.

 

Are there plans to update .query() to support odata-v4?  Or, is there some other sort of work around to this issue.

Thanks!

 

 

VAFIR
Top achievements
Rank 1
 answered on 19 May 2016
2 answers
86 views

Hello,

 

I have attached a picture to better illustrate my issue --

When viewing the scheduler on a tablet device, I have noticed that when i try to scroll up and down that the table the events sit on do not align properly with the times. When the scheduler first loads, everything seems to look fine. However, scrolling (as a touch event) causes the issue. Please advise?

Tony
Top achievements
Rank 1
 answered on 19 May 2016
1 answer
246 views

Hi,

I'm trying to populate my grid using a .json schema but i'm facing a weird problem. I first collect the data and initialize the datasource, with both structures being exactly the same. When the grid is drawed it doesn't follow the order of both structures and it "randomly" loads the rows.

This start happening with 5 or more rows.

I think it's a problem related to how Kendo draws the grid in the DOM.

 

I'm using Kendo with Angular2:

@ViewChild("kendoGrid")
    private kendoGridElement: ElementRef;
 
this.kendoGrid = jQuery(this.kendoGridElement.nativeElement).kendoGrid(this.kendoGridOptions).data("kendoGrid");
kendo.bind(this.kendoGridElement.nativeElement, data);

 

this.kendoGridOptions = {
           dataSource: {               
               data: data,
               pageSize: pageSize,
               group: {
                   field: "test",
                   dir: "desc"
               },
               schema: {
                   model: {
                       id: "code"
                   }
               }
           },
           sortable: true,
           groupable: false,
           scrollable: {
               virtual: false
           },
           columns: [
               {
                   field: "shortText",
                   title: "Name",
                   headerTemplate: template1
               },
               {
                   field: "valueAsString",
                   title: "Value",
                   headerTemplate: template2,
               },
               {
                   field: "category",
                   title: "Type",
                   headerTemplate: template3,
               },
               {
                   field: "tags",
                   title: "Tags",
                   headerTemplate: template4,
                   template: template5
               },
               {
                   field: "longText",
                   title: "Description",
                   headerTemplate: template6
               },
               {
                   title: "Command",
                   template: template7,
               },
               {
                   field: "isPinned",
                   title: " ",
                   width: "40px",
                   template: template8
           ],
       };

Viktor Tachev
Telerik team
 answered on 19 May 2016
3 answers
203 views

Hi,

we can't use the MaskedTextBox in our MVVM project because there's a bug when masking with only digits & spaces (for example the simple mask "999"). The mask won't work because a function from Kendo UI seems to expect a thousand or decimal placeholder. This can be easily reconstructed in the MVVM demo for the MaskedTextBox:

http://dojo.telerik.com/exIYe

I just changed the mask to "999" and it is not working any longer. As far as I can tell, no combination without a decimal or thousand placesholder seems to work. Except "000" for example also seems fine, but the number shown is not masked the right way.

Could you please look into this?

Regards,

Steve.

Stefan
Telerik team
 answered on 19 May 2016
2 answers
247 views
In a column menu there's an option to show/hide columns with checkboxes. But this menu is duplicated for all columns, which is not good for me. Is it possible to move that list of columns with checkboxes to a separate control? For example I click some button and a window with that columns list pops up.
Dimo
Telerik team
 answered on 19 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?