Telerik Forums
Kendo UI for jQuery Forum
5 answers
142 views
How does the validation "work" in that what happens when I setup validation on a form element.

When you call validate() it loops though all required inputs in that form and runs every rule on each of them?...or does it run on every input in that form.

So then if the rules run per input (seems like this from the demo) can you not setup a global rule that says something like "Count all checked checkboxes on the page and make sure the count is greater than 10"

Does that make sense?
Rosen
Telerik team
 answered on 04 Jul 2012
1 answer
332 views
I am trying to create reusable pieces of code that can be declaratively bound using the Kendo MVVM framework.  Here is an example of what I mean:

template.tmpl
<div>
  <p>This is rendering of the ${viewModel} view model</p>
  <span data-bind="text: ${viewModel}.data">
</div>

test.html
<script id="viewTemplate" type="text/x-kendo-tmpl" src="template.tmpl">
<script type="text/javascript" src="test.js" />
<div data-template="viewTemplate" data-bind="source: viewData.viewModel1">
<div data-template="viewTemplate" data-bind="source: viewData.viewModel2">

test.js
var viewModel = kendo.observable({
  viewData: {
    viewModel1: {
      viewModel: "viewModel1"
    },
    viewModel2: {
      viewModel: "viewModel2"
    }
  },
  viewModel1: {
    data: "I am the data for view model 1".
  },
  viewModel2: {
    data: "I am the data for view model 2".
  }
})

This example works fine when the template is within test.html.  However, when I try to separate out the template into it's own template.tmpl file, it does not work.  What am I doing wrong? 
Atanas Korchev
Telerik team
 answered on 04 Jul 2012
0 answers
94 views
Hi,

can you provide an example of how to manage the onchange event for a dropdown control in kendo mobile?

thanks a lot
mauro
Mauro
Top achievements
Rank 1
 asked on 03 Jul 2012
7 answers
734 views
Hello,

I want to be able to edit in a grid. That is not a problem.
But for example I have an order line and in a dropdownlist I choose a product.
On product change want one or more other (editable) fields to be updated, e.g. the product description and price.
So on product change I want to have an event calling the server and then updating some fields of the row which is currently in edit mode.
Hope it is a bit clear what I mean.

Any hints how to do that?

Thanks, Jaap
Edwin
Top achievements
Rank 1
 answered on 03 Jul 2012
1 answer
138 views
hi,
To display the image in the list view dynamically,
in the view i used the image tag like:<img src="@Url.Action("GetImage/${ID}", "Home")"  alt = "${name} image" />
how can i pass this value dynamically to the controller and the url is not identifying the special characters.
Sim
Top achievements
Rank 1
 answered on 03 Jul 2012
3 answers
1.1K+ views
Currently when I bind to a ListView that has no data - I get what looks like an <hr />...  Is there a way to set a "No Records" template to use if there are no items to display in the dataset?
Georgi Krustev
Telerik team
 answered on 03 Jul 2012
1 answer
158 views
Hii,

Here is my code for kendo ui listview but the problem is that the list view is not going to bind.


<div id="example" class="k-content">


    <div id="listView"></div>


    <div class="k-pager-wrap">
        <div id="pager"></div>
    </div>


    <script type="text/x-kendo-tmpl" id="template">
        <div class="product">
            
            <h3>${Category_ID}</h3>
            
        </div>
    </script>


    <script>
        $(document).ready(function () {
            var dataSource = new kendo.data.DataSource({
                transport: {
                    read: {
                        url: "/Admin/AddCategory/GetCategoryList", 
                        dataType: "jsonp"
                    }
                },
                pageSize: 12
            });


            $("#pager").kendoPager({
                dataSource: dataSource
            });


            $("#listView").kendoListView({
                dataSource: dataSource,
                template: kendo.template($("#template").html())
            });
        });
    </script>
</div>


Below is the result with comes out when i execute this url:

