Telerik Forums
Kendo UI for jQuery Forum
1 answer
212 views
Hello Friends,

I want to implement kendo virtual scrolling with browser window scrollbar instead of grid scroll. Always I want to show only 10 records in my grid based on the mouse moving. If once mouse it reaches to bottom then i have to show next 10 records, in case it moving to top then i have to fetch previous 10 records. this way i have to implement.

Please give me your suggestions and share your thoughts to implement virtual scroll.

I have tried with following code, but still getting some issues.

$(window).scroll(function () {
            if (($(window).scrollTop() == ($(document).height() - $(window).height())) == true) {
                if (pageSize <= $("#listgrid").data("kendoGrid").dataSource.total()) {
                    pageNumber = pageNumber + 1;
                    pageSize = pageSize + 10;
                    $("#listgrid").data("kendoGrid").dataSource.query({ page: pageNumber, pageSize: pageSize });
                }
            }
        });
Dimo
Telerik team
 answered on 28 Jan 2015
3 answers
127 views
Hi When I reorder the column with the function reorderColumn(x, y) the event columnReorder does not fire...

When I hide the column with hideColumn(x) then the event columnHide does fire

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

Seems like a bug to me

Many thanks
Kiril Nikolov
Telerik team
 answered on 28 Jan 2015
1 answer
63 views
function ConfirmMigrate(e){
                var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
                $("#window").data("kendoWindow").content(detailsTemplate(dataItem));
               // var name = dataItem.SubscriberFirmName;
                 $('#Subscribers').kendoDropDownList();
                var dropDown = $("#Subscribers").data("kendoDropDownList");
                var itemToRemove = dropDown.dataSource.at(0);// displays all but the first Subscriber.
                dropDown.dataSource.remove(itemToRemove);
    
I would like to display all but a specific firm on the dropdown. In my case it would be the name.
At the moment , drop down displays all but first subscriber on the table but I would like to pass the name of the firm as a parameter  and do not include the name in the drop down.  
Kiril Nikolov
Telerik team
 answered on 28 Jan 2015
1 answer
89 views
Hi

How can I force the grid to reset the filter when the input filter field is emptied (it is unusual to have to click a "clear" button instead of just emptying the field)?

http://dojo.telerik.com/ukOja/10

Also I would like to update the grid when the user typed in the search field.

Many thanks
Alexander Popov
Telerik team
 answered on 28 Jan 2015
4 answers
99 views
Hi, I cannot get my application's grid or the Kendo grid demo to work with the new "persist state" feature when using iPad Safari.  Is this a known issue? 
Kiril Nikolov
Telerik team
 answered on 28 Jan 2015
1 answer
110 views
Hi

I update my data through one of my own functions. I am looking for a function that reloads the data.

grid.dataSource.read(); does not work

Here is my example

http://jsbin.com/jizujevixi/1/

Many thanks
Nikolay Rusev
Telerik team
 answered on 28 Jan 2015
1 answer
235 views
We would like to use incell editing and a masked phone no. MVC 5 application

I have tried this:  

telephone.cshtml
@using Kendo.Mvc.UI
@model string
 
@(Html.Kendo().MaskedTextBoxFor(m=>m).Mask("(000) 000-0000"))



Model
public class ResidentVm
    {
        public Guid ResidentId { get; set; }
        [Required]
        public string FirstName { get; set; }
        [Required]
        public string LastName { get; set; }
        [Required]
        [DataType(DataType.EmailAddress)]
        public string Email { get; set; }
        [Required]
        [DataType(DataType.PhoneNumber)]
        [UIHint("Telephone")]
        public string Phone { get; set; }
        [Display(Name = "DOB")]
        [Required]
        [UIHint("Date")]
        public DateTime DOB { get; set; }
    }


gridview.cshtml
@(Html.Kendo().Grid<ResidentVm>()
          .Name("ResidentsGrid")
          .Columns(c => {
                            c.Bound(r => r.ResidentId).Hidden();
                            c.Bound(r => r.FirstName);
                            c.Bound(r => r.LastName);
                            c.Bound(r => r.Phone).EditorTemplateName("telephone");
                            c.Bound(r => r.Email);
                            c.Bound(r => r.DOB).Format("{0:d}").EditorTemplateName("Date");
          })
          .Editable(editable => editable.Mode(GridEditMode.InCell))
        .ToolBar(toolBar => toolBar.Create())
                         
          .Pageable()
          .Sortable()
          .Scrollable()
          .HtmlAttributes(new { style = "height:230px; margin-bottom:20px" })
          .DataSource(dataSource => dataSource
              .Ajax()
              .Batch(true)
              .ServerOperation(false)
              .PageSize(20)
              .Events(events => events.Error("error_handler"))
              .Model(m =>
                {
                    m.Id(em => em.ResidentId);
                    m.Field(p => p.ResidentId).Editable(false);
 
                })
               
               
              .Create(update => update.Action("CreateResidents", "AuthorizationExemption"))
              .Read(read => read.Action("GetResidents", "AuthorizationExemption"))
              .Update(update => update.Action("EditingInline_Update", "AuthorizationExemption"))
              .Destroy(update => update.Action("EditingInline_Destroy", "AuthorizationExemption"))
          )
          )


However, this does not work :(

Please help


Rosen
Telerik team
 answered on 28 Jan 2015
3 answers
87 views
Hi

We put a listview in mobilescroller, but it cannot be rendered, 
Check this http://dojo.telerik.com/AXET/19
Maybe the bug https://github.com/telerik/kendo-ui-core/issues/280 is not fixed

And we tried to use `k-ng-delay` like http://dojo.telerik.com/AXET/20 , it works when use `2014.2.1008` version of kendoui, but doesn't work when use latest version(`2014.3.1316`) of kendoui. see: http://dojo.telerik.com/AXET/21

We cannot put the listview into a mobileview, because the page is split into several part and mobileview directive will destroy whole page, we have to put it into a scroller.
But we run into that bug.

So, can someone give me some advice?
Many thanks.

Petyo
Telerik team
 answered on 27 Jan 2015
4 answers
2.8K+ views
Hi!

I'm using this code to open a window:

var ssButton = $("#server-settings-button")
    .bind("click", function () {
          ssWindow.data("kendoWindow").open().center();
    });

Window is opened centered, but if I move it, pin it, close it and try to open it again it opens centered and doesn't maintain pinned position.

How can  open it centered but still maintain pinned position?
Dimo
Telerik team
 answered on 27 Jan 2015
1 answer
1.5K+ views
Hello -

This is an offshoot of: http://www.telerik.com/forums/problem-with-datasource-post-request-for-read-operation

Unfortunately, that thread is closed so I can't follow-up.

However, it seems to me that there's a potential bug with DataSource (used inside a Kendo Grid) when doing a READ using POST and contentType = "application/json".

Here is my javascript:
dataSource: {
   transport: {
      read: {
           url: "rest/books",
           type: "POST",
           contentType: "application/json; charset=utf-8"
      }
...

However, based on examining the network traffic, here's the POST request information:
Remote Address:[::1]:8082
Request URL:rest/books
Request Method:POST
Status Code:400 Bad Request
Request Headersview source
Accept:*/*
Accept-Encoding:gzip, deflate
Accept-Language:en-US,en;q=0.8
Cache-Control:no-cache
Connection:keep-alive
Content-Length:31
Content-Type:application/json; charset=UTF-8
Host:localhost:8082
Origin:http://localhost:8081
Pragma:no-cache
Referer:http://localhost:8081/
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.91 Safari/537.36
Request Payload
take=5&skip=0&page=1&pageSize=5

You can see in that very last line, the paging parameters for the Grid are being sent as key/value pairs (URL param encoding) instead of JSON.

I would think that since I'm setting contentType to JSON, and using a POST, that internally the DataSource would JSON encode my paging parameters.

The workaround (based on info in the link above) is to override the parameterMap function:
parameterMap: function (options) {
    return JSON.stringify(options);
}

This creates JSON in the Request Payload:
{"take":5,"skip":0,"page":1,"pageSize":5}

But it seems to me I shouldn't need to override parameterMap if I'm telling the datasource to use application/json.

My only guess is that Kendo is just passing the contentType to the internal AJAX call to set the POST header and not actually doing anything with that information (like converting the URL/form encoded parameters to JSON).
Rosen
Telerik team
 answered on 27 Jan 2015
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?