Telerik Forums
Kendo UI for jQuery Forum
12 answers
3.2K+ views
1. How can i change the standard validation messages?
2.Can i change this messages via Data Adnotations in the viewModel?

for example in my view model i did not put something in the View model regarding that a field must be of a specific type ,and i get a standard message like :"the field Precision must be of type integer" i accidentally entered a string there.
So what are the ways of controlling this standard validation messages?

Regards,
Daniel
ajith
Top achievements
Rank 1
 answered on 05 May 2015
2 answers
612 views
Hi Team,

Greetings to you!

I'm new to Kendo UI. I just seen the demos. It's having very cool in-build features.

I'm implementing the Kendo Grid to my existing angular application. It is working fine. But facing some challenges in filtration, paging and sorting.

In my existing application, all the filters. paging and sorting were implemented as POST service. 

 E.g.:

Request URL: http://localhost:8085/companies/filter

Request Method: POST

Request Payload:

{
    "filterProperties": [{
        "propertyName": "CompanyName",
        "value1": "false",
        "operator": "Google"
    }],
    "sortingProperty": [{
        "field": "id",
        "sortingOperator": "ASC"
    }],
    "pageProperties": {
        "pageNumber": 1,
        "pageSize": 5
    }
}

I'm dealing with lakhs of data and can't have everything in front-end. So, I've went for server call for every action. By default, I'll load only 5 or 10 item in the grid.

I've checked the remote data binding demo (http://demos.telerik.com/kendo-ui/grid/remote-data-binding). It is implemented using query string in request header. 

Can I get some example on custom server data binding in POST method?

Appreciate your support on this.

 

Thank you,

Premkumar
P r e m k u m a r
Top achievements
Rank 1
 answered on 05 May 2015
4 answers
222 views

Hi, 

 I have kendo ui timeline view controller and i want to set events from a different datasource, which will be javascript array. i tried to set array to kendoScheduler datasource but event was not bind to the controller and when i double click on time line it gives a event popup which has unwanted fields which i cant remove. please find the sample below. 

http://dojo.telerik.com/@lilan123/UPuDE/3

 

Thanks, 

Lilan

Lilan
Top achievements
Rank 2
 answered on 05 May 2015
1 answer
293 views

I am trying to implement a search feature on a TreeView. For my search, I am receiving a list of paths to the correct nodes on the tree.

The challenge comes in that I need to use lazy loading for my remote data source. I need to know when the data is loaded and the node has finished expanding or I need the ability to trigger the expansion of a node once the data for that node has loaded.

I've tried doing this with the fetch function but that doesn't seem to work properly. Since the search returns multiple results, I have a loop call my search function iteratively. What appears to happen is that the loop progresses without finishing a call until the last element because the data has not loaded from the remote data source until that time. I believe it may have something to do with calling both fetch and then expand afterward.

Does the expand function implement the Promise API? Is there another way to make this work?

My code is the following:

//the following function is initially called with:
//  - the full path (including the element)

//  - the first level dataItem
//  - the number 1

function findNode(path, dataItem, currentLevel){
    var treeview = $("#treeview").data("kendoTreeView");
    var ds = treeview.dataSource;
    var node = treeview.findByUid(dataItem.uid);
 
    if(currentLevel < path.length) {
       dataItem.children.fetch().always( function(){
            treeview.expand(node);
            $.each(dataItem.children.data(), function(index, value){
                if (value.id == path[currentLevel])
                    var di = ds.getByUid(value.uid);
                    findNode(path, di, currentLevel + 1);
                }
            });
        });
    }
    else{
         //do things with the found item
    }
}

Peter
Top achievements
Rank 1
 answered on 04 May 2015
4 answers
184 views
Is there a way on a @(Html.Kendo().Map() to set the size of the pan and zoom controls on a map.  Also how do you change the controls locations.
T. Tsonev
Telerik team
 answered on 04 May 2015
6 answers
216 views
Is there any chance to implement some kind of events for connections (eg: change)?

I need to allow to edit a diagram, but I must keep a logic relation where children items can only be attached to elements on the first parent level. Right now there is no event nor an option to do this that I know of.
Daniel
Telerik team
 answered on 04 May 2015
1 answer
550 views

Is it possible to bind an anchor element's (<a href...) click event to your MVVM viewModel when the anchor is the product of a grid column's template?

Here's the scenario: We use TypeScript, Kendo and Kendo's MVVM

ViewModel

01.export class ViewModel {
02. 
03.    public people: Array<person>;
04. 
05.    constructor() {
06.        this.people = new Array<person>();
07. 
08.        $.getJSON(url)
09.            .done((result) => {
10.                $.each(result.contacts, (index, value) => {                   
11.                    this.people.push(new person(value));
12.                });
13.            });
14.                 
15.    }
16. 
17.    onTradeRecordIgnore(dataItem: TradeRecordViewModel): void {
18.        dataItem.IsDeleted = !dataItem.IsDeleted;
19.    }
20.}
 

HTML & Template

01.<div id="tradeGrid"></div>
02.<script id="tradeGridIgnore" type="text/x-kendo-template">
03.    # if (IsDeleted == false) { #
04.        <a href="\#" data-uid="#:uid#" data-command="ignore" class="glyphicon glyphicon-unchecked text-center"></a>
05.    #}
06.    else
07.    {#
08.        <a href="\#" data-uid="#:uid#" data-command="ignore" class="glyphicon glyphicon-check text-center"></a>
09.    #}#   
10.</script>

 

Main Questions: 

  1. In the kendo-template how do I bind the click event of the anchor tag to the onTradeRecordIgnore function of the viewModel? 
  2. Am I right in assuming that the data context, when the template is run, is the dataItem (the record/row)? 
  3. If point 2 is correct, how do you access properties in the viewModel that has the people property? ​For example: myViewModel has the property people which I'm using to bind the grid to, but perhaps it could have another property called myViewModel.manager which I want to print in each row using the template approach? How do I access it? #: Name # is part of the dataItem/row but you would need something like #: $parent.manager # to get this right?
  4. Considering point 3 above, how do I bind the click event of the anchors in the template? 

 

 

 

 

Daniel
Telerik team
 answered on 04 May 2015
1 answer
199 views

Hello,

I'm creating a grid using Razor syntax and would like to lock the left column

    @(Html.Kendo().Grid(Model.GridData)
    .Name(GridID)
    .Columns(columns =>
    {
            columns.Template(o => o).ClientTemplate("<a class='k-button k-grid-details'>...</a>").Width(15).Locked(true);

 

When I run the grid with .Locked(true) as part of that column definition, the grid doesn't load. I only see the loading icon and the website hangs.

Please let me know what's wrong with my syntax. I've seen threads saying that the grid doesn't allow locked columns with templates, but the example was a hierarchical grid. My grid is not a hierarchy.

 

I'm trying to ensure that the left most column stays a constant width. It doesn't need to be locked necessarily, I just don't want it to get narrower if the window size changes. The grid must be 'Scrollable' so that the headers are always visible at the top.

 

Thanks in advance, and let me know if I can provide any more information.

 

 

 

Kiril Nikolov
Telerik team
 answered on 04 May 2015
3 answers
262 views
Anyway to change the opacity for the background the sparkline graphs in MVC. I would even accept changing the background color.
Iliana Dyankova
Telerik team
 answered on 04 May 2015
1 answer
72 views

Hi Telerik Team,

 I have requirement to not show the default loading image while doing any actions and show them programtically.

 Can you let me know in which event I can stop them and show it when ever required.

 This is quite urgent.

Thanks,

Vladimir Iliev
Telerik team
 answered on 04 May 2015
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
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?