Telerik Forums
Kendo UI for jQuery Forum
1 answer
156 views

Hi All.

I have a funny issue.

I am building kendo grid and set filtrable options.operators for number/integer column but the options are ignored and set to defaults, however same options for string liters are respected. UI element set for the integer type is respected as well. 

 

this how I build column

 

column.filterable = {
ui(element) {
element.kendoNumericTextBox({
format: '####',
decimals: 0,
});
},
operators: this.commonService.gridFilterNumberOperators.operators
};
} else if (
column.filterType != undefined &&
lstDateFields.indexOf(column.applicationDataType) > -1 &&
lstDateFields.indexOf(column.filterType.toLowerCase()) > -1
) {
column.filterable = {
ui(element) {
element.kendoDatePicker({
format: 'MM/dd/yyyy',
});
},
};
} else if (
column.filterType != undefined &&
column.filterType.toLowerCase() === 'string'
) {
column.filterable = this.commonService.gridFilterStringOperators;
}

options for integer column

option for string 

this how I initialize grid

 

kendo.jQuery(this.gridConfigurationTemplate.nativeElement).html('');
this.gridConfigurationTemplate.nativeElement.innerHTML = '';

kendo
.jQuery(this.gridConfigurationTemplate.nativeElement)
.data('kendoGrid')
.setOptions(options);

//this.bindTooltipForDispatcherGrid();
grid = kendo
.jQuery(this.gridConfigurationTemplate.nativeElement)
.data('kendoGrid');
grid.dataSource.page(1);
Georgi Denchev
Telerik team
 answered on 28 Sep 2021
1 answer
187 views

Hi Team,

is it possible to limit to what is the max width to which user can resize a column, such that the column does not go beyond the visible area and does not introduce scrollbar.

i know that scroll and resize goes hand in hand and hence i am not able to make that work.

any help here is appriciated.

Nikolay
Telerik team
 answered on 28 Sep 2021
1 answer
2.2K+ views

Hi Team.

 

is there a way i can change the styling of the placeholder(optionLabel) text for kendoDropDownList ?

 

thanks

Patrick | Technical Support Engineer, Senior
Telerik team
 answered on 27 Sep 2021
0 answers
180 views

Hi Team,

 

how can I connect a label to color-picker using "for" attribute? currently even though its linked, screen reader(accessibility) does not read the label for color-picker.

appreciate any help.

ashutosh
Top achievements
Rank 1
Iron
Veteran
 asked on 27 Sep 2021
1 answer
574 views

I have a grid use Kendo Grid. When i custom edit event and add event to input in edit mode like this

edit: function (e) {
                        if (e.container[0]) {
                            var cell = e.container[0]
                            $rootScope.rowToFocus = angular.element(cell).closest('tr').index();
                            $rootScope.colToFocus = e.sender.cellIndex(angular.element(cell).closest('td'));
                            if ($rootScope.rowToFocus != 0 || $rootScope.colToFocus != 0) {
                                $rootScope.gridToFocus = e.sender;
                                e.container.find("input").on("keydown", function (ev) {
                                    if (ev.which == 9 || ev.which == 13) {
                                        $rootScope.isKeyboard = true;

                                        ev.preventDefault();

                                     }  
                                })
                            }
                            else {
                                $rootScope.rowToFocus = undefined;
                                $rootScope.colToFocus = undefined;
                            }
                        }
                    }, 

So i prevented default of tab event but aslo prevent update the data i input in this... Please help me a solution to prevent tab event in my input and still raise the update data event when i leave this cell.

Georgi Denchev
Telerik team
 answered on 27 Sep 2021
1 answer
88 views

Hello, I have detail row that appears perfectly, except when the master row is at the bottom of the container (or screen).  The detail row still opens, but requires scrolling to see it.

How can I auto scroll far enough to get the detail row to show, when the detail row is outside of the bounding container or screen?

Thanks.

Georgi Denchev
Telerik team
 answered on 24 Sep 2021
2 answers
974 views

We have a use case where users are choosing which values they'd like to concatenate together, from a list of options.

At times, they may need to concatenate the same thing more than once

Kendo's multiselect seems like the best component for this

... but I'm getting stuck on customizing it's behavior to allow the same value to repeat, when CTRL + CLICK takes place.

  • click - should add/remove choices per the usual
  • CTRL + CLICK should push the choice onto the multiselect, regardless if the multiselect already has that choice
    • Observe whether or not CTRL has been engaged
    • rewrite normal deselect handler to honor the required CTRL + CLICK behavior

Things are very close to working, but am unable to get the MultiSelect to dynamically update its value correctly, using Kendo's value() method.

 

Offending line of code attached in screenshot

and sample Dojo here -> https://dojo.telerik.com/ELeligEY/14


Am I missing something w/ Kendo's API? Should I be approaching this with a different Kendo component? 


UPDATE: from scrounging the forums, it appears an underlying architectural design means MultiSelect inherits from something that does not allow repeating values? https://www.telerik.com/forums/allow-duplicate-items

Help with this feature request would be much appreciated.
https://feedback.telerik.com/kendo-jquery-ui/1359475-allow-select-items-in-multiselect-multiple-times

Or guidance on how one might customize the Kendo Multiselect to achieve this kind of use case.

Help much appreciated.

Caleb
Top achievements
Rank 1
Iron
 answered on 24 Sep 2021
