Telerik Forums
Kendo UI for jQuery Forum
2 answers
489 views
Hi!

I just do my first steps with KendoUI and came across a problem I see no sultion for:
I bind a dataSource to a grid. The dataSource is grouped by a field which is not used in the grid:


    var dsCountries = new kendo.data.DataSource({
    type: "json",
    transport: {
        read: {
            url: '@Url.Action("GetCountries", "Home")',
            dataType: "json",
            type: "POST"
    }},
    schema: {
        data: "data",
        total: "total",
        model: {
            id: 'CountryID',
            fields: {
                Country: { type: "string" },
                Currency: { type: "string" },
                Size: { type: "double" },
                Continent: { type: "string" }
    }}},
    group: {
        field: "Continent", aggregates: [
            { field: "Size", aggregate: "sum" }
        ]
    },
    aggregate: [ { field: "Size", aggregate: "sum" } ],
    sort: { field: "Country", dir: "asc" },
    pageSize: 100,
    serverPaging: true,
    serverFiltering: true,
    serverSorting: true
});
 
var detailGrid = $("<div id=\"grid\" />").kendoGrid({
    dataSource: dsCountries,
    groupable: false,
    sortable: false,
    pageable: false,
    scrollable: false,
    columns: [
        { field: "Country", width: 200, title: "Text" },
        { field: "Currency", width: 200, title: "Text" },
        {
            field: "Size", width: 70, title: "Size", format: "{0:n}", attributes: { "Class": "numbers" },
            groupFooterTemplate: "<div class=\"numbers\">#=kendo.toString(sum, 'n') #</div>",
            footerTemplate: "<div class=\"numbers\">#=kendo.toString(sum, 'n') #</div>"
    }
    ]
});
Everything's OK so far, but now I want to define a groupHeaderTemplate für the 'Continent'-Field; the way it is displayed now in the GroupHeader, which is something like [Fieldname]: [Fieldvalue]. Right now, only displaying [Fieldvalue] would be good enough, but the best solution would offer a complete template.
Can this be done (easily)?

Another thing quite similiar: When the (nondisplayed) grouping field is boolean ('true' and 'false' ist displayed): Is the a way to display alternate values like 
groupingboolean ? "Yes" : "No";
Thanks in advance
Christoph
Top achievements
Rank 1
 answered on 04 Mar 2013
1 answer
544 views
Hello KendoUI Gurus - 

I am using a datasource and an external API (Parse.com) to grab data and populate it into a Pull-to-Refresh list view. All works well, however I am filtering the data using Kendo's "FILTER" (meaning I retrieve ALL records from the cloud first, and then apply a filter - which isn't going to work as the table grows, or at best horrible inefficient) I need to filter the data at the query level - the ajax code below works fine 

Question:
Is there anywhere I can put this line of code in the Kendo datasource configuration to have this line of code run in the AJAX request. 
  data: 'where={"username":"someUser"}',

Below is a link to some documentation on their site, I understand that it's an external service and that you may not support it, but I would like to double check with you and hopefully you can advise me on how to achieve what I need to do

Thanks in advance,

Regards

Darren

Ajax Working Code:

$.ajax({
  type: 'GET',
  headers: {'X-Parse-Application-Id':'PARSE-APP-ID','X-Parse-REST-API-Key':'PARSE-REST-KEY'},
  url: "https://api.parse.com/1/Messages",
  data: 'where={"username":"someUser"}',
  contentType: "application/json"
});


Kendo UI DataSource:

var listingdataSource = new kendo.data.DataSource({
                serverPaging: true,
                pageSize: 10,
                filter: { field: "messageTo", operator: "eq", value: localStorage.ls_userid},
                 sort: { field: "createdAt", dir: "desc" },
                transport: {
                  data: 'where={"username":"someUser"}',    
                read: {
                type: 'GET',
                headers: {'X-Parse-Application-Id':'xxx','X-Parse-REST-API-Key':'xxx'},
                url: "https://api.parse.com/1/classes/Messages",            
                 

                dataType: "json" // JSONP (JSON with padding) is required for cross-domain AJAX
                    },
                
                },
                schema: { // describe the result format
                    data: "results", // the data which the data source will be bound to is in the "results" field
            
                }
            });
        

