Telerik Forums
Kendo UI for jQuery Forum
1 answer
175 views
Hi

I cannot find any equivalent issue/documentation/howto on my specific data structure.

I am getting an invalid template"

Please advise...

Code:

     <div id="example" class="k-content">
                <script id="template" type="text/x-kendo-template">
                <li class="Notice">
                <table style="width: 100%;">
                <tr><td>#= guid#</td><td>#= category#</td><td>#= pubDate#</td></tr>
                <tr><td>#= title#</td><td colspan="2">#= description#</td></tr>
                <tr><td>#= ip:Type#</td><td>#= ip:TimeDown#</td><td>#= ip:ETTR#</td></tr>
                <tr><td>#= ip:Progress#</td><td>#= ip:AreasAffected#</td><td>#= ip:Status#</td></tr>
            </table>
                </li>
            </script>
            <script type="text/javascript">
                $(document).ready(function () {
                    var template = kendo.template($("#template").html());
                    var dataSource = new kendo.data.DataSource({
                        transport: {
                            read: "http://www.telkomsa.net/rss/saix.xml"
                        },
                        schema: {
                            type: "xml",
                            data: "/item",
                            model: {
                                fields: {
                                    guid: "guid/text()",
                                    pubDate: "pubDate/text()",
                                    category: "category/text()",
                                    title: "title/text()",
                                    description: "description/text()",
                                    pubDate: "pubDate/text()",
                                    ip: {
                                        Type: "Type/text()",
                                        TimeDown: "TimeDown/text()",
                                        ETTR: "ETTR/text()",
                                        Progress: "Progress/text()",
                                        AreasAffected: "AreasAffected/text()",
                                        Status: "Status/text()"
                                       } //ip
                                    } //fields
                                 } // model
                             } //schema
                    }); //datasource
                }); //ready
           </script>
</div>

XML Data:

<item xmlns:ip="www.ipact.telkom-ipnet.co.za"><guid isPermaLink="false">NN0008585</guid><pubDate>Fri, 22 Jun 2012 14:31:03 +0200</pubDate><category>Planned Work</category><title>Link - To perform Planned Maintenance on the Telkom Network at Secunda</title><description>&lt;center&gt;&lt;b&gt;Ref:&lt;/b&gt; NN0008585&lt;/center&gt;&lt;b&gt;Category&lt;/b&gt; Planned Work &lt;b&gt;Type:&lt;/b&gt; Planned Work &lt;b&gt;Status:&lt;/b&gt; New&lt;BR&gt;&lt;b&gt;TimeDown:&lt;/b&gt; Thu, 28 Jun 2012 20:00:00 +0200 &lt;b&gt;ETTR:&lt;/b&gt; 8 Hours&lt;BR&gt;&lt;b&gt;Areas affected:&lt;/b&gt; DSLAM Affected: EMBALENHLE
DSLAM Affected: RST1 - UMLU
DSLAM Affected: RST2 - SIPU(A33)
DSLAM Affected: SECUNDA
DSLAM Affected: SECUNDA 2
DSLAM Affected: SECUNDA IMAX&lt;BR&gt;&lt;b&gt;Progress:&lt;/b&gt; </description><ip:Type>Planned Work</ip:Type><ip:TimeDown>Thu, 28 Jun 2012 20:00:00 +0200</ip:TimeDown><ip:ETTR>8 Hours</ip:ETTR><ip:Progress></ip:Progress><ip:AreasAffected>DSLAM Affected: EMBALENHLE
DSLAM Affected: RST1 - UMLU
DSLAM Affected: RST2 - SIPU(A33)
DSLAM Affected: SECUNDA
DSLAM Affected: SECUNDA 2
DSLAM Affected: SECUNDA IMAX</ip:AreasAffected><ip:Status>New</ip:Status></item>


Thanks!
Alexander Valchev
Telerik team
 answered on 02 Jul 2012
2 answers
334 views
I'm attempting to add a min and max for an integer style numericTextBox using Razor etc
I can see the values getting set to the correct values using console.debug, but the widget does not respect those limits.
I also tried having an onLoad function to set the min and max but that does the same thing..    
Any ideas on this one ?

<input type="text" id="@(Model.DisplayNumber)" name='answer' value='@answerValue' class="number-only" />

<script type="text/javascript">
    $(document).ready(function () {    
    var numericTextBox = $("#@(Model.DisplayNumber)").kendoNumericTextBox({
      format: "#",
      decimals: 0
    });
    if (@Model.RangeMin != null)
       numericTextBox.min = @Model.RangeMin; 
    if (@Model.RangeMax != null)
       numericTextBox.min = @Model.RangeMax; 
  });

Should have mentioned, this works fine but doesn't check whether the min and max have any values..

$(document).ready(function () {
  $("#@(Model.DisplayNumber)").kendoNumericTextBox(
      {
min: @Model.RangeMin, max: @Model.RangeMax, format: "#", decimals: 0})
});

Ok I'll try a different question. When an object is retrieved back from the Datastore, you cannot change it ?
In other words the "numericTextBox" cannot be altered by .min= etc.. Or, do I have to save it back,  Or I need to set the min and max in a different way. 

Please let me know if I'm wasting more time and this just isn't possible yet, Or if it's coming and when it does it will be done a different way... anyone out there ?






Dimo
Telerik team
 answered on 02 Jul 2012
