Telerik Forums
Kendo UI for jQuery Forum
0 answers
147 views
I was looking for a way to select multiple items in a dropdown. But I don't see it.

Actually, I might be looking for a tree or panelBar implementation. The idea is that one can open the header and  there are
a list of checkboxes where the user can select or deselect different items.

[Expando Heading: Choose image types]
X PNG
- JPG
- TIFF
X BMP

etc.
Dr.YSG
Top achievements
Rank 2
 asked on 18 Apr 2012
1 answer
296 views
I would like to give the user the ability to change the theme on the fly (like your demos). Do you have a stripped down example of how to do this? (A dropdown menu that would change the style sheet ?)

Dimo
Telerik team
 answered on 18 Apr 2012
1 answer
216 views
When is javascript within a template executed? Is it rendered every time the data binding occurs or is it only once? 

Example - 
<script id="demoTemplate" type="text/x-kendo-template">
#if(person) {
   <h1>${person.name}</h1>
}
else {
   <h1>${id}</h1>
}#
</script>
    <script>
var data = [{"person":{"name":"saurabh"},"id":123},{"id":123}]

        window.kendoMobileApplication = new kendo.mobile.Application(document.body);
        $(document).ready(function () {
$("#listUL").kendoMobileListView({
                template: $("#demoTemplate").text(),
                dataSource: data
            });
}
</script>

So I want to show ID field when person object is missing in the JSON data. I get following error when I run it - "person variable is missing"

How do I handle missing variables in templates? How can I check for them?
Saurabh
Top achievements
Rank 1
 answered on 18 Apr 2012
1 answer
252 views
One of my UX fellows is complaining that the expand/collapse icons on PanelBar are the opposite of those for TreeView. Meaning that TreeView shows the expanded state while PanelBar shows the future state. Anyone else think is a problem?

-Gary
Terracotta
Dimo
Telerik team
 answered on 18 Apr 2012
0 answers
100 views
Okay, this is a slightly complicated scenario, but will be common in my team's project. Basically, I want to use MVVM and the new declarative style to set up a plugin that wraps around DropDownList. Internally, the plugin uses a DataSource to populate the DropDownList with all its available options. The plugin will be used inside pages and other plugins which will also use MVVM to set its default value using another DataSource

Now my question is, is it even possible to do this in the new declarative style? If so, then how? In particular, how do I make it so that my plugin can hookup to the outer MVVM's settings for its value?

Any help would be greatly appreciated. 
Joshua
Top achievements
Rank 1
 asked on 18 Apr 2012
1 answer
299 views
Hi,
I am dynamically building a ul and then applying a kendoTreeView() on it everything is working prefectly fine but I am struggling to sore the tree as there is no method provided and I can't apply any logic as i am building very complicated ul.
My code as below:
function BuildTree() {
    $(xmlDoc.getElementsByTagName("Item")).each(function () {
 
        var thisItem = $(this);
        var list = " "; var list1 = " ";
        $(parentIDFields).each(function (index, item) {
 
            if (thisItem.attr(item) != null && thisItem.attr(descriptionCol) != null) {
                if (index == 0) {
                    list += "<li id=" + thisItem.attr("ID") + " onclick=sendHTML(" + thisItem.attr("ID") + ");>" + thisItem.attr(item);
                    list1 += "</li>";
                }
                else {
                    list += "<ul><li id=" + thisItem.attr("ID") + " onclick=sendHTML(" + thisItem.attr("ID") + ");>" + thisItem.attr(item);
                    list1 += "</li></ul>";
                }
            }
        });       
        $("#treeView").append(list + "<ul><li id=" + thisItem.attr("ID") + ">" + thisItem.attr(descriptionCol) + " </li></ul>" + list1);
    });
 
    $(document).ready(function () {
        $("#treeView").kendoTreeView();
    });
 
}

can you please show any pointers towards solution.
Alex Gyoshev
Telerik team
 answered on 18 Apr 2012
0 answers
124 views
Canceled.
DMC Helpdesk
Top achievements
Rank 1
 asked on 18 Apr 2012
1 answer
340 views
I want to bind the combo box to a remote rest service which takes a partial name as query string parameter. Following is the code I have.

$("#combobox").kendoComboBox({
                dataTextField: "Description",
                dataValueField: "Code",
                filter: "contains",
                minLength: 3,
                autoBind: false,
                dataSource: {
                    type: "json",
                    serverFiltering: true,
                    transport: {
                        read: {
                            url: serviceUrl + "HpCodes",
                            contentType: "application/json; charset=utf-8",
                            dataType: "json",
                            data: {
                                partialName:
                                    function () {
                                    return $("#combobox").val();
                                }
                            }
                        }
                    }
                }
            });

So I was hoping when uses types in 3 chars it would emit a call to the service as <serviceUrl>/HpCodes?partialName=tes
but it doesn't seem to be doing that instead it sends the following request 
GET <serviceUrl>/HpCodes?partialName=&filter%5Blogic%5D=and&filter%5Bfilters%5D%5B0%5D%5Bfield%5D=Description&filter%5Bfilters%5D%5B0%5D%5Boperator%5D=contains&filter%5Bfilters%5D%5B0%5D%5Bvalue%5D=tes HTTP/1.1
This looks like a oData query annd in my wcf service the partialName is empty string.

Another thing I noticed was that even though I set the minLength to 3 if I click the drop down button with out entering anything the the input area it still calls the service.
Georgi Krustev
Telerik team
 answered on 18 Apr 2012
0 answers
155 views
Below Pie Chart i trying do with Custom data. But its not Showing

var d= jQuery.parseJSON('[{"XAXIS":"HERMES","COUNT":"51"},{"XAXIS":"J R T CUMBUM","COUNT":"69"},{"XAXIS":"Krishnamoorthy","COUNT":"70"},{"XAXIS":"RED BUS","COUNT":"150"}]');  
  $("#ChartDiv").kendoChart({
        legend: {
            visible:true,
            position:"right"
        },
        seriesDefault: {
              type: "pie"
       },
       dataSource:{data:d},
       series: [{                      
                field:"COUNT",
                type: "pie",
                categoryField:"XAXIS",
                labels:{
                  visible: true,                   
                  template:"${value}"
                }
              }],
      tooltip:
      {
        visible:true,      
        template:"<div style='white-space: normal; max-width: 120px;'>${category} - ${value}</div>"
      },
      categoryAxis:{field: "XAXIS"}
  });

<div id="ChartDiv" style="width: 900px; height: 500px; display: inline-block;">
</div>
Anand
Top achievements
Rank 1
 asked on 18 Apr 2012
1 answer
290 views
In odata __next is specified to let the datasource know how to request more results.  I'm using hand rolled json and my listview isn't showing the loadmore button.  What do I need to do to let it know it should request the same URL but increment the page number?

var ds = new kendo.data.DataSource({
  transport: {
    read: {
      url: "http://localhost:3000/api/anagram",
      dataType: "jsonp",
      data: {
        format: 'html'
      }
    },
    parameterMap: function(options) {
      if (options.filter && options.filter.filters.length > 0)
        return {
          rack: options.filter.filters[0].value.replace(/\?/g,'-'),
          format: 'html',
          limit: options.pageSize,
          page: options.page
        };
      return options;
    }
  },
  group: 'length',
  pageSize: 10,
  page: 1,
  sort: {field: 'w', dir: 'asc'},
  filter: { field: 'rack', operator: 'eq', value: 'z' },
  serverFiltering: true,
  serverPaging: true,
  serverGrouping: true,
  serverSorting: true,
  error: function(e){
    alert(e);
    console.log(e);
  },
  change: function(e) {
    console.log('Data changed: ' + this.total());
  },
  schema: {
    groups: 'groups',
    total: 'count',
    model: {
      fields: {
        length: {
          type: 'number'
        },
        w: {
          type: 'string'
        },
        f: {
          type: 'string'
        }
      }
    }
  }
});
Georgi Krustev
Telerik team
 answered on 18 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?