Telerik Forums
Kendo UI for jQuery Forum
2 answers
3.1K+ views

Hi,

I have a table containing 28 dynamically generated KendoUI buttons that represent a 28 day cycle. Im trying to enable and disable them all at once, but only the first button is being affected. Please advise.

//Inialize ALL 'day selection' buttons
$("#table-frequencyWindow-daySelection").find("button.dayButton").kendoButton({
  enable: false
});
 
//Inialize Frequency Selecter as kendo Drop Down List
$("#select-frequencyWindow-frequency").kendoDropDownList({
  change: function(e) {
    var daySelectionTable = $("#table-frequencyWindow-daySelection");
    console.log(daySelectionTable.find("button.dayButton").length) //Prints "28"
 
    if (this.value() == "") {
      daySelectionTable.find("button.dayButton").data("kendoButton").enable(false);
 
    } else {
      daySelectionTable.find("button.dayButton").data("kendoButton").enable(true);
    }
  }
});

Grant
Top achievements
Rank 3
Iron
Iron
Iron
 answered on 13 Aug 2018
5 answers
323 views
We are creating custom widgets that need to look, feel, and perform on-par with Kendo widgets. We've spent a little time in source and found some undocumented methods... like kendo.notify() that appear to play an important role in data binding.

Should or should we not be using these methods as we create our own widgets?


[ kendo.button.js ]

