Telerik Forums
Kendo UI for jQuery Forum
1 answer
162 views
Hi, 

I  am trying to create a Kendo Mobile ListView with infinite scrolling and a detail view.
When I select a list item the e.dataItem allows me to pass data to display on selected Item Detail view.
This works fine until the infinite scroll is triggered and loads in more list items...
The DataSource then appears to no longer contain the old items, and therefore e.dataItem is undefined.
I can't seem to find a method that works?

Thanks for your help,
David

// kendoMobileListView code snippet:
click: function(e){
     if ( e.dataItem != undefined )
     {
            console.log("selected: " + e.dataItem.id);
            viewModel = e.dataItem;
            // bind to detail view
            if ( viewModel  != null )
            {
                // extend view model
                viewModel.dateText = function(){ return kendo.toString(new Date(this.startDate),"ddd MMM yyyy h:mm tt"); }
                kendo.bind( $("#viewMyEventItemDetail"), viewModel );
                //app.navigate("#viewMyEventItemDetail");
            }
     }
}

PS. It would also be nice to have some examples/demos showing infinite scroller and a detail view?
Alexander Valchev
Telerik team
 answered on 11 Apr 2013
6 answers
380 views
   Hi, 
I was trying to open the following window on the button click using " $("#window").data("kendoWindow").open();" but the window opens with a extremely small  width and height i tried to specify height and width to window but to no vail. 
Have specified the following window inside a Form tag 
@(Html.Kendo().Window()
    .Name("window")
    .Title("PersonSearch")
                .Content(
                                          Html.Partial("_PersonSearch", new PersonSearchModel()).ToHtmlString()
                        )
    .Draggable()
    .Resizable()
    .Width(980)
            //.Height(350)
    .Visible(false)
    .Modal(true)
    .Events(ev => ev.Open("onOpen"))
)

_personsearch is the partial view that i load in the window it gets loaded properly
Markus
Top achievements
Rank 2
 answered on 11 Apr 2013
4 answers
463 views
I am new to kendo ui and mvvm, and I'm facing this issue:

I'm having a JSON file in the follow format:

    [
    {
    "Id":1,
    "img":"shoes.png"},
    {"Id":2,
    "img":"books.png"}
        }
    ]
I am reading the file using the sample mentioned online by you'll as follows:

    var crudServiceBaseUrl = "pro.json";
        var viewModel = kendo.observable({
                productsSource: new kendo.data.DataSource({
                    transport: {
                        read: {
                            url: crudServiceBaseUrl,
                            dataType: "json"
                        },
                        update: {
                            url: crudServiceBaseUrl,
                            dataType: "json"
                        },
                        destroy: {
                            url: crudServiceBaseUrl,
                            dataType: "json"
                        },
                        parameterMap: function(options, operation) {
                            if (operation !== "read" && options.models) {
                                return {
                                    models: kendo.stringify(options.models)
                                };
                            }
                            return options;
                        }
                    },
                    batch: true,
                    schema: {
                        model: {
                            id: "Id"
                        }
                    }
                })
            });

            kendo.bind($("#form-container"), viewModel);

I am able to bind the data from the data source to a Kendo Control such as a dropdownlist or some other Kendo Control. But when I try binding the data to an HTML Control (mostly an img tag). It stops working and gives an error saying "this.parent" is not a function.

following is the HTML which works:

    Select Product: <select data-role="dropdownlist" data-value-field="Id" data-text-field="img"
                             data-bind="source: productsSource"></select>

However binding to a normal `<img>` tag does not work. In short I need to bind images based on src value to a div using kendo ui mvvm.

Kindly help me out. Thanks!!

-
Hardik
Hardik
Top achievements
Rank 1
 answered on 11 Apr 2013
1 answer
198 views
Hello,

This is an example on how to use Kendo Splitter to build a Web Application Fluid Layout,

It is very simple... It just resize the panes based on the window and outer panes size...

Fluid Web App Layput - DEMO SPLITTER

Maybe Kendo DEVS want to optimize it and put this on Official Demo.