[{"Category_ID":1,"CategoryName":"Programming Jobs"},{"Category_ID":2,"CategoryName":"Design Jobs"},{"Category_ID":3,"CategoryName":"Writing Jobs"},{"Category_ID":4,"Cate


I dont know what is the error going on.....

can you please help me 

Thanx
Sim
Top achievements
Rank 1
 answered on 03 Jul 2012
7 answers
474 views
Hi There,

i have a oData WCF v2 pointing to an Openaccess entities set. the issue i'm having is that i'm unable to link (expand) it's relational classes within the datasource call, I get "null" and Undefined" returned when trying to call the field of the relational classes

SVC:
[System.ServiceModel.ServiceBehavior(IncludeExceptionDetailInFaults = true)]
    [JSONPSupportBehavior]
public partial class SQZEntitiesService : OpenAccessDataService<Sequentia.SQZEntities>
{
   /// <summary>
   /// Initializes the service.
   /// </summary>
   /// <param name="config">The configuration object.</param>
   public static void InitializeService(DataServiceConfiguration config)
   {
       config.SetEntitySetAccessRule("URLs", EntitySetRights.All);
       config.SetEntitySetAccessRule("TACs", EntitySetRights.All);
       config.SetEntitySetAccessRule("Offers", EntitySetRights.All);
       config.SetEntitySetAccessRule("IncomingActivityInfos", EntitySetRights.All);
       config.SetEntitySetAccessRule("FormReportData", EntitySetRights.All);
       config.SetEntitySetAccessRule("FormData", EntitySetRights.All);
       config.SetEntitySetAccessRule("DefaultChannelTypes", EntitySetRights.All);
       config.SetEntitySetAccessRule("DecisionStages", EntitySetRights.All);
       config.SetEntitySetAccessRule("ChannelTypes", EntitySetRights.All);
       config.SetEntitySetAccessRule("ChannelInfos", EntitySetRights.All);
       config.SetEntitySetAccessRule("CaptureObjectValues", EntitySetRights.All);
       config.SetEntitySetAccessRule("CaptureObjectProperties", EntitySetRights.All);
       config.SetEntitySetAccessRule("CaptureObjects", EntitySetRights.All);
       config.SetEntitySetAccessRule("Activities", EntitySetRights.All);

       // TODO: Set service behavior configuration options
       // Examples:
       // config.DataServiceBehavior.AcceptCountRequests = true;
       // config.DataServiceBehavior.AcceptProjectionRequests = true;
       config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V2;
            
   }
}

Grid DS:
<script>
                $(document).ready(function () {
                    $("#grid").kendoGrid({
                        dataSource: {
                            type: "odata",
                            transport: {
                                read: {
                                    url: "/DesktopModules/SQZWCF/SQZEntitiesService.svc/Activities",
                                    data: {
                                        expand: "TAC,Offer"
                                    }
                                }
                            },
                            schema: {
                                model: {
                                    fields: {
                                        ActivityID: { type: "number" },
                                        TACID: { type: "number" },
                                        Date: { type: "date" },
                                        ChannelTypeID: { type: "number" },
                                        Offername: { type: "text" }
                                    }
                                }
                            },
                            pageSize: 10,
                            serverPaging: true,
                            serverFiltering: true,
                            serverSorting: true
                        },
                        height: 250,
                        filterable: true,
                        sortable: true,
                        pageable: true,
                        columns: [{
                            field: "ActivityID",
                            filterable: false
                        },
                            "TACID",
                            {
                                field: "Date",
                                title: "Date",
                                width: 200,
                                format: "{0:MM/dd/yyyy}"
                            },
                            "ChannelTypeID",
                            "Offername"


                        ]
                    });
                });
            </script>
Daniel
Telerik team
 answered on 03 Jul 2012
1 answer
208 views
I've been trying to configure a dropTarget to accept multiple groups. I've tried using group names separated by commas, I've tried using arrays. Nothing seems to be working.

What is the correct syntax, or is this not supported?
Alexander Valchev
Telerik team
 answered on 03 Jul 2012
3 answers
334 views
@(  Html.Kendo().Grid(Model.Notifications)
        .Name("gridTitanNotifications")
        .Columns(columns => {
            columns.Template(
                @<text>                   
                    <input name="chkNotifications" type="checkbox" value="@item.InstanceID " title="checked notification"/>               
                </text>).Title("").Width(36);
 
            columns.Bound(m => m.NotificationText).Title("Notification");
 
            columns.Template(m => {
                switch (m.LinkType) {
                    case Titan.Entities.Enums.Notification.LinkTypes.Internal:
                        Html.ActionLink("TEST", "test");
                //                      Html.ActionLink(m.LinkText, m.LinkAction, m.LinkController, new { instanceID = m.LinkInstanceID });
                        break;
                    case Titan.Entities.Enums.Notification.LinkTypes.External:
                        break;
                }
            }).Title("Case");
 
            //          columns.Bound(m => m.LinkText).Title("Case");
            columns.Bound(m => m.TimestampCreated).Title("Recieved");
        })
 
                                .RowAction(row => {
                                    if (!row.DataItem.ReadFlag) {
                                        row.HtmlAttributes["style"] = "font-weight: bold";
                                    }
                                })
                        )
Rosen
Telerik team
 answered on 03 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
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?