PARSE.COM REST API:
https://parse.com/docs/rest
Petur Subev
Telerik team
 answered on 04 Mar 2013
1 answer
175 views
When I load a page that uses a grid and autobind is set to true the page flashes an empty grid while it is loading data and then populates the data. I thought I'd avoid the 'flash' by manually creating / initializing a table with the first page of data and then initializing the grid with autobind set to false.

The problem is when I do that the page number is 0 and the 'x-y of z items' text shows zero items. I know that's because it doesn't know the page number or total number of items until the data source reads from the server...is there a way I can manually set the variables it needs when the page loads? I tried setting the 'page' property of the grid to 1 but that didn't seem to help.

Thanks,

Troy
Petur Subev
Telerik team
 answered on 04 Mar 2013
3 answers
80 views
Hi guys,
I'm trying to add some asp object at my kerio/jquery/html5 based site..

I have an issue when I try to insert a CreateUserWizard

<form runat="server">
....
 
    <asp:CreateUserWizard  runat="server">
      ......
     </asp:CreateUserWizard  runat="server">
.....
</form>
As soon as I try to implement this object I get an error from the browser where it says 
"Uncaught TypeError: Object [object Object] has no method 'kendoMenu'"
it seems that the browser doesn't find anymore the reference to kendo.all.js...
every ui api isn't working anymore.. (kendoMenu, kendoPanelBar etc) I don't know if this issue is strictly related to kendo, or if there's something in that asp control that messes with kendo js..
If you have any clue or suggestion would be really appreciated.
Thanks
Fabio

Petur Subev
Telerik team
 answered on 04 Mar 2013
1 answer
280 views
Hi,

is there any why to get KendoUI (DataViz) running with a SQLite-Database as Datasource. We want to get all datas for the charts from a sqlite-Db? Is this possible and how? Is there a working example?

Thanks a lot
best Regrads
Rene
Clay
Top achievements
Rank 1
 answered on 03 Mar 2013
3 answers
534 views
Following is the code i used, Once i select dropdownlist value in popup editing then [Object][Object] in the column of the grid

<script>
    var datavalue = [];
    datavalue.push({TypeValue: "---" });
    datavalue.push({ TypeValue: "New" });
    datavalue.push({ TypeValue: "Important" });
    datavalue.push({ TypeValue: "Remark" });
    datavalue.push({ TypeValue: "Complaint" });
          
    var dropDownDataSource = new kendo.data.DataSource({
        data: datavalue,
        schema: {
            model: {
                fields: {
                    TypeValue: { type: "string" }
                        }
                    }
                }
    });    
  </script>
  <script id="popup_editor" type="text/x-kendo-template">
<p>Custom editor template</p>

<div class="k-edit-label">
<label for="Date">Date</label>
</div>
<!-- datepicker editor for field: "Date" -->
<input type="text" 
name="Date" 
data-type="date" 
data-bind="value:BirthDate" 
data-role="datepicker" />

<div class="k-edit-label">
<label for="Type">Type</label>
</div>
<!-- drop down list editor for field: "Type" -->
<input name="TypeValue" 
data-bind="value:TypeValue" 
data-value-field="TypeValue" 
data-text-field="TypeValue" 
data-source="dropDownDataSource" 
data-role="dropdownlist" />

<div class="k-edit-label">
<label for="NoteBy" style="color: red;">NoteBy</label>
</div>
<!-- textbox editor for field: "NoteBy" -->
                  <input type="text" class="k-input k-textbox" name="NoteBy" data-bind="value:NoteBy"/>
                  