1 answer
207 views
Is there a way show a pop up dialog with a message with Kendo? I would like to display a message. Thanks for any answers or documention.
Sebastian
Telerik team
 answered on 02 Jul 2012
1 answer
275 views
Hello,

I cannot get patern to work, can get requiredto work  but not patern.
      <li>
            <label for="cities" >
                Zip code:</label>
            <input id="contact_cities" data-bind="value: contact_zip" name="contact_cities" pattern="\d{5}" placeholder="Invalid zip code"
                validationmessage="Invalid zip code." /><span class="k-invalid-msg" data-for="cities"></span></li>
        <li>
.....
 
 
    $(document).ready(function () {
    
        var viewModel = kendo.observable({
            firstName: $.cookie("firstName"),
            lastName: $.cookie("lastName"),
            email: $.cookie("email"),
            phone: $.cookie("phone"),
            contact_zip: $.cookie("zip"),
            valid: false,
            contactseller: function () {
                if (validator.validate()) {
 
                    $.cookie("firstName", $("#firstname").val(), { expires: 7, path: '/' });
                    $.cookie("lastName", $("#lastname").val(), { expires: 7 , path: '/'});
                    $.cookie("email", $("#email").val(), { expires: 7 , path: '/'});
                    $.cookie("phone", $("#phone").val(), { expires: 7 , path: '/'});
                    $.cookie("zip", $("#contact_cities").val(), { expires: 7 , path: '/'});
 
                    status.text("Hooray! Your tickets has been booked!").addClass("valid");
                } else {
                    status.text("Oops! There is invalid data in the form.").addClass("invalid");
                }
            }
        });
 
        kendo.bind($("#contactSeller"), viewModel);
 
        var validator = $("#contactSeller").kendoValidator().data("kendoValidator"), status = $(".status");
 
 
        $("#contact_cities").kendoComboBox({
            placeholder: "Select zip code",
            dataTextField: "Label",
            dataValueField: "Value",
            filter: "contains",
            dataSource: {
                serverFiltering: true,
                transport: {
                    read: {
                        url: '@Url.Action("GetCities", "MainSearch")',
                        data: function () {
                            var combobox = $("#contact_cities").data("kendoComboBox");
                            return {
                                zip: combobox.input.val()
                            };
                        }
                    }
                }
            }
        });
         
        $("img[title]").tooltip();
 
        $('.submit-link').click(function () {
            var input = $(this).attr('id');
            $("#lastId").val(input);
            var window = $("#contactSeller").data("kendoWindow"); window.center(); window.open();
        });
 
        var window = $("#contactSeller").kendoWindow({
            title: "Contact Seller",
            visible: false,
            modal: true,
            resizable: false   
            }).data("kendoWindow");
    });
Rosen
Telerik team
 answered on 02 Jul 2012
0 answers
101 views
hi,
I have a panel bar and grid.I want to display grid inside the panel bar.I loaded the panel bar using ajax.I created the grid in a separate view.I have loaded the grid inside the panel bar using "contentUrl".it is displaying in side the panel bar but the grid is displaying two times as shown in the following attachment. can u tell me what is the reason for displaying the grid multiple times.
charan
Top achievements
Rank 1
 asked on 01 Jul 2012
3 answers
157 views
Hi
We are using a Kendogrid with filtering options, which should be internationalized.
I refer to the popup window with the text "Show rows with value that". Also the operators and the "Filter" and "Clear" text on the buttons
should be internationalized.
Is it possible to do this with  kendo cultures? Or could I make a template for the popup, which would take this into account?

Best Regards
Thomas
Jean-Yves
Top achievements
Rank 1
 answered on 01 Jul 2012
1 answer
358 views
Seems like a dumb question but I can't figure out how to set focus.  I tried:

$("#controlName").data("kendoAutoComplete").input.focus();

the above works for a dropdown but not autocomplete, input appears to be undefined.  How do I manually set focus on a kendoAutoComplete?
Mark
Top achievements
Rank 1
 answered on 30 Jun 2012
0 answers
99 views
I am loading a panel by AJAX call
I tried to cancel the select event by calling
 e.preventDefault();
I got a stack overflow

[UPDATE]
I figured out that I got this error because my underlying ajax url was null.!!!
However, I can't prevent the panel from being opened even I cancelled the event
nachid
Top achievements
Rank 1
 asked on 30 Jun 2012
0 answers
177 views
I have a set of divs that I hide and only show one at a time according to a menu item.
The initial div has a bound kendo control inside it.
I use jquerys .hide() method to hide the div with the kendo grid inside it.
I DO NOT call .hide() on the grid, just its parent div.

Later on when I call .show() method the div shows up including other normal text inside the div shows up but not the kendo grid??

Once a kendo grid has its parent div hidden how do I make it appear again?

Is this a bug?
Joshua
Top achievements
Rank 1
 asked on 30 Jun 2012
0 answers
118 views
Hi Team,

We have requirement to pass the different data based on the date selection, for that we are using the following two files to search in json file and parsing the data. 

 json.js ( https://github.com/douglascrockford/JSON-js/blob/master/json.js)
 jsonxpath.js(http://goessner.net/articles/JsonPath/)

When we use json.js we are getting "f.createElement is not a function" error and chart is not created.
 If we remove json.js  chart works fine.

we are in tight schedule , Kindly do let me know what's need to done to make it work,

Thanks
Moovendan

Moovendan
Top achievements
Rank 1
 asked on 30 Jun 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
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
AICodingAssistant
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
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
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
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
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?