I hope this help you....
ATIYEH
Top achievements
Rank 1
 answered on 11 Apr 2013
1 answer
92 views
I want to use NumericTextBox to input student scores. Most of the time this is numbers. It's easier with tablets.

However we have some special codes that we have to treat.

Like "AB" for Absent, ou "EX", Exemption.  We convert these code to negative numbers, on input/output.

What do you think is the better way to deal with this kind of input with Kendo ? 

Thanks
Dimo
Telerik team
 answered on 11 Apr 2013
1 answer
461 views
This should be simple
My grid gets the data initially as expected but doesn't do anything when the update button is clicked while adding a new record.
@(Html.Kendo().Grid<DepartmentViewModel>()
      .Name("DepartmentsGrid")
      .ToolBar(t => t.Create().Text("New Department"))
      .Editable(editable => editable.Mode(GridEditMode.InLine))
      .Columns(columns =>
          {
              columns.Bound(d => d.Name);
              columns.Bound(d => d.Email);
              columns.Bound(d => d.Phone);
              columns.Command(c => c.Edit());
          }).Filterable().Groupable().Sortable().Pageable()
            .DataSource(datasource => datasource
                .Ajax()
                .Events(events => events.Error("error_handler"))
                .Create("CreateDepartment","Admin")
                .Update("UpdateDepartment","Admin")
                .Model(m=> m.Id(id => id.Id))
                .Read(read => read.Action("DepartmentsGridData", "Admin"))))
My server code is here.
public partial class AdminController
   {
       public ActionResult Departments()
       {
           return View();
       }
 
       public ActionResult DepartmentsGridData([DataSourceRequest] DataSourceRequest request)
       {
           var data = _departmentService.GetDepartments();
           var model = data.ToDataSourceResult(request);
           return Json(model);
       }
       [HttpPost]
       public ActionResult CreateDepartment([DataSourceRequest] DataSourceRequest request,Department department)
       {
           return null;
       }
       [HttpPost]
       public ActionResult UpdateDepartment([DataSourceRequest] DataSourceRequest request,Department department)
       {
           return null;
       }
   }
Any help would be greatly appreciated.
Nikolay Rusev
Telerik team
 answered on 11 Apr 2013
2 answers
392 views
Hello

I'm using KendoUI with ASP.NET. Setting the position of a KendoUI window element is relatively easy, but I'm finding it difficult to get position(top, left) dynamically.

Can it be done? If window is moved from its original position to other, can I somehow read the new coordinates. The information has to be somewhere because positions are know when a window is closed and opened again.

Cheers,
JoonasK
Joonas
Top achievements
Rank 1
 answered on 11 Apr 2013
2 answers
1.9K+ views
My solution requires us to add rows programatically. There is a complication in that the rows need to be added to a subgrid. Looks like it works but the data is now being saved. To test our problem, I have added a button which runs the function below on your grid-odata-crud example which I downloaded from github.

            function AddRow() {
                var productsGrid = $('#grid').data('kendoGrid');
                var dataSource = productsGrid.dataSource;
                dataSource.add({ ProductID: 10002, ProductName: 'A Johns Product 1', UnitPrice: 10.00, UnitsInStock: 5, Discontinued: false });
                dataSource.sync();
                console.log('Done');
            }

Should the above work. No rows are added to the database using this technique although I can add rows in the usual manner via the 'Add new record' button.

Hope you can help.
Sanket
Top achievements
Rank 1
 answered on 11 Apr 2013
8 answers
1.2K+ views
In a kendo grid is it possible to pick and choose which fields from the given model show in the popup form when popup edit mode is enabled (i.e. i have 10 properities in my model that is past to my grid and I only whish to show 5 specific ones)? How would I go about doing this if it is possible.
Almond
Top achievements
Rank 1
 answered on 11 Apr 2013
8 answers
107 views
I am porting an android/iOS kendoui mobile app to wp8. There is a very pronounced what screen that flashes on every navigation. I'm not doing anything special. Has this been reported by others? Is there a fix?
Kenneth
Top achievements
Rank 1
 answered on 11 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
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?