Telerik Forums
Kendo UI for jQuery Forum
1 answer
477 views
Is it possible to only have the dropzone visible and hide the "choose file" button?
Dimitar
Telerik team
 answered on 06 Apr 2018
3 answers
385 views

Hi, 

So as my title says, Im trying to extract some options from the scheduler widget, namely the 'workDayStart' and 'workDayEnd' date/times. The reason being is that if an existing appointment is outside the work times, I'd like to auto display the full day instead of just working hours.
Which brings me to the next issue, is there a way to programmatically change the 'showWorkHours' config?

Thanks and kind regards,
Grant

Ivan Danchev
Telerik team
 answered on 06 Apr 2018
2 answers
5.9K+ views
I understand that that is a lot of data to present at once. I tried paging and virtual scrolling and the performance is still very slow. I have the data inside a kendo datasource, that portion performs like a charm. The performance decreases drastically when I assign that dataSource to my grid. The lines are formatted via kendo row templates. Even after I load the grid initially and I move elsewhere and come back; the grid takes forever to show up even thought data is not being populated and "show" is just occurring. I am afraid I am going to have to use slickGrid...was really wanting to be able to use the Kendo functionality throughout. Any ideas? Sorry this is not a specific question, but a general guidelines request.
johnbolt
Top achievements
Rank 2
Iron
Iron
 answered on 05 Apr 2018
5 answers
318 views
Greetings,

Will the drag range feature (available in the telerik asp.net ajax) be added to the Kendo slider widget? Thanks.

RA
Dimitar
Telerik team
 answered on 05 Apr 2018
1 answer
340 views

We have a very large datastore connected to a kendo grid, so it's important that the DataSourceRequest object is translated to the sql for server paging, filtering, etc.

One issue is that the datastore stores employee ids and we want to display their names and have a checkbox filter datasource that shows all unique names (not just the names from the paged views).

I have this all working but I'm currently hijacking the DataSourceRequest and manually parsing through and converting the FIlterDescriptor objects from the display names to the ids in the database.

I've done plenty of wrangling trying to get this all to work with client templates to no avail.

Here's a code snippet that represents what I'm doing. Is there a better approach?

 

 

<p>public JsonResult GetAssets([DataSourceRequest] DataSourceRequest request)
{
    var assetQuery = _assetRepository.GetAllKendoReadOnly();
    request = ToAssetDataSourceRequest(request); //converts filters from name to id
    var assets = assetQuery.ToDataSourceResult(request, ToAssetViewModel); //ToAssetViewModel populates names from ids
    return Json(assets, JsonRequestBehavior.AllowGet);
}
  private DataSourceRequest ToAssetDataSourceRequest(DataSourceRequest request)
{
    if (request.Filters != null && request.Filters.Any())
    {
        foreach (var iFilter in request.Filters)
        {
            ConvertFilter(iFilter);
        }
    }
  
    return request;
}
  private void ConvertFilter(IFilterDescriptor descriptor)
{
    switch (descriptor)
    {
        case FilterDescriptor filterDescriptor:
            ToConvertedDescriptor(filterDescriptor);
            break;
        case CompositeFilterDescriptor compositeFilterDescriptor:
            foreach (var compositeFilter in compositeFilterDescriptor.FilterDescriptors)
            {
                ConvertFilter(compositeFilter);
            }
            break;
    }
}
  private void ToConvertedDescriptor(FilterDescriptor filter)
{
    switch (filter.Member)
    {
        case "OnwerName":
            filter.Member = "OwnerEmployeeNumber";
            filter.Value = GetEmployeeNumber(filter.Value.ToString());
            break;
        case "CustodianName":
            filter.Member = "CustodianEmployeeNumber";
            filter.Value = GetEmployeeNumber(filter.Value.ToString());
            break;
        case "UserName":
            filter.Member = "UserEmployeeNumber";
            filter.Value = GetEmployeeNumber(filter.Value.ToString());
            break;
    }
}</p><p></p>
Konstantin Dikov
Telerik team
 answered on 05 Apr 2018
2 answers
334 views
EDIT: solved by setting the width first.
    


function addCellClickEventListener()
{
     var grid = $('#grid').data('kendoGrid');
     $(grid.tbody).on('click',"> tr:not(.k-grouping-row, .k-detail-row, .k-group-footer) td.dow", function(){

      // get some additional data from the server based on values from the row to
      // which the clicked-on cell belongs -- works OK -- reference to grid is valid
        .
        .
        .
        var windowObject = $("#messagewindow").data("kendoWindow").open();

        // windowObject is undefined

         });
}
           

Ivan Danchev
Telerik team
 answered on 05 Apr 2018
9 answers
417 views

StockChart do not display last item from dataSource when changing selection of navigation in javascript code. Currently I'm using 2016.1.412 but this is the same problem with latest version. After setting navi.selection.set function chart navigation is expanding but not displaying last element from the array.

