Telerik Forums
Kendo UI for jQuery Forum
1 answer
227 views
Is there a way to set the header template for a grouped listview in the HTML markup similar to the attempt below, which does not work for me?

<ul data-role="listview" data-style="inset" data-type="group" data-auto-bind="false" data-source="firmDataSource" data-template="firmTemplate" header-template="<h2>Letter ${value}</h2>">
</ul>

I have seen examples where the header template can be defined in javascript, but have not seen an example of doing it this way.








Richard
Top achievements
Rank 1
 answered on 26 Jul 2013
9 answers
370 views
There seems to be a pesky problem in this most recent release. It seems to have something to do with some icons on the toolbar collapsing/expanding.

I accept that I may be doing something wrong, or theres some other order I need to be putting the collapsing/expanding tools on the toolbar.

So i'd like some advice, is there a way around this issue?

for instance the unlink doesnt appear (it used to mind you) unless you already have inserted a link into the editor, in which case the tool bar grows.

Is there a way I can arbitrarily say "ok after this many icons, drop down to the next line"?

that way i'd just place all the collapsing ones (especially the createTable one) on a second line by itself


$("#editor").kendoEditor({
    tools: [
     "bold",
     "italic",
     "underline",
     "strikethrough",
            {
                name: "fontName",
                items: [].concat(kendo.ui.Editor.prototype.options.fontName[8], [{ text: "Arial", value: "Arial" }, { text: "Verdana", value: "Verdana" }]),
            },
            {
                name: "fontSize",
                items: [].concat(kendo.ui.Editor.prototype.options.fontSize[0], [{ text: "13px", value: "13px" }, { text: "15px", value: "15px" }])
            },
            "formatting",
            "foreColor",
            "backColor",
            "superscript",
            "subscript",
            "justifyLeft",
            "justifyCenter",
            "justifyRight",
            "justifyFull",
            "insertUnorderedList",
            "insertOrderedList",
            "indent",
            "outdent",
            "createLink",
            "unlink",
            "viewHtml",
            "createTable",
            "addRowAbove",
            "addRowBelow",
            "addColumnLeft",
            "addColumnRight",
            "deleteRow",
            "deleteColumn"]
});
Alex Gyoshev
Telerik team
 answered on 26 Jul 2013
3 answers
159 views
http://docs.kendoui.com/api/mobile/listview#configuration-template

I am using templates, as described in the above link. In the docs is says, "The ListView automatically wraps the template content in <li> tag. Putting a <li> tag inside the template creates invalid nesting of elements."

So how do I add a class or another attribute to the LI item?
Bart
Top achievements
Rank 1
 answered on 26 Jul 2013
0 answers
220 views

Hi,
I created a new Kendo UI for MVC application.
Dropped a KendoTreeview on my layout view.
All is well.
I add the following js code shown below to handle the select event.
When I select a node, I get the error shown in the attached screenshot.
I did some searching on the web, and it suggested that I had the wrong version of Jquery.
I am currently running Kendo 2013.2.716 and jquery 1.9.1. I tried 1.8.2 and 2.0 of jquery but still get the same result.
Any help would be appreciated.

<script type="text/javascript" >
 
    function _LayoutOnLoad()
    {
        $(function ()
        {
            var tv = $("#MainMenu").kendoTreeView(
                {
                    select: OnMainMenuSelect
 
                });
        });
 
 
    }
    function OnMainMenuSelect(e)
    {
        //alert("Selecting: " + this.text(e.node));
        alert("Selecting: " + e.node.contentText);
    }
    </script>
Randy Hompesch
Top achievements
Rank 1
 asked on 26 Jul 2013
1 answer
106 views
Greetings !

We have this grid displaying two "time" columns with corresponding TimePickers. The TimePickers shows up right in edit mode but the values initially loaded from the database aren't displayed... So when the grid appears, the two time columns are empty.

The jobs.php controller returns time values formatted as "HH:mm:ss" so strings comes looking like "17:15:00"... and the Grid must display them without the seconds. "HH:mm"

01.    $("#grid").kendoGrid({
02.        editable:true,
03.        culture:"fr-FR",
04.        dataSource: {
05.            transport: {
06.                read: {
07.                    url: "./jobs.php",
08.                    dataType:"json",
09.                    data:{f_id: f_id, action:"read"}
10.                },
11.                create: {
12.                    url: "./jobs.php",
13.                    dataType:"json",
14.                    data:{f_id: f_id, action:"create"}
15.                },
16.                update: {
17.                    url: "./jobs.php",
18.                    dataType:"json",
19.                    data:{f_id: f_id, action:"update"}
20.                },
21.                destroy: {
22.                    url: "./jobs.php",
23.                    dataType:"json",
24.                    data:{f_id: f_id, action:"destroy"}
25.                }
26.     
27.            },
28.            autoSync: true,
29.            error: function(e) {
30.                alert(e.responseText);
31.            },
32.            schema: {
33.                data: "data",
34.                model:{
35.                    id:"id",
36.                    fields: {  
37.                        id: { editable: false },
38.                        start: {type:"date"/*validation: { required: true}*/ },
39.                        end: { type:"date"/*validation: { required: true}*/ },
40.                    }
41.                }
42.            }
43.        },
44.        columns: [ 
45.                  { field: "start", title:"Start", format: "{0: HH:mm}", editor:  timeEditor},
46.                  { field: "end", title:"End"  , format: "{0: HH:mm}", editor:  timeEditor},
47.                  {
48.                      command: "destroy"
49.                  }]
50.    });
51. 
52.}
53.function timeEditor(container, options) {
54.    $('<input data-text-field="' + options.field + '" data-value-field="' + options.field + '" data-bind="value:' + options.field + '" data-format="' + options.format + '"/>')
55.            .appendTo(container)
56.            .kendoTimePicker({
57.                culture: "fr-FR",
58.                interval: "15",
59.                format: "HH:mm",
60.                min: new Date(2013, 6, 24, 0, 0, 0, 0),
61.                max: new Date(2013, 6, 24, 23, 59, 0, 0)
62.            });
63.}
Vladimir Iliev
Telerik team
 answered on 26 Jul 2013
