Telerik Forums
Kendo UI for jQuery Forum
1 answer
238 views
I apologize in advance if this is not the correct part of the forum to post this in.

We have a WCF service running on a server accessible from the internet (which we already use for other things).

Our current idea is to create a small mobile app using Kendo.  The app would call one of the WCF methods to fill in a "list" (e.g. a list of fruits, etc).

As I understand it, Kendo uses html5/css and javascript.  So I guess the question is are we able to do this using kendo?  Have a mobile app call a WCF method (assume for now it has internet access, we will add a check for that later on) and take the returned data to display on the app/page?

Thank you in advance for the information
Alexander Valchev
Telerik team
 answered on 24 Apr 2012
0 answers
287 views
<ul>
                    <li>Competitor:
                        <%-- <input id="titles" />--%>
                        <select id="CompProducts" class="km-text">
                        </select></li>
                    <li runat="server">Series:
                        <select id="iLevel" class="km-text">
                        </select>
                    </li>
                    <li runat="server">
                        <label for="depth">
                            Depth:</label>
                        <select id="depth">
                        </select>
                    </li>
                </ul>
 <script type="text/javascript">
        var Container = '';
        var returnVal = '';
        var myArray2 = new Array();
        var myArray = new Array();
        var myArray3 = new Array();

        function GetAllUserInfo() {
            var Surl = "LPService.asmx/ListCompetitorProducts";
            $.ajax({
                url: Surl,
                type: 'POST',           
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (result) {
                    returnVal = result.d;
                    Container = [{ text: "--Select--"}];
                    myArray.push(Container[0]);

                    for (i = 0; i <= returnVal.length - 1; ) {
                        Container = [{ text: "" + returnVal[i], value: "" + returnVal[i]}];
                        myArray.push(Container[0]);
                        i = i + 1;
                    }
                    Init();
                },
                error: function (XMLHttpRequest, textStatus, errorThrown) {
                    returnVal = '';
                    alert(textStatus);
                }
            });
        }
   
        function Init() {
            
           $("#CompProducts").kendoDropDownList({
                dataTextField: "text",
                dataValueField: "value",
                dataSource: myArray,
                change: onManfacturerChange
            });
        };
        var val = '';
        var id = '';

        function onManfacturerChange() {
            var va = this.value();           
            myArray2 = [];
            val = $("#CompProducts").val();           
            var dataString = "{'Manufacturer':'" + val + "'}";         
            var Surl = "LPService.asmx/ListCompetitorSeries";
            $.ajax({
                url: Surl,
                type: 'POST',
                data: dataString,
               contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (result) {
                    returnVal = result.d;
                    var arr = returnVal;                 
                    Container = [{ text: "--Select--"}];
                   myArray2.push(Container[0]);
                    for (i = 0; i <= arr.length - 1; i++) {
                        var Cont = [{ text: "" + arr[i], value: " " + arr[i]}];
                        myArray2.push(Cont[0]);                      
                    }
                    CompSeries();                 
                },
                error: function (XMLHttpRequest, textStatus, errorThrown) {
                    returnVal = '';
                    alert(textStatus);
                }
            });
   }
  
        function CompSeries() {  
             
           $("#iLevel").kendoDropDownList({
                    dataTextField: "text",
                    dataValueField: "value",
                    dataSource: myArray2,
                    change: onChangeCompSeries
                });
        };     

        var val = '';
        var id = '';
        function onChangeCompSeries() {           
            myArray2 = [];
            val = $("#iLevel").val();
            var dataString = "{'SeriesType':'" + val + "'}";      
            var Surl = "LPService.asmx/ListDepth";
            $.ajax({
                url: Surl,
                type: 'POST',
                data: dataString,
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (result) {
                    returnVal = result.d;
                    var arr = returnVal;               
                   Container = [{ text: "--Select--"}];
                    myArray2.push(Container[0]);
                    for (i = 0; i <= arr.length - 1; i++) {
                        var Cont = [{ text: "" + arr[i], value: " " + arr[i]}];
                        myArray2.push(Cont[0]);                     
                    }
                    Depth();
                },
                error: function (XMLHttpRequest, textStatus, errorThrown) {
                    returnVal = '';
                    alert(textStatus);
                }
            });
        }
   
        function Depth() {         
            $("#depth").kendoDropDownList({ 
                dataTextField: "text",
                dataValueField: "value",
                dataSource: myArray2,
                change: onChangedepth
            });
        };
        var val1 = '';
        var id1 = '';
        function onChangedepth() {
            myArray3 = [];
            val1 = $("#depth").val() + '"';        
            var dataString = "{'DepthType':'" + val1 + "'}";      
            var Surl = "LPService.asmx/Depth";
            $.ajax({
                url: Surl,
                type: 'POST',
                data: dataString,
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (result) {
                    returnVal = result.d;
                    var arr = returnVal;                
                    Container = [{ text: "--Select--"}];
                    myArray3.push(Container[0]);
                    for (i = 0; i <= arr.length - 1; i++) {
                        var Cont = [{ text: "" + arr[i], value: " " + arr[i]}];
                        myArray3.push(Cont[0]);                  
                    }
                    LpSeries();
                },
                error: function (XMLHttpRequest, textStatus, errorThrown) {
                    returnVal = '';
                    alert(textStatus);
                }
            });
        }  
        function LpSeries() {         
            $("#dropdown").kendoDropDownList({
                dataTextField: "text",
                dataValueField: "value",
                dataSource: myArray3
            });
        };
    </script>