My code is working fine with kendo 2014.2.1008 but not with 2016.1.412

var lastItem = {"Date":"2018-03-20T00:00:00.000Z","Open":99.95,"High":109.9,"Low":92.7,"Close":92.7,"value":92.7,"volume":828222,"oi":0};
      var chartModel = [        
{"Date":"2018-03-18T00:00:00.000Z","Open":90.15,"High":94,"Low":90.15,"Close":90.95,"value":90.95,"volume":200082,"oi":0},
{"Date":"2018-03-19T00:00:00.000Z","Open":90.2,"High":100,"Low":90.2,"Close":100,"value":100,"volume":281,"oi":0},
{"Date":"2018-03-20T00:00:00.000Z","Open":99.95,"High":109.9,"Low":92.7,"Close":92.7,"value":92.7,"volume":828222,"oi":0}
      ];
      
      $("#stock-chart").kendoStockChart({
        dataSource: {
          data: chartModel
        },
        title: {
          text: "The Boeing Company \n (NYSE:BA)"
        },
        dateField: "Date",
        series: [{
          type: "candlestick",
          openField: "Open",
          highField: "High",
          lowField: "Low",
          closeField: "Close"
        }],
        navigator: {
          series: {
            type: "area",
            field: "Close"
          }
        }
      });

      $("#set").click(function setSelection() {
        var chart = $("#stock-chart").getKendoStockChart();
        var navi = chart._navigator;
        
        chart.dataSource.data(chartModel);
        
        if (navi) {
          navi.selection.set(
            new Date(chartModel[0].Date),
            new Date(chartModel[chartModel.length - 1].Date)
          );

          if (navi._selectEnd) {
            navi._selectEnd();
          }
          
          chart.dataSource.data(chartModel);
        }
      });
      
      setInterval(function(){ 
        lastItem.Date = new Date(lastItem.Date).setDate(new Date(lastItem.Date).getDate() + 1);
        chartModel.push(Object.assign({},lastItem));
      }, 3000);

 

Stefan
Telerik team
 answered on 05 Apr 2018
1 answer
299 views

Hello, I'm struggling with a small issue:
I have a weekly grouped scheduler and I'm trying to hide the 12:00 to 14:00 time slot.
I've tryed to hide bu css:
    .k-scheduler-content tr:nth-child(5),
    .k-scheduler-content tr:nth-child(6),
    .k-scheduler-times .k-scheduler-table tr:nth-child(5),
    .k-scheduler-times .k-scheduler-table tr:nth-child(6) {
        display:none;
    }

I've tryed to delay the hiding in the databound event but something is not working correctly, some events are shifted in the wrong time slot and the drag&drop is not working correctly.

Is there a easy way to hide a specific time row?

 

Neli
Telerik team
 answered on 05 Apr 2018
1 answer
398 views

Hi,
I wonder if there is any way to include in a dropzone container a functionality of uploading a file
by clicking on it? In other words keep two functionalities in one place.

I'll leave here the dojo sandbox for reference  https://dojo.telerik.com/iFEriwoK

Best regards,

Emanuele

Ivan Danchev
Telerik team
 answered on 05 Apr 2018
3 answers
372 views

I have a scheduler with the following code for moveEnd

moveEnd: function (e) {
    //For Work Managers this code will give the option to clone or move when an event is moved.
   if ($WorkManager == 'true') {
          e.preventDefault();
          eventHolder = e;
          var dialog = $("#schedulerWindow").data("kendoWindow");
          dialog.center();
          dialog.open();
     }
},

 

The dialog has just two buttons CLONE which has an onclick function of onClone() and MOVE which has an onclick function of onMove(). These functions are listed below.

function onClone() {
        var dialog = $("#schedulerWindow").data("kendoWindow");
        var scheduler = $("#scheduler").data("kendoScheduler");
        dialog.close();
        var copy = eventHolder.event.toJSON();
        copy.start = eventHolder.start;
        copy.end = eventHolder.end;
        copy.RID = -1;
        delete copy.uid;
 
        scheduler.dataSource.add(copy);
        scheduler.dataSource.sync();
        eventHolder = null;
    }
 
    function onMove() {
        var dialog = $("#schedulerWindow").data("kendoWindow");
        var scheduler = $("#scheduler").data("kendoScheduler");
        dialog.close();
        eventHolder.event.set("start", eventHolder.start);
        eventHolder.event.set("end", eventHolder.end);
        scheduler.dataSource.sync();
        eventHolder = null;
    }

 

This was fine when you could only select one event at a time. The latest version of the code will allow the use of Ctrl Click to select several events

If I select several events and try and clone or move only the last clicked event is cloned/moved. What changes to the Clone and Move functions do I need to make for this to work with one or more selected events.

Thanks

Veselin Tsvetanov
Telerik team
 answered on 03 Apr 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
ScrollView
Switch
TextArea
BulletChart
Licensing
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
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
SegmentedControl
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?