1 answer
304 views
I have a mobile listview bound to kendoui datasource pointing to an odata service. I have a $expand hint in the datasource config to expand "Patient" property of "Claim" object, but looking the url of the odata query, the kendoui datasource is not generating the $expand code in the querystring. How can I get the kendoui datasource to generate correct $expand instruction on the querystring?

    OData query string genereated: http://localhost:1839/OData.svc/Claim?$callback=jQuery20207924230222124606_1374374358450&%24inlinecount=allpages&%24format=json&%24top=10

    <script>
        $(function () {
            var app = new kendo.mobile.Application(document.body, {
                transition: 'slide'
            });

            OData.defaultHttpClient.enableJsonpCallback = true;
            
            
            var data = new kendo.data.DataSource({
                type: "odata", // specifies data protocol
                pageSize: 10,  // limits result set
                transport: {
                    read: "http://localhost:1839/OData.svc/Claim",
                    dataType: "json",
                    data: {
                        $expand: "Patient"
                    }
                },
                schema: {
                    model: {id: "Id"},
                    data: function (data) {
                        return data.d.results;
                    },
                    total: function (data) {
                        return data.d.__count;

                    }
                },
                pageSize: 10,
                serverPaging: true,
                serverFiltering: true,
                serverSorting: true
            });

            $("#lst").kendoMobileListView(
            {
                template: "<strong>${data.ClaimNumber}</strong><br/>",
                filterable: {
                    field: "ClaimNumber",
                    operator: "contains"
                },
                dataSource: data
            });
        });
    </script>
Daniel
Telerik team
 answered on 26 Jul 2013
1 answer
241 views
Lets say i have different types 'A','B','C' in my app 

and I am trying to assign this below result of type 'A'

class A
{
  List<B>

  List<C>
}

to the tree view at any level. Can the tree view read all the list items of B and C from the object of type 'A'.

Something like this below:

+ B (parent tree view items)
     - child tree view items
+ C (parent tree view items)
    - child tree view items

Please help with any suggestions.








Petur Subev
Telerik team
 answered on 26 Jul 2013
4 answers
283 views
I have a grid and I am editing most of the fields inline. However I have
a field, the way I envision to modify this field is to open a popup
window when clicked ( this will be a hyperlink field in the grid). Once
the value is modified in the Popup the change will be saved in the
database and the same change should also reflect in the grid. The grid
should be refreshed once the popup is closed. Can you please suggest me
as to how to accomplish this. Also can you provide me samples as to how
to do this.
Thank you
Kavitha
Alexander Valchev
Telerik team
 answered on 26 Jul 2013
1 answer
257 views
My app has a large list of data (only 1 column) and I have to show them all (no paging). With a small amount of data it works fine but when I have all the data in (around 260 items, not that many) the grid disappears from the page. Debugging shows a 500 error on the server. 

I have done the following testing:
- I tried the page on Chrome, IE and Opera. All give the same result.
- I replaced the grid with a treeview. Same result - with around 150 entries it's fine, with 260 it disappears (although in the case of the treeview it doesn't disappear completely, it leaves a message that the request failed and a button to retry.

How I'm getting the data:

@(Html.Kendo().Grid<Song>()
                      .Name("SongsGrid")
                      .Columns(columns =>
                          {
                              columns.Bound(o => o.Name);
                          })
                      .DataSource(dataSource => dataSource.Ajax().Read(read => read.Action("SongList", "Song")))
                      .Selectable()
                      .Events(events => events.Change("songSelected"))
                      )

and

@(Html.Kendo().TreeView().Name("treeviewSongs")
            .HtmlAttributes(new {@class="demo-section" })
            .DataTextField("Name")
            .DataSource(dataSource => dataSource.Read(read => read.Action("SongListForTreeview", "Song")
        )

What are my options?

Thanks.
Dimo
Telerik team
 answered on 26 Jul 2013
1 answer
138 views
Hello all,

I have a grid that I list all the folder and the size of the folder, I have java script code that transform a size of the folder accordingly.  So a folder size can be 8 MB, 1 Gig, 400 KB, etc.  Obviously, this is a text field so we can give the user the correct information and the unit we measure the size of the folder.  Sorting does not work correctly since it is text. 

Is there a way to say for this column if you are going to sort this text column using the raw size field (or specify a specific column to use for sorting).  Meaning I have a second column in my model that has the raw size as int and I would like to use for sorting this way, 8 MB will come before 1 Gig folder.

Is there a way to do this?  if so can you provide a simple example please.
Vladimir Iliev
Telerik team
 answered on 26 Jul 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?