Telerik Forums
Kendo UI for jQuery Forum
1 answer
248 views
In the Kendo Web UI MVVM example (index.html), if you would like to see the kendoComboBox object with value and description bindings instead of the browser's select element, just paste this over the existing script tag in the body of index.html.  Hope this helps someone.

<script>
     $(document).ready(function () {
         var genderCollection = [{ description: "Guy", value: "Male" }, { description: "Girl", value: "Female"}];
         var genderElement = $("#gender");
 
         $(genderElement).width(($("#fname").width() + 2));
         $(genderElement).css("margin-left", "-2px");
         $("#gender").kendoComboBox({ dataValueField: "value", dataTextField: "description" });
 
         var viewModel = kendo.observable({
             firstName: "John",
             lastName: "Doe",
             genders: genderCollection,
             gender: "Male",
             agreed: false,
             confirmed: false,
             register: function (e) {
                 e.preventDefault();
                 this.set("confirmed", true);
             },
             startOver: function () {
                 this.set("confirmed", false);
                 this.set("agreed", false);
                 this.set("gender", "Male");
                 this.set("firstName", "John");
                 this.set("lastName", "Doe");
             }
         });
 
         kendo.bind($("#example"), viewModel);
 
     });
 </script>

Dan
Long
Top achievements
Rank 1
 answered on 28 Jul 2012
2 answers
227 views
Hi All,

Has anyone experienced the Kendo UI from MVVM pattern? I would like to see the pitfalls in this decision. So that I would be ready for the unexpected.

Thanks for reading
Long
Top achievements
Rank 1
 answered on 28 Jul 2012
0 answers
244 views
Can someone tell me why this is an invalid template

<script type="text/x-kendo-template" id="recordtemplate">
    <center><h2>#= ActivityName #</h2></center>
@using (Html.BeginForm("recordcompletedactivity","engage"))
{
@(Html.Kendo().DatePicker()
.Name("DateCompleted") 
.Min(new DateTime(1900, 1, 1)) 
.Max(new DateTime(2099, 12, 31))
.Format("MMddyyyy")
.Value(DateTime.Now.ToString()));
@Html.CheckBox("Attest", new { @class = "cb" });
@Html.Encode("Check here to confirm completion this activity");
<br/><br/>
<center>
<input type="submit" class="submit" name="Button" value="Submit" />
</center>
}
</script>


i get the following error
Uncaught Error: Invalid template:' <center><h2>#= ActivityName #</h2></center> <form action="/engage/recordcompletedactivity" method="post"><input class="k-input" id="DateCompleted" name="DateCompleted" type="date" value="07272012" /><script> jQuery(function(){jQuery("#DateCompleted").kendoDatePicker({format:"MMddyyyy",min:new Date(1900,0,1,0,0,0,0),max:new Date(2099,11,31,0,0,0,0)});}); ' Generated code:'var o,e=kendo.htmlEncode;with(data){o='\n <center><h2>'+( ActivityName )+'</h2></center>\t\n<form action="/engage/recordcompletedactivity" method="post"><input class="k-input" id="DateCompleted" name="DateCompleted" type="date" value="07272012" /><script>\n\tjQuery(function(){jQuery("';DateCompleted").kendoDatePicker({format:"MMddyyyy",min:new Date(1900,0,1,0,0,0,0),max:new Date(2099,11,31,0,0,0,0)});}); ;o+=;}return o;' 
bob
Top achievements
Rank 1
 asked on 27 Jul 2012
0 answers
172 views
I'm displaying records from a DB in a kendo grid, and one DB field is a datetime.

I'm using the following to display the value: kendo.toString(datetime,"dd MMMM yyyy, h:MM:ss")

This works, but the time it displays is incorrect. For instance if the value in the DB is "2012-07-27 15:28:11.383" the value displayed will be "27 July 2012, 3:07:12", which is off by about 21 minutes.

What's up with that?
David
Top achievements
Rank 1
 asked on 27 Jul 2012
0 answers
118 views
Hi,

I have an object in my Model that must be bounded to two ViewModels. This object is loaded with ajax from the server.

This object must be  bounded to two regions of my screen that have, each one, different ViewModels. I would like that when the response arrives from my Ajax service the two widgets, bounded to my ViewModels, be updated.

How can I do this.

Thanks
mvbaffa
Top achievements
Rank 1
 asked on 27 Jul 2012
4 answers
373 views
OK, not exactly a question on ListView per se, but spinning wheels for some reason on this guy.

