Telerik Forums
Kendo UI for jQuery Forum
8 answers
418 views
I've finally managed to get a datasource working, and bound to a grid. However, whatever I try, I cannot get paging to work, it always displays the complete dataset.

The code is:-
<table id="Table1" style="height: 450px">
                <thead>
                    <tr>
                        <th data-field="surName">Surname</th>
                        <th data-field="foreName">Forename</th>
                        <th data-field="dOB">DoB</th>
 
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>Smith</td><td>John</td><td>21/5/2001</td>
                    </tr>
</tbody>
</table>
 
<script type="text/javascript">
 
    var s = new GetPats();
 
    var result = s.getpatlist('Benz');
 
    //Data source
 
    var localDataSource = new kendo.data.DataSource({ data: result, pagesize: 10, page:1 });
 
    $("#Table1").kendoGrid({
 
        columns: [{ field: "surName", title: "Surname" }, { field: "foreName", title: "Forename" }, { field: "dOB", title: "Date of Birth", template: '#= kendo.toString(dOB,"dd MMMM yyyy") #'}],         
 
        dataSource: localDataSource,
        groupable: true,
        scrollable: false,
        sortable: true,
        pageable: true,
        height: 450,
        selectable: true
    });
 
</script>

Whilst the data is fetched from a remote source, as far as the kendo datasource is concerned, it's using a locally held array. Sorting and group work well, but no matter waht I try, paging doesn't work, and the date re-formatting also doesn't work.

Thanks
Jean-Yves Vinet
Top achievements
Rank 1
 answered on 24 Mar 2013
3 answers
319 views
Hello all,

To jump right in, is there a way to have a listview within a listview?

The use of this is something like this:

<ul data-role="listview" data-style="inset" data-type="group">
    <li>
        <ul>
            <li>Bob Jones</li>
        </ul>
    </li>
     
    <li> Assets
        <ul data-role=listview">
            <li>Lawn Mower</li>
            <li>Leaf Blower</li>
            <li>Hedge Clippers</li>
        </ul>
    </li>
</ul>

The Asset listview is populated dynamically (and could have any number of asset items), while the outter listview is static. This is just an example. In my case, I have multiple lists like the asset list that are also populated dynamically.

I have a hackish way to get it to work using one big template for the main listview, and inside it, I populate the inner lists something like this:

# for (var i = 0; i < assetList.length; i++) { #
<li>#= assetList[i] #</li>
# } #

It works, but as mentioned, it is hackish, and I figure Kendo has a way to do it. A google search for "listview in listview" yields next to nothing suprisingly.

I know there's the ObservableObject, ObservableArray, HeirarchalDataSource, and DataSource. To be honest, I've read the documentation for them, but there aren't any complex, or "real world" examples that shown advanced use of the components, so it kind of leaves you to have to try a lot of experimentation (and a LOT of guessing) in order to use it to it's full potential.
NirKo
Top achievements
Rank 1
 answered on 23 Mar 2013
6 answers
980 views
I have a field in a grid which contains HTML marked-up content. I want this content to be shown in the tooltip for the column, but the HTML markup is shown. Is there a way of providing HTML markup content for a tooltip?

I'm setting the title attribute on the field as follows (simplified example):
  { width: 40, field: "Description", title: "Description", attributes: { title: 'x<b>yy</b>zz' } },

The tags in my title attribute here get shown in the tooltip rather than being interpreted as markup. Is there a way to tell it to render the content as HTML?
Craig
Top achievements
Rank 1
 answered on 22 Mar 2013
2 answers
102 views
Simple grid using version 2012.2.831 in MVC 4:

        @(Html.Kendo().Grid<SurveyTracker.Models.TimelineGrid>()
            .Name("TimelineGrid")
            .Columns(columns =>
                {
                    columns.Bound(p => p.BeginDate).Format("{0:MM/dd/yyyy}").EditorTemplateName("Date");
                    columns.Bound(p => p.EndDate).Format("{0:MM/dd/yyyy}").EditorTemplateName("Date");
                })
            .DataSource(source => source
                .Ajax()
                .ServerOperation(false)
                .Model(model => model.Id(x => x.Id))
                .Read(x => x.Action("GetTimelines", "Home").Data("filterTimelines"))
                )
            .Pageable()
            .Selectable(x => x.Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
            .Navigatable()
            .Events(x => x.Change("selectTimeline"))
            )

Three issues:
1) The grid is not selectable unless it has the .Navigatable() option specified.  The demo doesn't mention that.
2) Biggest issue: Selecting a row doesn't fire the change event.
3) It selects the cell instead of the row.

Any ideas on why this is happening?  It's pretty close to the demo code under Grid/Events for MVC.
James
Top achievements
Rank 1
 answered on 22 Mar 2013
5 answers
99 views
how can i use kendo dropdownlist or other widgets in a grid cell in edit mode ?
Iliana Dyankova
Telerik team
 answered on 22 Mar 2013
4 answers
621 views
Hi

In my rest resource, dates come over as numbers; time in milliseconds.  I'd like to take these numbers and convert them to dates.  I do this in other places using moment (my app uses moment + requirejs + backbonejs)

var m = moment(new Number(value)).format(this.dateTimeFormat);

where the format is here: dateTimeFormat : 'MMM D, YYYY [at] h:mm a',

However, anytime I do this I get an error referring to no such function toLowerCase exists.

Any ideas?
Alexander Valchev
Telerik team
 answered on 22 Mar 2013
1 answer
99 views
Hello,

Is the Windows Surface now fully supported in Q1 2013 release of Kendo UI Mobile?

I understand that Windows 8 Phone is supported but does that cover the Surface as well?

Thanks...Bob Baldwin
Trabon Solutions
Dimo
Telerik team
 answered on 22 Mar 2013
2 answers
213 views
Hi all,

I am wondering is there any method to remove all record from dataSource ? and then sync(), so that it'll clear all record from DB .

Have scenario like i want to delete 500 records then add 20 - 30 records. I can do it with loop it causing delay. 

Please help me out

Thanks in Advance
Brett
Top achievements
Rank 2
 answered on 22 Mar 2013
1 answer
112 views
What is currently the recommended/supported method for getting data from a SharePoint 2010 list so as to place the items in a Kendo DataSource for display in a Kendo UI GridView?
Alexander Valchev
Telerik team
 answered on 22 Mar 2013
2 answers
1.0K+ views
I can't seem to find documentation that will help me to sort this out. I'm trying to populate a DropDownList with the wrapper:

@(Html.Kendo().DropDownList()
          .Name("DropDownListRoles")
          .DataTextField("RoleName")
          .DataValueField("Id")
          .DataSource(datasource => datasource
                                .Read(read => read.Action("GetRoles", "User"))
                                .ServerFiltering(true)
                            )
          .SelectedIndex(0)
         )

The ActionResult method seems straight-forward enough:

public ActionResult GetRoles()
        {
            var roles = UserService.GetRoles();
            return Json(roles.Select(role => new SelectListItem() { Text = role.RoleName, Value = role.Id.ToString() }), JsonRequestBehavior.AllowGet);
        }

The roles are retrieved from the data store, and the JSON seems to be getting sent back to the client, but the values show as "undefined" from the dropdownlist.

If I change ActionResult to JsonResult, I get the same result.

If you could give me some hints as to where my mistake is, I'd be grateful.

Thanks much, and regards...

-Zack
Zack
Top achievements
Rank 1
 answered on 22 Mar 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?