<div class="k-edit-label">
<label for="Description">Description</label>
</div>
                  <input type="text" class="k-input k-textbox" name="Description" data-bind="value:Description"/>

</script>


                <div id="NoteGrid" style="height: 380px"></div>


            <script>
    $(document).ready(function() {
      
   $("#NoteGrid").kendoGrid({ // create Grid from div HTML element Kendo
            dataSource: {
                data: [],
                    schema: {
                        model: {
                            fields: {
                                Date: { type: "date" },
                                Type: { type: "string"},
                                NoteBy: { type: "string" },
                                Description: { type: "string" }
                                    }
                                }
                            }
                        },
            selectable: "row",
            scrollable: true,
            navigatable: true,
            sortable: true,
            resizable: true,
            groupable: false,
            filterable: true,
            columnMenu: true,
            columns: [
            {
                field: "Date",
                title: "Date",
                width: 80
            },
            {
                field: "TypeValue",
                title: "Type",
                width: 60
            },
            {
                field: "NoteBy",
                title: "Note By",
                width: 80
            },
            {
                field: "Description",
                title: "Description",
                width: 100
            },
            {
                command: [
                { name: "edit",
                    text: { update: "Save" }
                }],
                hidden: true
            }
            ],
            toolbar: ["create"],
            edit: function (e) {
//                $("#editor").kendoEditor();
                e.container.data("kendoWindow").title("Add Note");
                e.container.find('.k-grid-update').css('float', 'right');
                e.container.find('.k-grid-cancel').css('display', 'none');
            },
            editable: {
                mode: "popup",
                template: kendo.template($("#popup_editor").html())
            },
            save: function (e) {
                var grid = $("#NoteGrid").data("kendoGrid");
                grid.refresh();  
            },
            detailInit: function (e) {
                var grid = $("#NoteGrid").data("kendoGrid");
                grid.element.find('tbody tr:first').addClass('k-state-selected')
            }
        });
    });

            </script>

Tony Sprague
Top achievements
Rank 1
 answered on 03 Mar 2013
1 answer
56 views
Hi all,

Has anyone used Kendo UI Mobile in conjunction with ASP.Net MVC4 to generate views and run web apps in Android Chrome and IPhone/IPad Safari browsers?

We are currently using it in this way and it is working well in almost every case.  We are using the mobile widgets as well and other than an issue with Actionsheet, they are working well for us.

We are generating Form based views to submit our updates and all of the data binding is done thru MVC http gets and posts.  Instead of using Local or Remote DataSources we just inject the MVC genned view into the Kendo UI mobile client.  Therefore, there is no need to issue client side jquery ajax service calls to get or update data.

Currently, we are not using any of the Kendo UI Web or Kendo UI Dataviz based client widgets or server wrappers.  We will likely use the Grid widget from Kendo UI Web soon as apparently it is supported on mobile devices.

We understand this will most likely not work with an Icenium based Kendo UI Mobile app, however, wanted to know if anyone has deployed a  Icenium & KendoUI Mobile based hybrid app using MVC generated views.

Thank you in advance to all of you in the forum community.  Does anyone think we should also post this on the StackOverflow forum?

Thanks...Bob Baldwin
Trabon Solutions
Devcraft Complete Licensed Users
Bob
Top achievements
Rank 1
 answered on 01 Mar 2013
5 answers
90 views
Can we do rapid application development like telerik for enterprise asp.net web application ?
James
Top achievements
Rank 1
 answered on 01 Mar 2013
1 answer
79 views
we can't get Id of DatePicker through JQuery, Event open can't be work, reason?
Iliana Dyankova
Telerik team
 answered on 01 Mar 2013
14 answers
478 views
Ok, so I want my top panel to be expanded, and not allow resizing, so ideally I'd like the "bar" between the panes to be 0px in width as really it serves no purpose anymore :)

...so how can I accomplish that?  It's something that the RadControls do...is it doable by pure CSS perhaps? 

Josh
Top achievements
Rank 1
 answered on 01 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?