Telerik Forums
Kendo UI for jQuery Forum
1 answer
144 views

Hi, 

We do have a kendo scheduler bound to a remote data source.

The "transport" configuration of this scheduler's data source is done using remote urls (for CRUD), and this works perfectly,

On the server side, we make a lot of checks. So if some requirements are missing, Create, Update or event Destroy operations wouldn't pass and user will be shown the meaningful error.

The problem we're facing now is like the following :

For the Destroy action, what kind of response should we send back (from the server)  to the scheduler component (in the browser on the client side )  to prevent removal of events in the UI?

We've tried :

  • Sending back HTTP 500 status code
  • Putting an error field in the response and linking it to the schema.error configuration

But events are still removed from the UI, nevertheless the error event is fired. We even use this event to notify errors to end used.

Thank you.

Neli
Telerik team
 answered on 02 May 2022
1 answer
127 views

Hi everyone, I would like to ask for your help.
I would like to hide the SubItems when the drawer is in mini mode, if I click on each element.

Thanks in Advance

https://dojo.telerik.com/ejapuWiB/3

Dayan K

 

Nikolay
Telerik team
 answered on 02 May 2022
1 answer
658 views

Error: kendo.all.js: 63203 Uncaught TypeError: Cannot read properties of undefined (reading 'bbox')

I´m trying export to same pdf a few circular gauges and a grid

similar than:
<div id="pdf-export-container">
      <div id="gauges"></div>
      <div id="grid"></div>