Every time when i select first dropdown, the second dropdown will bound upon the selected value in 1st dropdown.It was okey when i select 1st time but if i changed the 1st dropdown value again then the 2nd one will disappear.How to resolve this?   
Tirumalesh
Top achievements
Rank 1
 asked on 24 Apr 2012
2 answers
137 views
The following pages have broken links on them.
http://www.kendoui.com/documentation/ui-widgets/menu/overview.aspx
http://demos.kendoui.com/web/menu/api.html

The link that is broken is "Menu API demos"

Sara
Georgi Krustev
Telerik team
 answered on 24 Apr 2012
0 answers
173 views
Hi!

I am trying to define an initial value for an ajax datasource populated dropdownlist in an editor definition function for a grid column.
I have tried setting it via the text() function after initialization but it seems to get "changed" to index 0 as soon as the datasource is bound to the widget..
I also tried using a callback for the select() function, setting a value() as well as using the text() method both right after the initialization (which seems to get overwritten upon loading the data) and inside a "change" even handler for the transport attribute of the datasource; none of which helped.. please advise!

here a snippet of code i used:

"editor":
    function(container, options) {
      $('<input id="' + options.field + '" />')
          .appendTo(container)
          .kendoDropDownList({
                dataTextField: 'text',
                dataValueField: 'value',
 
                dataSource: {
                    change: function(e) {
                        var item = null;
                        $('#'+options.field).data('kendoDropDownList').ul.children().each(function(idx, elem) {
                            if($(elem).html() == options.model.rel_type) item = $(elem);
                        });
                        console.log($(item).html());
// does not select anything even tho console.log() proves that it is the correct element
                        $('#'+options.field).data('kendoDropDownList').select($(item));
                    },
                    transport: {
                        read:  {
                            url: '/relationdata/relation/relType',
                            dataType: 'json'
                        }
                    }
 
                }
          });
    }}

the grid loads fine but nothing is selected in turn.
GungFooMon
Top achievements
Rank 1
 asked on 24 Apr 2012
3 answers
582 views

Hi, We are using the following code but not able to populate the Grid. Our Json is in the form of string . the json structure is something like this. "d : [{"ID":"1","Name":"Umesh"}]"