I have the following template and ListView on a page:
$("#top3").kendoListView({
                dataSource: dataSourceCustomers,
                template: kendo.template($("#top3template").html())
});
 
 
<script type="text/x-kendo-tmpl" id="top3template" >
        <div class="top3item">
            <dl class="subtitle">
                <dt><b>${CustomerName}</b></dt>
                <dd>${kendo.toString(Value, "c")}</dd>
            </dl>
        </div>
     
</script>

What I'm looking for is a way for format the FIRST item on the list returned (bold, diff color, etc.).  It sounds simple enough I should be able to do it with jQuery alone, but its just not coming to me.  Any ideas on formatting the first item returned?  Thanks in advance for the help!
Iliana Dyankova
Telerik team
 answered on 27 Jul 2012
2 answers
666 views
I am trying to add radio button in a template column of the grid -

columns.Bound(r => r.Approved)
    .ClientTemplate(" <input type='radio' id='Approve' name='chkApprove' /><input type='radio' id='Deny' name='chkDeny' />")
    Title("Approve");

But the radion buttons show up as a single checkbox control. Can anyone help me with this?

 

 

 


Vaishali
Top achievements
Rank 1
 answered on 27 Jul 2012
1 answer
140 views
I have copied and pasted the code from the "Build Apps With Kendo UI Mobile" how-to but it doesn't appear to be working.  The tabstrip navigation at the bottom appears and I can navigate to the "about.html" page with a slide transition but when I click on the "Home" link it doesn't take me back.  Any help would be greatly appreciated.

Todd
Telerik team
 answered on 27 Jul 2012
2 answers
143 views
Hi,
In TreeView ver. 2012 q2 the findByText not function if the node is not visible ?

Thanks
Vitantonio
Top achievements
Rank 1
 answered on 27 Jul 2012
0 answers
96 views
Hi all,

I've got a grid where I want to implement the DELETE action. When I click on the DELETE button it calls the url for that action, but no value is passed to that URL.
I'm using PHP for catching the DELETE action, but both $_GET and $_POST variables are empty.

This is my grid:

<script>
    $(document).ready(function(){
 
         
        var dataSource = new kendo.data.DataSource({
            transport: {
                read:  {
                    url: '<?= site_url('adwords/admin/getKeywordsDetails') ?>',
                    dataType: "json"
                },
                destroy: {
                    url: '<?= site_url('adwords/admin/deleteKeywordDetail') ?>',
                    dataType: "json",
                    Type: "POST"
                },
                parameterMap: function(options, operation) {
                    if (operation !== "read" && options.models) {
                        return {models: kendo.stringify(options.models)};
                    }
                }
            },
            pageSize: 50,
            autoSync: true,
            schema: {
                model: {
                    id: "id",
                    fields: {
                         
                        id: { editable: false, nullable: true },
                        segment: { type: "string" },
                        keyword: { type: "string" },
                        exact_monthly_search_target: { type: "number" },
                        broad_monthly_search_target: { type: "number" },
                        exact_competition: { type: "number" },
                        exact_estimated_avg_cpc: { type: "number" }
                    }
                }
            }
        });
        $("#keyword_ideas_result_grid").kendoGrid({
             
            dataSource: dataSource,
            scrollable: true,
            sortable: true,
            filterable: true,
            serverPaging: true,
            type: "json",
            editable: {
                update: false,
                destroy: true,
                confirmation: "Are you sure you want to remove this item?"
            },
            pageable: true,
            columns: [ {
                    field: "segment",
                    title: "<?= __("Segment") ?>"
                } , {
                    field: "keyword",
                    title: "<?= __("Keyword") ?>"
                } , {
                    field: "exact_monthly_search_target",
                    title: "<?= __("Local Exact") ?>"
                } , {
                    field: "broad_monthly_search_target",
                    title: "<?= __("Local Broad") ?>"
                } , {
                    field: "exact_competition",
                    title: "<?= __("Competition Exact") ?>"
                                 
                }, {
                    field: "exact_estimated_avg_cpc",
                    title: "<?= __("CPC Exact") ?>"
                                 
                },
                { command: "destroy", title: " ", width: 110 }
            ]
        });
    });
</script>

And my PHP receptor is ver simple:
// adwords/admin/deleteKeywordDetail
        var_dump($_GET);
        var_dump($_POST);

Have you got any idea why I'm getting those variables empty?
The READ method is working alright as I see the grid full of data, but the DESTROY is somehow not sending any parameter.

Thanks!

Juan
Juan
Top achievements
Rank 1
 asked on 27 Jul 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
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?