Telerik Forums
Kendo UI for jQuery Forum
1 answer
638 views
 <label for="email" class="required">To:</label>
<input type="email" id="email" name="Email" class="k-textbox" placeholder="e.g. myname@example.net" required data-email-msg="Email format is not valid" "/>
In the document.ready(function(){} I have defined like
var validator = $("#email").kendoValidator().data("kendoValidator");
It is validating single email,I want to validate more than one email at a time,can u tel me how to validate more than one email?

Here i find soln but that does not work
Stack over flow how to validate more than one email in kendo ui

Can anyone help?
Alexander Popov
Telerik team
 answered on 14 May 2014
4 answers
574 views
Hi,

I do not think this is possible, so in that case consider this an enhancement request (or any tips would be appreciated).

I would like to have a customer header in the grid. In your terminology a template for a row to displayed above the column headers (like a grid toolbar).

The items I would want to put in that header template are (so any in-built help would be appreciated):
1. A total row count. Would be nice if that number was easily available (#= RowCount #).
2. A refresh button. So also a simple way to call a refresh on the grid and the data source would be good.
3. Custom buttons (e.g. Copy rows, export rows). Would be nice if I had easy access to an array of selected rows which could be sent to the custom functions.
4. A filter input field that either matched against all values in the grid (local data) or was passed as an argument to the data source and refreshed.

This is all stuff I need to for hundreds of grids, so I'd prefer if was possible to provide as a template to the grid rather than having to render as controls next to the grid.

This is probably applicable as a footer template as well.
Sebastian
Telerik team
 answered on 14 May 2014
1 answer
107 views
We are using HP Sprinter to do functional testing of a website that is using KendoUI controls. HP is saying we need to add an extensibility package to the HP Sprinter tool because when we attempt to test, the control becomes unavailable. We have verified that this only occurs during the use of the testing tool and not in "normal" use of the tool.
Any help is greatly appreciated.
Thank You In Advance.
JT.
mailto:jjtontz@riversidecrest.com
Atanas Georgiev
Telerik team
 answered on 14 May 2014
5 answers
312 views
Hi
  I'm new to Telerik controls so sorry for the newbie question, but...

You can make a grid using the MVC style of markup

@(Html.Kendo().Grid((TimeSummaryDay[])Model)
.Name("grid")
.Columns(columns =>

etc

And also using javascript:

<div id="grid2"></div>
<script>
$("#grid2").kendoGrid({
columns: [
 { field: "name" },
 { field: "age" }

etc

The question is can you mix these styles, can you do everything with the MVC style that you can with the javascript style?

One reason for asking is that I want to be able to hide columns as the browser changes size. I've seen as example that looks like this:

var grid = $("#grid").data("kendoGrid");
grid.hideColumn("SortName");

but grid is null. When I do this with grid2 data("kendoGrid") does return an object. Does that means that data("kendoGrid") only works with the javascript style?

thanks









Anthony
Top achievements
Rank 1
 answered on 14 May 2014
3 answers
103 views
How can i found background for my grid like this : http://demos.kendoui.com/content/web/grid/clientsDb.png

Iliana Dyankova
Telerik team
 answered on 14 May 2014
1 answer
499 views
http://jsfiddle.net/RichardAD/BemTb/ demonstrates how .preventDefault() can be used to prevent normal selection, and thus allow multiple selections and node deselection.
Coy
Top achievements
Rank 1
 answered on 14 May 2014
2 answers
375 views
Hi ,

I am trying to set the Tool tip for Kendo Create button on the grid toolbar.

Can any one help me in setting it up on writer grid and agent grid.

This is how I am setting up the Add new record button in toolbar. --> { name: "create", text: "" }, in the demo below.

Thanks
Chatrapathi Chennam

Chatra
Top achievements
Rank 1
 answered on 13 May 2014
1 answer
508 views
I have a Kendo UI MVC control on my asp.net MVC page, i want to highlight specific dates based on information from my database. EG on 9/Aug/2012 there were 7 appointments raised.


I'd like to use the custom template like this 


    <%= Html.Kendo().Calendar()
            .Name("calendar")
            .Value(DateTime.Today)
            .HtmlAttributes(new { style = "width:330px" })
            .Footer("Today - #=kendo.toString(data, 'd') #")
                .MonthTemplate("# if ($.inArray(+data.date, events) != -1) { #" +
                                "'<div class=\"" +
                                "# if (data.value < 10) { #" +
                                        "exhibition" +
                                    "# } else if ( data.value < 20 ) { #" +
                                        "party" +
                                    "# } else { #" +
                                        "cocktail" +
                                    "# } #" +
                                "\"></div>" +
                            "# } #" +
                            "#= data.value #")                     
    %>
    
    <script>
        var today = new Date(),
            events = [
                +new Date(today.getFullYear(), today.getMonth(), 8),
                +new Date(today.getFullYear(), today.getMonth(), 12),
                +new Date(today.getFullYear(), today.getMonth(), 24),
                +new Date(today.getFullYear(), today.getMonth() + 1, 6),
                +new Date(today.getFullYear(), today.getMonth() + 1, 7),
                +new Date(today.getFullYear(), today.getMonth() + 1, 25),
                +new Date(today.getFullYear(), today.getMonth() + 1, 27),
                +new Date(today.getFullYear(), today.getMonth() - 1, 3),
                +new Date(today.getFullYear(), today.getMonth() - 1, 5),
                +new Date(today.getFullYear(), today.getMonth() - 2, 22),
                +new Date(today.getFullYear(), today.getMonth() - 2, 27)
            ];
    </script>


How can I replace the above javascript array with an array on my viewmodel?
Something like this - 


    .MonthTemplate("# if ($.inArray(+data.date, " + Model.Array + ") != -1) { #" +
                                    "'<div class=\"" +
                                    "# if (data.value < 10) { #" +
                                            "exhibition" +
                                        "# } else if ( data.value < 20 ) { #" +
                                            "party" +
                                        "# } else { #" +
                                            "cocktail" +
                                        "# } #" +
                                    "\"></div>" +
                                "# } #" +
                                "#= data.value #")                     
        %>


Thanks

Jarrod
Top achievements
Rank 1
 answered on 13 May 2014
2 answers
140 views
Hello,

I am trying to make this grid using Json. The filters for Country code and Company codes are not working. I have attached the screenshot of the grid (grid value is not provided for security of data). As you can understand form the code snippet that "userConstraints" field is an object which later split into two columns Country Code and Company Code and where the filters are not working. I would like to make it work in client side. Do not prefer to solve it in sever side. Please let me know if i missed anything. Thanks in advance!

Screen Shot:


Json Data for Field "userConstraints"


Code Snippet:

getUsers: function (data, response) {
        permissionManagementViewModel.SubjectRoleMapping(response);
        $('#RolesGrid').html();
        $('#RolesGrid').kendoGrid({
            dataSource: {
                data: response,
                batch: false,
                pageSize: 10,
                schema: {
                    model: {
                        fields: {
                            AccountName: { editable: false },
                            RoleName: { editable: false },
                            ConstraintsExpression: { editable: false },
                            userConstraints: { editable: false },
                            Status: { editable: false }
                        }
                    }, parse: function (data) {
                        $.each(data, function (i, val) {
                        });
                        return data;
                    }
                }
            },
            editable: true,
            filterable: {
                extra: true, //do not show extra filters
                operators: { // redefine the string operators
                    string: {
                        contains: "Contains",
                        startswith: "Starts With",
                        eq: "Is Equal To",
                        doesnotcontain: "Does not contain",
                        endswith: "Ends with",
                        neq: "Is not equal to"
                    }
                }
            },
            pageable: true,
            scrollable: true,
            resizable: true,
            sortable: true,
            selectable: true,
            resizable: true,
            columns: [
                { field: "AccountName", title: "User Name", width: '150px' },
                { field: "RoleName", title: "Role Name", width: '150px' },
                { field: "Status", hidden: true },
                { field: "userConstraints", template: "<span style='overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100px' title='#=stringifyCountryValues(userConstraints, Status, 'Subject_CountryCode')#'>#= stringifyCountryValues(userConstraints, Status, 'Subject_CountryCode') #</span>", title: "Country Codes", width: '100px' },
                { field: "userConstraints", template: "<span style='overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100px' title='#=stringifyCountryValues(userConstraints, Status, 'Subject_CompanyCode')#'>#= stringifyCountryValues(userConstraints, Status, 'Subject_CompanyCode') #</span>", title: "Company Codes", width: '100px' },
                { field: "", title: "View/Edit", width: '80px', template: "<input class='btnViewPermissions' type='button' value='View/Edit' onclick='javascript:permissionManagementViewModel.ViewUser(\"#=encodeURIComponent(AccountName)#\", \"#=RoleName#\", \"#=Status#\")'  />" },
                { field: "", title: "Delete", width: '80px', template: "<input class='btnDeletePermissions' type='button'  value='Delete' onclick='javascript:permissionManagementViewModel.DeleteUser(\"#=encodeURIComponent(AccountName)#\", \"#=RoleName#\")'  />" }
            ]
        })
        var grid = $("#RolesGrid").data("kendoGrid");
        grid.bind("dataBound", onpermissionsDataBound);
        grid.dataSource.fetch();
        permissionManagementViewModel.Action('');
    },
Rosen
Telerik team
 answered on 13 May 2014
3 answers
197 views
I am trying to read the Entity1 using the dataSource schema from the returned json object.


The Json Object is as follow
{
"odata.metadata":"http://localhost:25061/odata/$metadata#Entity,"value":[
{
"Entity1":{
"LastName":"Smith","FirstName":"James"},"Id":1,"Other":2},{
"Entity1":{
"LastName":"Smith","FirstName":"Alex"},"Id":2,"Other":3}
}]
}Datasource Schema
schema: {
data: function (data) { return data.value; },
total: function (data) { return data["odata.count"]; },
},Model
$("#grid").kendoGrid({
dataSource: dataSource,
filterable: true,
sortable: true,
pageable: true,
columns: [
{ field: "LastName" },
{ field: "FirstName" }
]
});Thanks,
DG
Kiril Nikolov
Telerik team
 answered on 13 May 2014
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
Drag and Drop
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
Marco
Top achievements
Rank 4
Iron
Iron
Iron
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
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
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
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?