Telerik Forums
Kendo UI for jQuery Forum
1 answer
342 views

Hello,

I have this valdiation summary:

<div asp-validation-summary="All" class="text-danger" >
    <span class="k-invalid-msg" data-for="Description" data-valmsg-for="Description"
        id="Description_validationMessage" role="alert" >
     </span>
        ... more fields
</div>
 
<textarea asp-for="Description" class="form-control mc0" data-bind="value: ent.Description">
</textarea>

 
let viewModel = kendo.observable({
 
    save: function() {
        let editForm = $("#edit-form").kendoValidator().data("kendoValidator");
 
        if (editForm.validate()) {
          this.entDataSource.sync();
    }
    },
})

 

Because of the business rules, I need to validate only certain fields, based on the current entity state.

Is there a way to validate only certain fields, like all fields with class "mc0" (or fields in a "div#id-for-state-X") and have the error messages displayed in the summary?

Thanks.

Petar
Telerik team
 answered on 24 Feb 2020
6 answers
158 views

Please correct me if I am wrong.   When we try to search in the Name field (without tabbing out), a drop down appears, but only appears to use StartsWith.  While when you tab out, the filtering actually uses the filter operator.

Other than wiring up a filter template to a combobox and then wire up to the "Operator button" (change event) make sure the Grid Filter operator matches the Combobox operator, is there anything else I can do?

Thanks

Sample code below: 

                    @(Html
                .Kendo()
                    .Grid<ItemViewDisplay>()
                        .Name("saleItemSearchGrid")
                        .Columns(columns =>
                        {
                            columns.Bound(c => c.ItemCostId).Hidden(true);
                            // Name:
                            columns.Bound(c => c.Name).Filterable(KendoConstants.Grid.FilterConfigs.ContainsOperator);
                            // IngredientNumber:
                            columns.Bound(c => c.IngredientNumber).Filterable(KendoConstants.Grid.FilterConfigs.ContainsOperator);
                            // BarcodeCount:
                            columns.Bound(c => c.BarcodeDisplayList).Filterable(f => f.Cell(cell => cell.Operator("contains").Delay(1500)))
                       .ClientTemplate("#=BarcodeDisplayStr#");
                            columns.Command(command => { command.Custom("gridSelect").Text("Select").Click("jsSaleItemSelected"); }).Title("Action");
                        })
                        .HtmlAttributes(KendoConstants.Grid.StandardHtmlAttributes)
                        .Scrollable()
                        .Sortable()
                        .PersistSelection()
                        .Filterable(KendoConstants.Grid.FilterByRow)
                        .Pageable(KendoConstants.Grid.Paging5Button)
                        .DataSource(dataSource => dataSource
                            .Ajax()
                            .Events(KendoConstants.StandardErrorFunction)
                            .Model(model => model.Id(p => p.ItemCostId))
                            .Read(read => read.Action("MenuButtonItemList_Read", "Menu"))
                            .PageSize(KendoConstants.Grid.StandardPageSize)
                        )
                    )

Angel Petrov
Telerik team
 answered on 24 Feb 2020
3 answers
517 views

 

 

 

Alex Hajigeorgieva
Telerik team
 answered on 24 Feb 2020
3 answers
49 views

H team,

Found this many times in last kendo UI release note :

"Input wrapped in class - 'input-validation-error' is not submitted by jquery-validate greater than version 1.12.0"

Can someone explain me this in details please ?

 

Best regards,

Laurent.

 

Ivan Danchev
Telerik team
 answered on 21 Feb 2020
1 answer
459 views
I have a scheduler in timeline view built in Kendo for jQuery. The rest of the site is in ASP.NET MVC. I'm wondering if there's any way to dynamically/responsively set the column width so that on most desktop screens, the whole day is visible without scrolling. I have columnWidth:70 set in the views option, but this is too small on large screens, but 80 is too big on small screens. Any way to tell Kendo to scale the column widths based on window size?
Aleksandar
Telerik team
 answered on 21 Feb 2020
8 answers
2.2K+ views

Hey,

I am working with Kendo Grid with endless Scroll option set to true. I know that we are not suppose to have paging option (Refresh) with the endless or virtual scrolling set to true, that's why I am looking for a workaround that allows us at least to reset the Grid from the start (before scrolling).

here is an example: https://dojo.telerik.com/OZUTIJEz    (Try to scroll and then hit the refresh icon)

There is always replicated/wrong data with wrong paging.