0 answers
79 views

I have a TreeList and a connected ContextMenu.   The context menu shows correctly the first time only when clicking on a TreeList row.  After that however, no matter where I right-click on the page, the context menu is displayed.


@(Html.Kendo().ContextMenu()
    .Name("orgtreemenu")
    .Target("#OrganizationTreeMaintenance")
    .Orientation(ContextMenuOrientation.Vertical)
    .Filter(".k-grid-content table tbody tr[role='row']")
    .Events(e => e
        .Open("orgContextMenuOpen")
        .Select("orgTreemenuSelect")
    )
    .Items(items =>
    {
        items.Add()
            .Text("Add Organization")
            .HtmlAttributes(new { @id = "addorgaction" })
            .Enabled(true);
        items.Add()
            .Text("Edit Name")
            .HtmlAttributes(new { @id = "editorgnameaction" })
            .Enabled(true);
        items.Add()
            .Text("Delete Organization")
            .HtmlAttributes(new { @id = "deleteorgaction" })
            .Enabled(true);

        items.Add()
            .Text("Move Organization")
            .HtmlAttributes(new { @id = "moveorgaction" })
            .Enabled(false);
    }))
@(Html.Kendo().TreeList<UserStatViewModel>()
    .Name("OrganizationTreeMaintenance")
    .Columns(columns =>
    {
        columns.Add().Field(e => e.OrganizationName).Width(300);
        columns.Add().Field(e => e.OrganizationId).Hidden(true);
        columns.Add().Field(e => e.TotalUserCount).Title("Users");
        columns.Add().Field(e => e.TotalDeviceCount).Title("Devices");
        columns.Add().Field(e => e.LicensedUserCount).Title("Licenses");
    })
    .Sortable()
    .HtmlAttributes(new { style = "height:500px;" })
    .Events(e => e
        .DataBound("onDataBoundLicenseTree"))
    .DataSource(dataSource => dataSource
        .Read(read => read.Action("GetOrgLicenseDetails", "home"))
        .ServerOperation(false)
        .Model(m =>
        {
            m.Id(f => f.OrganizationId);
            m.ParentId(f => f.ParentOrgId).DefaultValue(0);
            //           m.Expanded(true);
            m.Field(f => f.OrganizationName);
            m.Field(f => f.TotalDeviceCount);
            m.Field(f => f.ParentOrgId);
        })
    ))

I have tried modifying the Filter on the context menu to no avail.  Hoping someone can see something obvious.

Thanks and regards,

Eric Katz

Eric
Top achievements
Rank 1
 asked on 23 Sep 2021
1 answer
560 views

Hi team, 

I was able to generate the model and columns and grid dynamically using the articles

Adding to this I want to add a column to the front of the grid with a checkbox against each row. 

I need to add a master checkbox in that column, which can select all of the rows if grid.

How do I achieve this? I tried, but I am not able to have the column visible.

Please help!.

 

Thanks

 

Martin
Telerik team
 answered on 23 Sep 2021
1 answer
503 views

Using a "destroy" command in the datagrid and "autoSync: false", it somehow calls the "destroy" twice. Any idea if I'm doing something wrong? When I set autoSync to true, it only fires once.

The following config gives me:

destroy
destroy
success
success
destroy: (options) => {
    console.log("destroy");
    $.ajax({
        url: $discountProductsGrid.data("delete-url"),
        dataType: "json",
        contentType: 'application/json',
        type: "POST",
        data: kendo.stringify({
            discountNumber: options.data.discountNumber,
            productNumber: options.data.productNumber,
            productColorId: options.data.productColorId,
            productSizeId: options.data.productSizeId,
        }),
        success: (result) => {
            console.log("success");
            options.success(result);
        },
        error: (result) => {
            console.log("error");
            options.error(result);
        },
    });
},

I do have sorting, filtering, and paging on the server, though I don't expect that to matter.

My model isn't very complicated and I've verified that there are no double IDs. At first I was thinking that perhaps the response body was incorrect, but that shouldn't be a problem because it fires the same destroy twice and doesn't wait for the first destroy to finish.

kendo.data.Model.define({
    id: "discountLineId",
    fields: {
        discountLineId: {type: "string"},
        discountNumber: {type: "number"},
        productSupplierName: {type: "string"},
        productCategoryDescription: {type: "string"},
        productNumber: {type: "number"},
        productId: {type: "string"},
        productDescription: {type: "string"},
        productColorId: {type: "string"},
        productColorDescription: {type: "string"},
        productSizeId: {type: "string", nullable: true},
        productSizeDescription: {type: "string", nullable: true},
        discountSalesPrice: {type: "number"},
        productSalesPrice: {type: "number"},
        discountSalesPricePercentage: {type: "number"},
    }
})
The method I use for saving:
$discountLineGrid.on("click", ".k-grid-save-changes", (e) => {
    e.preventDefault();

    discountLineGrid.saveChanges();

    // sync also firesd 
    // discountLineDataSource.sync();
});

I've verified inside the data source (in the range part), that the data is only 19 and that only the one record is that has to be deleted is still in the prestine data or whatever that is.
Martin
Telerik team
 answered on 23 Sep 2021
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
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
ScrollView
Switch
BulletChart
Licensing
QRCode
ResponsivePanel
TextArea
Wizard
CheckBoxGroup
Localization
Barcode
Breadcrumb
Collapsible
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
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?