Telerik Forums
Kendo UI for jQuery Forum
3 answers
477 views
I have Data Source is set up to read JSON from my server for a Grid with scrollable.virtual = true.

The problem I've noticed is that the getByUid Data Source method returns undefined if the data item being requested has scrolled off the grid. For example, my Data Source transport is configured to retrieve 100 rows. The grid load, I get rows 1-100 back. The scrollbar of the grid is dragged down to row ~700. A number of requests are skipped, a request is made to the server for page 7. 

Now if I call getByUid with a UID for a data item that I know was in the first 100 items, the Data Source returns undefined. But when I inspect the Data Source I can still see that the data item is in one of the Range collections. If I get getByUid with a UID that is currently 'visible', I do get the data item back. I would expect that the Data Source would return the object regardless of whether is is currently in view or not. Is this a bug? 

Kenny

Rosen
Telerik team
 answered on 29 Apr 2013
3 answers
125 views
Hi all,

I have a Kendo Combobox that contains a lot of records (1600+). It works reasonable well in all browsers. Except in IE7. That browser takes about 30 seconds to bind and also about 30 seconds to create the drop down. The same is true for iPad to a lesser extend (20 sec). It seems it does some inefficient DOM manipulation. Is there any way to prevent this situation?

Here's some example code:

@Html.LabelFor(m => m.DepartmentId)
@(Html.Kendo().ComboBoxFor(m => m.DepartmentId)
    .Placeholder(Main.PleaseSelect)
    .Filter(FilterType.Contains)
    .DataTextField("text")
    .DataValueField("value")
    .AutoBind(true)
    .DataSource(d => d
        .Read(a => a.Url(this.Url.Action("ReadDepartments")).Type(HttpVerbs.Post))
        .Events(e => e.Error("pw.error.throwJqueryAjax").RequestStart("competenceGeneralEnterCatch"))
    )
    .SelectedIndex(0)
)
@Html.ValidationMessageFor(m => m.DepartmentId)
Georgi Krustev
Telerik team
 answered on 29 Apr 2013
1 answer
70 views
Is it possible to have an option to include a distinct list of a columns data appear in the column filter as in the silverlight grid example. Is this feature is implemented on latest kendo grid? If it is possible please provide a sample.

Thanks,
Raj Yennam
Atanas Korchev
Telerik team
 answered on 29 Apr 2013
12 answers
3.8K+ views
Hello again,
I would like to disable all the functionalities such as paging and buttons/anchors that play the role for CRUD operations.
When i click edit,i want everything on grid to be desabled,because beneath will be a editing for,and only if he press save or cancel,re-enable the grid and its functionalities.
How can i achieve this?

Regards,
Daniel
Daniel
Top achievements
Rank 1
 answered on 29 Apr 2013
1 answer
118 views

Steps To produce:-
1.      
I have Kendo grid which has two date columns
date1 and date2.

2.      
Select any date in first column(Date1) filter date
picker and close it.

3.      
Go to second date column (date2) and click on date
picker filter.

4.      
You will see same date selected for column
date2.



Question :- How
I ignore previous selection in grid filter datepicker.

Alexander Valchev
Telerik team
 answered on 29 Apr 2013
1 answer
105 views
I have a listView that has endlessScroll enabled: 

$('#MyListView').kendoMobileListView({
        dataSource: myRemoteDataSource,
        template: myTemplate,
        autoBind: false,
        endlessScroll: true,
        scrollTreshold: 30
    });

It is bound to a dataSource that gets its data from a remote source that has tens of thousands of records:

var myRemoteDataSource = new kendo.data.DataSource({
            pageSize: 10,
            serverPaging: true,
            transport: {
                read: {
                    url: 'http://myremotedata'
                },
                parameterMap: function (data, type) {
                    var startRow = ((data.page - 1) * data.pageSize) + 1;
 
                    return {
                        strow: startRow,
                        rpp: data.pageSize
                    };
                }
            },
            schema: {
                data: 'Data',
                total: 'Total'
            }
        });

This works fine when I start the listView from the *first* page because all the other pages come after it, so only endlessScrolling in the downward direction is necessary.  However, sometimes I need to start the listView on a specific page other than page 1:

myRemoteDataSource.query({ page: 45, pageSize: 10 });  // 45 is a random page.

Again, the data is displayed as expected in the listView and endlessScrolling in the downward direction works.  However, when I try to scroll up to see the records on the previous page (i.e. page 44), nothing happens.  Apparently, endlessScrolling only works in one direction (down), even though it seems it would be trivial for it to make a call to the dataSource to retrieve the previous page (up) just as it retrieves the next page (down).

In a nutshell, I need to be able to take a listView which is remotely bound to thousands of records and start from any page and endlessScroll in either direction.  This seems like it would be a pretty fundamental feature.  Is there a way to do this?

Thanks in advance.
Petyo
Telerik team
 answered on 29 Apr 2013
5 answers
100 views
I am using DataSource to consume data from a remote resource, like this:

DataSource.Products = new kendo.data.DataSource({
  transport: {
    read: {
      url: "https://wwww.",
      dataType: "json",
      type: "GET"
    }
  },
});