I have tried the following things and didn't work:

$('#grid').data('kendoGrid').dataSource.data([]);

$('#grid').data('kendoGrid').dataSource.read();

Any Ideas ?

Thanks.

John
Top achievements
Rank 1
 answered on 20 Feb 2020
1 answer
103 views

Hi, Dev Team!

For my bar chart i create DataSource dinamycally/

its looks like below:

var docChartData = [];

this.data().forEach(function (item) {
   docChartData.push({ Name: "some name", Value: "some value", Color: "red"})
})

So, I want to stack my chart. how can i add additional stack serie. i try like this, but it didnt work

this.data().forEach(function (item) {

   docChartData.push([{ Name: "some name", Value: "some value", Color: "red"},Name: "some name", Value: 100% - "some value", Color: "GRAY"}])
})

Nikolay
Telerik team
 answered on 20 Feb 2020
10 answers
1.2K+ views

I have a connected listbox on the screen and call a function to setup the list box. This function should select the three items in the itemsToSelect variable and move them to the selectedItems listbox. Unfortunately it seems nothing happens. I can add the items using the add command (see commented out code) but I cannot remove them using the remove command either. I've looked at the documentation about select and remove but the examples don't show removing an array of items. What am I doing wrong?

let itemsToSelect = [
{ itemID: 123, itemName: "Item 123" },
{ itemID: 234, itemName: "Item 234" },
{ itemID: 345, itemName: "Item 345" }
];

 

setupListbox(itemsToSelect);

 
 function setupListbox(itemsToSelect) {
        let availableItemsListBox = $('#availableItems').data("kendoListBox");
        let selectedItemsListBox = $('#selectedItems').data("kendoListBox");
        let selectedItems = [];
 
 // Reset the list boxes
 availableItemsListBox._executeCommand("transferAllFrom");
 
// Select the correct items
        $.each(itemsToSelect, function (index, item) {
            var itemID = item.itemID;
            var dataItem = availableItemsListBox.items().find(function (item) {
                return item.itemID === itemID;
            });
 
            if (dataItem) {
                selectedItems.push(dataItem);
            }
        });
        if (selectedItems.length > 0) {
            //selectedItemsListBox.add(selectedItems);
            //availableItemsListBox.remove(selectedItems);
            availableItemsListBox.select(selectedItems);
            availableItemsListBox._executeCommand("transferTo");
        }
    }

If you need it, here is my initial setup of the listbox:

$("#availableItems").kendoListBox({
        connectWith: "selectedItems",
        autoScroll: false,
        dropSources: ["selectedItems"],
        toolbar: {
            position: "right",
            tools: ["transferTo", "transferFrom", "transferAllTo", "transferAllFrom"]
        },
        dataSource: itemsListBoxDataSource,
        template: "<span class='listItemID'>#: data.itemID #</span><span class='listItemName'>#: data.itemName #</span>",
        valueTemplate: "#: itemName #",
        dataTextField: "itemName",
        dataValueField: "itemID",
        add: () => changeListBox("#availableItems"),
        remove: () => changeListBox("#availableItems")
    });
 
    $("#selectedItems").kendoListBox({
        connectWith: "availableItems",
        dropSources: ["availableItems"],
        template: "<span class='listItemID'>#: data.itemID #</span><span class='listItemName'>#: data.itemName#</span>",
        valueTemplate: "#: itemName #",
        dataTextField: "itemName",
        dataValueField: "itemID",
        add: () => changeListBox("#selectedItems"),
        remove: () => changeListBox("#selectedItems")
    });
Angel Petrov
Telerik team
 answered on 19 Feb 2020
13 answers
1.7K+ views

http://demos.telerik.com/kendo-ui/grid/column-menu

Hello,

I have 10 columns(Also to be in column menu) that i need to get from the database, but by default show only 5 of them. 

How can I choose what columns i was to display by default in the grid and others I can hide for the moment unless user selects from column menu?

 

Thanks for the help!

Patrick | Technical Support Engineer, Senior
Telerik team
 answered on 17 Feb 2020
1 answer
1.2K+ views

Hi,

I tried to use Required DataAnnotation on Start and End properties of my viewmodel to validate DateRangePicker.

But seems like it is not working by default.

Any suggestion on validating DateRangePicker control?

Nikolay
Telerik team
 answered on 17 Feb 2020
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
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
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
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
Iron
Iron
Sergii
Top achievements
Rank 1
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?