Telerik Forums
Kendo UI for jQuery Forum
4 answers
820 views
I have a page that loads an ajax request into a mobilelistview. Everything works fine except the loadmore button appears no matter if there is more data or not. Here's my code:

$(document).ready(function () {
 
        $("#memberList").kendoMobileListView({
            dataSource: new kendo.data.DataSource({
                pageSize: 10,
                serverPaging: true,
                schema: {
                    data: "Data",
                    total: "Total",
                    model: {
                        fields: {
                            CustomerID: { type: "string" },
                            EmailAddress: { type: "string" },
                            FirstName: { type: "string" },
                            LastName: { type: "string" },
                            MemberID: { type: "string" },
                            MemberTypeName: { type: "string" },
                            PlayerTypeName: { type: "string" }
                        }
                    }
                },
                transport: {
                    read: {
                        url: "@Url.Action("MemberListRead", "Club")",
                        type: "POST",
                        data: {
                            firstName: $('input[name="FirstName"]').val(),
                            lastName: $('input[name="LastName"]').val()
                        }
                    }
                }
            }),
            template: kendo.template($("#memberTemplate").html()),
            loadMore: true
        });
    });
I have confirmed total and pageSize return the correct information but even if total is 0 the load more button appears. Is this a kendo bug or have I done something screwy with the code?
Kiril Nikolov
Telerik team
 answered on 21 Jun 2013
4 answers
146 views
We have created a very simply HTML file to demonstrate a problem with the KendoUI Window affecting iPad and Android browsers only.
When run on PC Browsers such as Firefox, Chrome, Safari and IE10, the sample will automatically resize the internal table to fit inside the popup window.
On iPad and Android devices however this (Style="Height:100%") does not work as the sampe demonstrates in as few lines as possible.
Could you kindly please recommend a fix for this?

Regards, Garry.
Tom
Top achievements
Rank 1
 answered on 21 Jun 2013
1 answer
245 views
Is there a way to get the row number for the row on which the select button was clicked, i think we should be able to get it from event arguments. I tried looking through the object inspector in visual studio for the javascript event object "e" for the row number but was unable to find it. We are currently using kendo UI, asp.net mvc 4.0 and kendo MVVM. Please advise, the vent is getting fired but i cannot get the row number

//column definition for button
{ "command":{"text" : "Details",  "name":"selectClicked", click:inactiveDistrictVM.selectClicked } },

//the event delaraion
editDistricts: function (e) {
            debugger;
            var elem = this.get("districtsSource").at(0);//we need to replace the 0 with row number 
}
Vladimir Iliev
Telerik team
 answered on 21 Jun 2013
1 answer
89 views
Hi,
I am trying to use a treeview in a layout page.
I am going to load the tv from a database call (LINQ).
Since there is no controller for the layout page, how to correctly get the data to the tv?
I would hate to have to put code in every controller just to load this tv.
There must be a recommended way to do this.
Can some kind soul point me in the right direction?
Thanks ... Ed

Petur Subev
Telerik team
 answered on 21 Jun 2013
1 answer
139 views
Hi,
I've a menu like this (bugged forum, cannot paste the code, I've attached it)

All works fine if I keep commented the second HtmlAttributes (used to set the tooltip through title), if I uncomment that line, the menu show the tooltip but, uses jquery default style (and not kendo theme) and lost item css class 'menuitem'
Aldo
Top achievements
Rank 2
 answered on 21 Jun 2013
3 answers
296 views
Hi Guys,
  I noticed a quirk when testing some code that prevents navigation in before show, as indicated here ... http://docs.kendoui.com/api/mobile/view#events-beforeShow

If I use this technique the tabstrip changes the active tab to the view that was prevented from being displayed, I have a jsfiddle here that demonstrates the issue.  Notice that if you are on view 1, or the view 1 child and you select view 2 (the one that is supposed to be prevented), the navigation is prevented but the tab strip is active on view 2.  I would expect the tabstrip to keep the same tab active as a result of the e.preventDefault call, but perhaps this is deliberate behavior.

  I have a work around for the issue (I just alter the content on view 2 instead of stopping them from navigating to it which is fine for my purposes), so I don't need a fix in a rush I just thought I would bring it to your attention in case you weren't aware.
  -David
