Telerik Forums
Kendo UI for jQuery Forum
1 answer
71 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
246 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
202 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
254 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
214 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
107 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
1 answer
86 views
Hello,

I have attached two screens for understanding the issue.
And also attached Demo html folder which is downloaded from your site. I have edited html (examples\web\grid\index.html)
to minimize the number of columns shown in the grid.


Avijit Singh
Web Developer, Syncada from Visa
avijit.singh@usbank.com


Dimo
Telerik team
 answered on 26 Jul 2013
1 answer
444 views
Telerik/Kendo Users,

I have created a number of charts with filters based on an API and would like to know; is it possible to add a message to the graph if there is no data to display?
I do not believe that "DataBound" is useful as this would only cater for loading, not a lack of data.

Thanks,
Jamie
Iliana Dyankova
Telerik team
 answered on 26 Jul 2013
1 answer
89 views
I'm looking to set column widths via HTML, either by setting the style attribute or using data-width (or something similar). I wasn't able to find anything in the documentation about defining column widths via HTML.

Thanks
Dimo
Telerik team
 answered on 26 Jul 2013
1 answer
183 views
Good Morning,

I appear to be running into a 6 color limitation for series.  The following jsFiddle highlights the issue: http://jsfiddle.net/sakers85/hn6nZ/

As you can see the Size "X" has duplicate colors for Grade CUL and WXB.  The same is true for Size "150" which has duplicate colors for Grade PRO and WXF.

Is my only option to explicitly set the seriesColors property with more colors than needed?  This could be an issue as the datasource is remote and can change at any given time based upon the request.

Please advise on the best course of action.  Thanks,
Sean
Iliana Dyankova
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
Date/Time Pickers
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)
SPA
Filter
Drawing API
Drawer (Mobile)
Globalization
Gauges
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
OrgChart
TextBox
Effects
Accessibility
ScrollView
PivotGridV2
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Collapsible
Localization
MultiViewCalendar
Touch
Breadcrumb
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
Popover
DockManager
FloatingActionButton
TaskBoard
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
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?