$(document).ready(

 

function () {

 

$(

 

"#customergriddiv").kendoGrid
({
height: 400,
pageable:
true,
scrollable:
false,
sortable:
true,
columns: [{ field:
"ID", title: "ID" }, { field: "Name", title: "Name"}],
datasource: {
transport: {
read: {
type:
"POST",
url:
"GetJson.asmx/GetCustomers",
contentType:
'application/json; charset=utf-8',
dataType:
"json"
}

 

},
schema: {
data:

 

"d"
}
, pageSize: 10
}
});
 });

<

 

 

div id="customergriddiv"></div>

 

Luis
Top achievements
Rank 1
 answered on 24 Apr 2012
2 answers
348 views
Hi, I've been through the forums fairly thoroughly, and through the docs. What I want is to create an item in a listview where the text will word wrap.  I've tried just about every css property I can think of.  What I'm trying to achieve is image1, and what I get is image2.  Any ideas?  

It doesn't have to be in ListView I guess, but it was the only way I could find to get the rounded box.
Samuel PIckard
Top achievements
Rank 1
 answered on 24 Apr 2012
5 answers
495 views
Hi Kendo Team,
I have several issues with the TabStrip control -
1. How to select a dynamically added tab?
2. How to prevent the tab load after selecting it?
3. How to remove a tab by clicking on a control on that tab?
4.  After dynamically opening a tab and selecting existing tabs randomly the tab contents get mixed up in other tabs.
5. even though a second grid is initialized after the 2nd tab is selected, the grid content spills over the tab area.

I have attached a sample(I ran the sample from ~\kendoui\examples\web\Sample) where all these scenario can be seen.
We need this prototype to work to decide if we can use the KendoUI in our main project.

Thanks in advance for you help.
krishna surapaneni
Top achievements
Rank 2
 answered on 24 Apr 2012
3 answers
258 views
Hello,

I may know what are all tooltip format??

Thx
Gergo
Top achievements
Rank 1
 answered on 24 Apr 2012
1 answer
110 views
using "pullToRefresh: true," on a listview element gives me "a.scroller is undefined" error.  If I comment out   "pullToRefresh: true," I do not get the error.  Can anyone see what Im doing wrong here?
<div data-role="view" data-title="Control Panel - Mobile" id="listtickets" data-init="listTicketsInit">
     <h2>Tickets</h2>
     <p><a data-align="left" data-role="button" href="/support/newticket/">New ticket</a></p
     <ul id="support_list" data-style="inset"
          
     </ul>
 </div>
      
 
<script id="support_list_template" type="text/x-kendo-template">
     <li style="font-weight:normal" >
         <div style="float:left; width:20% ">
             #= DateCreated #
         </div>
          <div style="float:left; width:80% ">
             <a href="/support/view/#= ThreadID #">#= Subject #</a>
         </div>
      </li>  
</script>
 
<script>
  function listTicketsInit() {
     
       
      var ticketdata = <?=json_encode($tickets)?>;
        
       var dataSource = new kendo.data.DataSource({
           data: ticketdata,
           dataType: "json",
           schema: {
             model: {
                 id: "ThreadID",
                 fields: {
                     DateCreated: "DateCreated",
                     ThreadID: "ThreadID",
                     Subject: "Subject"
                    }
                }
            
        });
 
       $("#support_list").kendoMobileListView({
           dataSource: dataSource,
           pullToRefresh: true,
           appendOnRefresh: true,
           template: $("#support_list_template").text()
       });
Many thanks
Petyo
Telerik team
 answered on 24 Apr 2012
2 answers
428 views

Hi

When the grid is grouped, the grouping column is visible with the same 
values in each cell of each group. Looks weird and confusing.

How can we accomplish more efficient look and hide the grouping column? 

See attached pic and here: http://demos.devexpress.com/aspxgridviewdemos/GroupingSorting/Grouping.aspx 

2nd question:
Is it possible to customize the group header cell? 
Instead of default template "{ColumnName}: {GroupName}"
I need something like "{ColumnName}: <b>{GroupName}</b> â€“ <span class="groupRowCount">({Count} my text)</span>"

Thanks!

Vadim
Top achievements
Rank 1
 answered on 24 Apr 2012
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
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?