var Button = Widget.extend({
    init: function(element, options) {
        var that = this;

        Widget.fn.init.call(that, element, options);

        ...

        element
            .on(CLICK + NS, proxy(that._click, that))
            .on("focus" + NS, proxy(that._focus, that))
            .on("blur" + NS, proxy(that._blur, that))
            .on("keydown" + NS, proxy(that._keydown, that))
            .on("keyup" + NS, proxy(that._keyup, that));

        kendo.notify(that); // Implementation found in kendo.all.js on line ~11691
    },


[ kendo.all.js ]

kendo.notify = notify;

...

function notify(widget, namespace) {
    var element = widget.element,
        bindingTarget = element[0].kendoBindingTarget;

    if (bindingTarget) {
        bind(element, bindingTarget.source, namespace);
    }
}
Joana
Telerik team
 answered on 10 Aug 2018
2 answers
453 views

Hello for some users they're have a difficult time telling that the k-button is grayed out or disabled, so want to see if there's a way to gray out this button about 30% more when the "isNewBipEnabled" field is equal to "false" and i've attached a word document with snap shots for reference, thanks for any pointers!

 

                <td width="10%">
                    <button class="bip-btn" data-bind="enabled: isNewBipEnabled, click: onNewBip">
<img data-bind="attr: {src: newImgUrl}" style="vertical-align:middle;" />
                        <span style="font-weight:bold;margin-top:2px;">New BIP</span>
                    </button>
                </td>
 
/* <== special effiect when switching between views */
.bip-btn:hover {
    background-color: cadetblue;
}


robert
Top achievements
Rank 1
 answered on 10 Aug 2018
5 answers
3.8K+ views
I'm wondering how to modify the following 'edit' and save: statements/functionality to just show a "Link" title on the button and only have to select the "Link" button once to bring up a hyperlinked page? attached is some more code detail with snap shots, thanks!
 

       { 'command'  : ['edit'], 'title': '&nbsp;', 'width': '180px' }

       data-bind="source: reportDs , events: { save: onSave}"

 
<script type="text/x-kendo-template" id="report-template">
    <h1 style="text-align:center;font-size:24px;color:darkmagenta;">Personnel Security Activity Report</h1>
  
        
    <div class="report-container">
        <div style="margin:5px;">
            <div id="gridAppUsers" data-role="grid"
                 data-columns="[
 
                                {
                                    'title'    : 'Report',
                                    'field'    : 'reportLabel'     
                                                  
                                },
                                {
 
                                    'title'    : 'Report Link',
                                    'field'    : 'reportLink'
 
                                },
                                { 'command'  : ['edit'], 'title': ' ', 'width': '180px' }
                               ]"
                 data-editable="inline"
                 data-sortable="true"
                 data-scrollable="true"
                 data-selectable="single, row"
                 data-bind="source: reportDs , events: { save: onSave}"
                 >
 
            </div>
        </div>
    </div>
robert
Top achievements
Rank 1
 answered on 10 Aug 2018
6 answers
649 views
I noticed that the filter for a foreignkey column is a dropdown and uses the "is equal" or "is not equal" operators.  Is it possible to have the foreignkey column filter to have the option of contains and/or use a combobox?

example column:  c.ForeignKey(p => p.LocationID, (SelectList)ViewData["LocationID_Data"]) .Title("Location").Width(250);

Thanks
Stefan
Telerik team
 answered on 10 Aug 2018
1 answer
111 views

Hi,

Im using KendoUI for PHP. Im trying to to use SAVE STATE functionality by the KENDO manual:

https://demos.telerik.com/kendo-ui/grid/persist-state

...to save the datagrid configuration.

 

The problem is, when I will save state, to JSON string is saved also lists of items related to column ids. When I will save the datagrid configuration, there are saved also the related items. Next, when I rename some of the list item in the database, the change is not displayed, because all list items was saved and loaded from JSON save state configuration.

 

Is it possible to solved this problem (for example do not save the lists items into JSON, or another solution)?

Konstantin Dikov
Telerik team
 answered on 10 Aug 2018
2 answers
309 views

Hello,

I am using a Kendo DateTimePicker in an ASP.Net Core 2 project. The DateTimePicker shows the date properly just in a wrong (probably default) format.

The data is coming from the controller in Json format. The server side object is simple C# DateTime.

The shown date is: http://prntscr.com/kgdnwe
The wished format is for example: yyyy/MM/dd hh:mm

The code of the DateTimePicker:

                        @(Html.Kendo().DateTimePicker()
                              .Name("tbM1Added")
                              .Format("yyyy/MM/dd hh:mm tt")
                              .ParseFormats(new string[]{ "yyyy/MM/dd", "hh:mm tt" })
                              .HtmlAttributes(new { style = "width: 100%" })
                              )

The js code:

        document.getElementsByName("tbM1Added")[0].value = selectedUser.M1Added;

When I write it on the console it shows:

Fri Oct 20 2017 23:11:50 GMT+0200 (Central European Summer Time)

Can you give me any idea how to achieve the desired datetime format? 

 

Tegu
Top achievements
Rank 1
 answered on 09 Aug 2018
1 answer
172 views

Hi,

I adds a DATE column (created date of the record) into KendoUI grid, but the database format of column is DATETIME, because, I need to know also time. Problem is, when Im using filtering functionality, because when I would like to filter this column to date = for example 2018-08-08 and Im sure, that some records was created on this day, datagrid do not fond nothing. Its because, the datagrid is searching for 2018-08-08 00:00:00 and no record exists with a zero time.

 

Is there any way to solve this problem in datagrid or, there is needed to create two columns in the database, one as a DATETIME and second as a DATE. I have problem also with the WEEK number (I opened another discussion thread). If I need to add also the week number, I need to have 3 columns in the database for one information: DATETIME, DATE, WEEK. I think, its poor solution. Do you have any other ideas?

 

Thanks for help.

Tsvetina
Telerik team
 answered on 09 Aug 2018
8 answers
221 views

When dragging a cell value downwards, if a row is hidden, the value inside that row is also changed. Is there any way to disable this so that it acts more like Excel (Which ignores hidden rows when dragging values)

Thanks
Marc

Veselin Tsvetanov
Telerik team
 answered on 09 Aug 2018
1 answer
244 views

I have grid and chart ,they are using the same datasource,my data-source is coming from a ajax call,im not using my datasource like:

dataSource: {

serverFiltering: true,

transport: {

read: { url: "https://demos.telerik.com/kendo-ui/service/StockData", dataType: "jsonp"},

parameterMap: function(data) {

return { filter: JSON.stringify(data.filter) };}}, schema: stockDataSchema },

 

i just do a ajax call:

 

 $.ajax({
               dataType: "json",
               type: "POST",
               url: "@Url.Action("Controller","View")",
               contentType: "application/json; charset=utf-8",
               data: JSON.stringify({ "parameters}),
                   success: function (result) {

// I USE THE RESULT AS A DATASOURCE OF MY CHART AND GRID,DIRECTLY

 

}};

now,what i want is ,when i click on grid item to be sorted,chart should be sorted accordingly ,how should i achieve this?

 

 

 

Tsvetina
Telerik team
 answered on 09 Aug 2018
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?