</div>
<script>
    $("#gauges).load("/templates/gauges")
    $("#grid).load("/templates/grid")
    
    kendo.drawing.drawDOM($("#pdf-export-container"))
    .then(function(group) {
        return kendo.drawing.exportPDF(group, {});
    })
    .done(function(data) {
        kendo.saveAs({
            dataURI: data
        });
    });
</script>

Patrick | Technical Support Engineer, Senior
Telerik team
 answered on 28 Apr 2022
1 answer
122 views

I am using Kendo UI for JQuery and need to create a data-bound Kendo menu. By data bound, I mean that the items need to be data bound to an array property of a Kendo observable. The issue is that it appears that MVVM binding messes up formatting and functionality of the items. Here is my code (based on the example found in Kendo's documentation) :

 


<div id="example">
<div class="demo-section k-content">
    <div>
        <h4>Select an item</h4>
        <ul  data-role="menu"
            data-bind="events: { select: onSelect },
                        visible: isVisible"
            style="width: 100%;">
            <li>
                Products
                <ul data-template="menu-item-template" data-bind="source: items">
                </ul>
            </li>
        </ul>
    </div>
</div>

<script id="menu-item-template" type="text/x-kendo-template">
  <li data-bind="text: text"></li>
</script>

<script>
    var viewModel = kendo.observable({
        isVisible: true,
        items: ["Product1", "Product2", "Product3"],
        onSelect: function (e) {
            var text = $(e.item).children(".k-link").text();
            kendoConsole.log("event :: select(" + text + ")");
        }
    });
    kendo.bind($("#example"), viewModel);
</script>
<style>
    .demo-section .box-col li {
        margin-bottom: 0;
    }
</style>

The result of executing this code looks like this:

enter image description here

Notice how the formatting of the items is messed up (no margins, etc.).

 

Do you know what's the proper way to combine data binding and Kendo menu?

 

Thank you!

Martin
Telerik team
 answered on 27 Apr 2022
1 answer
135 views

Hi, i have a grid which when creating an new element, the back-end verify if all the user data is correct and saves it in the db. Instead, if it have some errors will return which field has the error and the message about why failed.

My question is, how can i show this message like it was a validation? Like the required validation with the yellow tooltip above the cell (see image below)

My grid is in "inline" editing mode.

 

Thanks for your help!

Neli
Telerik team
 answered on 27 Apr 2022
1 answer
101 views

How setup griid column in jquery.

I use this format, bit on input I get a date on the dropdown, not the time to chose

I need just the the time part, the date part is from "dataIni" field.

Another issue is the inline errors. I get error on field "hIni1" not on "Inicio 1"

                   $("#horarios").kendoGrid({
                        height: 550,
                        sortable: true,
                        pageable: true,
                        height: 550,
                        toolbar: [{ name: "create", text: "Inserir" }],
                        columns: [
                            { field: "dataIni", type: "date", format: "{0:yyyy-MM-dd}", title: "Data Inicio", width: "250px" },
                            { field: "hIni1", type: "date", format: "{0:HH:mm}", title: "Inicio 1", width: "120px" },
                            { field: "hFim1", type: "date", format: "{0:HH:mm}", title: "Fim 1", width: "120px" },
                            { field: "hIni2", type: "date", format: "{0:HH:mm}", title: "Inicio 2", width: "120px" },
                            { field: "hFim2", type: "date", format: "{0:HH:mm}", title: "Fim 2", width: "120px" },
                            { command: ["edit", "destroy"], title: "&nbsp;", width: "250px" }
                        ],
                        editable: "popup" // OR editable: { mode : "popup" }
                    });

Best regards

Sergio

 

Neli
Telerik team
 answered on 27 Apr 2022
0 answers
118 views

Hey all,

I'm fairly new to kendo and have a bit of an problem ->

I'm currently troubleshooting a weird issue in version 2019.1.220.  I'd love to upgrade but its not feasible for this project at this time.

Basically, what is going on is that we're seeing some weird behavior with the Combobox control after databind.  Data comes from the database and is set in the control.  When the Arrow (Open button) is clicked its almost as though it doesn't do a read on the datasource because I get the No items found message.  However, if I change the selected text on the control it will do a pop open and locate the item in the list.

While trying to solve this with a work around I have tried to subscribe to the click event on the control and force a search function call in Kendo using the following:

    $(document).ready(function () {
        var itemCombo = $("#Items").data("kendoComboBox");
        itemCombo.input.on("click", function () {
            itemCombo.search(itemCombo.text);
        });
    });

This does seem to force a search to run on click of the control - however the arrow button on the control still does what it did before - not read the list or search for the item.  Does anyone have any quick tips on how i can access the click event on the arrow button itself?  The Open event isn't a good option - if I call .search on that it will cause an endless loop activity.

I'm sure this has been solved already in later versions but upgrade is not an option at this time.

Appreciative of any pointers!  Thanks!

Donald
Top achievements
Rank 1
 asked on 26 Apr 2022
1 answer
144 views

Hi guys,

I've implemented virtualization over a dropdown which has a lot of items/rows (more than 3k) so I went with this approach. The issue now is that the dropdown always selects the first option no matter if i specify the value in any way. Any advices or any guide to fix this?

 

Best regards.

Martin
Telerik team
 answered on 26 Apr 2022
1 answer
130 views
I am using the grid and need to be able to programmatically select a specific row based on the value of one field, and then scroll to that row if it isn't already visible. I can't find any way of doing that. If it matters, I'm not using paging. Is there a way to do this?
Nikolay
Telerik team
 answered on 25 Apr 2022
0 answers
60 views

what is actual behavior
Default kendo UI behavior is like we need to render all the grid data once to activate pagination functionality if pageSize <= actual records then and then the only pagination will active but if we got pageSize > actual records the pagination won't work.

what is expected behavior
I need to set pageSize = 50 and API return me 50 records with total records field so, for now, we can assume that API return total 50 records and it has fields to indicate total records which let's say 200 so pagination will set accordingly [ 200 (total) / 50 (pageSize) = 4 page ] and pagination will active also with the pageSize <= actual logic and we can call separate API call for next 50 records after we click on next button which is been created on total records.

constructor( private router:Router,private httpclient:HttpClient,private EncrDecr:EncrDecrServiceService) {
    this.GetUserList();
   }
    modeldata:any={
    UserName:'',
    UserEmail:'',
    IsActive:'',
    sortable:true,
    PageSize:this.pageSize,
    PageNumber:this.pageNumber,
    SortParam:this.sortColumn,
    sortType: this.sortType
   };
   GetUserList(){
     
    this.httpclient.post(this.baseUrl+'UserDetail/GetAllGridData',this.modeldata).subscribe(res=>{
      this.gridList = res;
      this.gridData=this.gridList['Result'];
      this.items= this.gridData;
    },(error)=>{
      const err= error.error;
    })
   }
  breadCumb(){
    this.router.navigate(['/Home']);
  }
  newUser(){
    this.router.navigate(['/ManageUser']);
  }
 
  pageChange(event: PageChangeEvent): void {
    this.skip = event.skip;
    this.loadItems();
  }
  loadItems(): void {
    this.gridData = {
      data: this.items.slice(this.skip, this.skip + this.pageSize),
      total: this.items.length,
    };
  }
  public sort: SortDescriptor[] = [
    {
      field: "UserName",
      dir: "asc",
    },
  ];
  public sortChange(sort: SortDescriptor[]): void {
    this.sort = sort;
    this.modeldata.sortType= sort[0].dir;
    this.modeldata.SortParam=sort[0].field;
    this.GetUserList();
    this.loadProducts();
  }
 
   loadProducts(): void {
    this.gridData = {
      data: orderBy(this.gridData, this.sort),
      total: this.gridData.length,
    };
  }
 
  ngOnInit(): void {
    this.gridData = this.loadItems();;
   
   
  }

 

Sanjay
Top achievements
Rank 1
Iron
 asked on 22 Apr 2022
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
Date/Time Pickers
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)
SPA
Filter
Drawer (Mobile)
Drawing API
Globalization
Gauges
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
OrgChart
TextBox
Effects
Accessibility
ScrollView
PivotGridV2
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Collapsible
Localization
MultiViewCalendar
Touch
Breadcrumb
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
Popover
DockManager
FloatingActionButton
TaskBoard
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
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?