Petyo
Telerik team
 answered on 21 Jun 2013
3 answers
357 views
Being new to JavaScript and Kendo I apologise if this is an improper use;

I want to put up a model message; for example if a user deletes something I want to put up an 'Are You Sure' message over the top of the login view. This is a trivial exercise in .Net programming but, as I said, I am new to JavaScript and Kendo. 

Looking through the Mobile Widgets the PopOver seems like a good way of doing of displaying a view over the top of another.
The demonstration shows how to display a PopOver in response to a button click but I cannot find any way of displaying it from a function.
  • Is this possible?
  • Keeping in mind this is a mobile; is there a better way to display?

Thanks for any pointers

Alan

Alan
Top achievements
Rank 2
 answered on 21 Jun 2013
5 answers
918 views
Hi,

I am trying to use grid's column resizing feature, but when I resize the last column in the grid it leaves white space. Please see the attachment to see the issue.

Thank you,

Poonam
Vladimir Iliev
Telerik team
 answered on 21 Jun 2013
1 answer
2.1K+ views
Hi,

I am trying to programmatically select a row in a Grid depending on some dataItem value. My current approach is to loop through the rows in the DataBound event handler. So far I can find the row, but when I try to select it by using addClass("k-state-selectable") I get a "Object doesn't support this method or property" error.
Here is my code:

function gServices_DataBound(e) {
try {
var servicesGrid = $("#gServices").data("kendoGrid");
if (servicesGrid) {
var selServiceName = '@ViewData["SelServiceName"]';
if (selServiceName) {
// loop thorugh grid rows and select the service with that name
$("#gServices tr").each(function () {
var di = servicesGrid.data(this);
if (di.Name == selServiceName) {
// found the dataItem
// => select it
$(this).addClass("k-state-selected");
}
});
}
}
}
catch (ex) {
alert('gServices_DataBound: Exception: ' + ex.message);
}
}

Any ideas how I can loop through the set of rows and select the one I want programmatically?

Regards
Sven
Nikolay Rusev
Telerik team
 answered on 21 Jun 2013
1 answer
566 views
Do you have any examples of having a upload control in each row of a grid used in the following way:

@(Html.Kendo().Grid<RepairModel>()
.Name("RepairGrid_#=Id#")
.ToolBar(toolBar => toolBar.Create())
.Columns(columns =>
{
columns.ForeignKey(e => e.Type, (System.Collections.IEnumerable)ViewData["RepairTypes"], "Id", "Name")
.Title("Type");
columns.Bound(r => r.Cost);
columns.Bound(r => r.RepairDate);
columns.Bound(r => r.Description);
columns.Bound(r => r.Mileage);
columns.Bound(r => r.RepairLocation);
columns.Command(commands =>
{
commands.Edit().Text("Edit");
commands.Destroy().Text("Delete");
}).Title("Actions");
})
.DataSource(dataSource => dataSource
.Ajax()
.Events(events => events.Error("grid_error"))
.ServerOperation(false)
.PageSize(100)
.Read(read => read.Action("GetRepairs", "Equipment", new { equipmentId = "#=Id#" }))
.Create(create => create.Action("CreateRepair", "Equipment", new { equipmentId = "#=Id#" }))
.Update("UpdateRepair", "Equipment")
.Destroy("DestroyRepair", "Equipment")
//.Group(g => g.Add(gi => gi.Type))
.Sort(g =>
{
g.Add(gi => gi.Type);
g.Add(gi => gi.RepairDate);
})
.Model(model =>
{
model.Id(m => m.Equipment);
model.Field(m => m.Id).DefaultValue(new Guid());
model.Field(m => m.Equipment).DefaultValue(new Guid());
model.Field(m => m.Type).Editable(true).DefaultValue(((List<RepairTypeModel>)ViewData["RepairTypes"]).Any() ? ((List<RepairTypeModel>)ViewData["RepairTypes"])[0].Id : Guid.Empty);
})
)
.Pageable()
.Sortable()
.Groupable()
.ToClientTemplate())

Thanks,

Billy Jacobs
Petur Subev
Telerik team
 answered on 20 Jun 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
MultiColumnComboBox
Chat
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Effects
Accessibility
PivotGridV2
ScrollView
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Breadcrumb
Collapsible
Localization
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
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?