My response should be JSON like this:
{
    "status": {
        "http_code": 200
    },
    "contents": {
        "totalSize": 5,
        "done": true,
        "records": [
            {
                "attributes": {
                    "type": "",
                    "url": ""
                },
                "Name": ""
            },......
]

At minimum I would just like to print the response:
DataSource.Products.fetch(function(){
  var data = this.data();
  console.log(data);
});

But the output is not what I expect, in fact I can't see the underlying data.

Let's say for example I want to see the records array, can I do data.contents.records?

Atanas Korchev
Telerik team
 answered on 29 Apr 2013
8 answers
5.2K+ views
I am having some troubles passing value from a grid to a function that builds a kendo datasource.

My function asks for parm that is the selected rows first cell.

I have this so far
function createGrid(parm) {
           
          console.log("parm value = " + parm);
           
          var sharableDataSource = new kendo.data.DataSource({
              transport: {
                  read: {
                      url: "/GetInfo/",
                      data:{dataParm:parm}
                  },
                   
          schema:
          {
dataParm:parm

         }
          }});

Im using mvc3 as my server service however when I add a breakpoint to the controller the parameter is always null.
The console.log is returning the value I am expecting to see in the controller however the parameter isn't sent to the server.

What am I doing wrong?

Any tips would be appreciated! 
RamaKrishna P
Top achievements
Rank 1
 answered on 29 Apr 2013
2 answers
164 views
This is my first time using kendo window and I have run into a problem.
I want to use a namespaced function for the OnClose event as below.

@(Html.Kendo().Window()
    .Name("CreateProduct")
    .Title("Create Product")
    .Width(600)
    .Modal(true)
    .Events(ev => ev.Close("OnClose"))
    .Visible(false)
    .Content(@Html.Partial("CreationForm").ToString())
)

Right now you can see that I am just using the OnClose function, but I wanted to be able to write something like:

<script>
var CurrentPageNamespace = {};
CurrentPageNamespace.OnClose = function(){
    //Do Some Work Here
}
</script>

And then add it to the Window's on close:
@(Html.Kendo().Window()
    .Name("CreateProduct")
    .Title("Create Product")
    .Width(600)
    .Modal(true)
    .Events(ev => ev.Close("CurrentPageNamespace.OnClose"))
    .Visible(false)
    .Content(@Html.Partial("CreationForm").ToString())
)

I tested this with a simple alert, and if I removed the namespace from OnClose it would work, and with the namespace included nothing would happen.  Is it possible to use a namespace with Kendo UI Window events?

Thanks in advance.
Kim
Top achievements
Rank 1
 answered on 28 Apr 2013
2 answers
227 views
I am using the grid to show search results in a form. On submit I generate the search results and show in the grid. Currently the pagination doesn't work .

In the documentation it is mentioned that I have to create a read method like
public ActionResult Products_Read([DataSourceRequest]DataSourceRequest request)
{
var products = new NorthwindDataContext().Products;
DataSourceResult result = products.ToDataSourceResult(request);
return Json(result);
}


 It would be hard for me to generate the search list in Ajax read method. How can I use the previously generated list for ajax Read method ? 


@(Html.Kendo().Grid(Model.DocumentSearchList).Name("Grid")
              .Sortable()
              .Filterable()
              .Pageable()
              .Selectable(selectable => selectable.Mode(Model.Workflow == null ?
                       GridSelectionMode.Single :
                       (Model.Workflow.SelectionMode == SelectionMode.Single ? GridSelectionMode.Single : GridSelectionMode.Multiple)))
                      .Columns(col =>
                                   {
                                       col.Bound(model => model.DocumentTypeName).Title("Type");
                                       col.Bound(model => model.DocumentSubtypeName).Title("SubType");
                                       col.Bound(model => model.DocumentStatusName).Title("Status");
                                       col.Bound(model => model.ShortTitle).Title("Doc Title");
                                       col.Bound(model => model.JurisdictionName).Title("Jurisdiction");
                                       col.Bound(model => model.TopicsCount).Title("Topics");
                                       col.Bound(model => model.WorkOrdersCount).Title("Work Orders");
                                       col.Bound(model => model.WOSubmittedUserFullName).Title("Submitted By");
                                       col.Bound(model => model.WorkOrderSubmittedDate).Title("On").Format("{0:MM/dd/yyyy}");
                                       col.Bound(model => model.CreatedUserFullName).Title("Created By");
                                       col.Bound(model => model.CreatedDate).Title("On").Format("{0:MM/dd/yyyy}");
                                       col.Bound(model => model.UpdatedUserFullName).Title("Updated By");
                                       col.Bound(model => model.LastUpdatedDate).Title("On").Format("{0:MM/dd/yyyy}");
                                   })
                      .DataSource(dataSource => dataSource.Ajax()
                                                    .Model(model => model.Id(p => p.DocumentId))
                      )
                      .Events(e => e.Change("selection_change")))
Jagdish
Top achievements
Rank 1
 answered on 26 Apr 2013
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
Drag and Drop
Application
Map
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
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?