Telerik Forums
Kendo UI for jQuery Forum
1 answer
1.4K+ views

First question: Can I have multiple create buttons in a Grid toolbar?

Second question: Can the buttons set the value of a column (string value) based on the button pressed).

 

For example, I am trying to use buttons to control if the person being added is a contractor or an employee.  I have a column in my grid called Type (SwitchPersonType in datasource schema) and I want that column to be set based on the button pressed.  Is this possible?

 

Thank you

Eyup
Telerik team
 answered on 14 Mar 2019
1 answer
5.0K+ views
I have a grid that is successfully fetching my json data.  When the grid loads, the data is present but the paging buttons on the lower left do not work and the grid says "No items to display" on the lower right.  If I change the drop down to change the number of items per page, the grid refreshes and the paging works correctly and the number of records are also displayed.  Any ideas?
Viktor Tachev
Telerik team
 answered on 14 Mar 2019
6 answers
2.4K+ views

I initially would have expected that the dataItems() method would have returned the items in the order that they appear in the list box.  However, the method does not.  Are there any plans to change this?  The best work around I can come up with is

var selectCols = $('#list`).data('kendoListBox');

selectCols.items().map(function(i, e) { return selectCols.dataSource.getByUid($(e).data('uid')); })

Is there a better, more durable approach that leverages public API's?

Thanks.

Alex Hajigeorgieva
Telerik team
 answered on 13 Mar 2019
4 answers
396 views

So if in your column specification you specify Locked:true for example

columns: [
{
field: "OrderDate",
title: "Order Date",
width: 180,
locked: true,
lockable: false,
format: "{0:MM/dd/yyyy}"
},
{
field: "ShipCountry",
width: 180,
lockable: false,
title: "Ship Country"
}

]

then you add in multiple selections so

selectable: "multiple, row",

 

Now if you add your change event like this

 

change: function(e) {
var selectedRows = this.select();
alert(JSON.stringify(selectedRows));
},

 

you will see the length will now be double, IE if you select 1 row then the length of selectedRows is 2 with a duplicate entry,  If you remove the locked:true from the column then it gets it correct at 1.  I am guessing it is creating a duplicate locked column etc.

 I have confirmed this on the online examples just adding in this things.

Is this a known bug?

Is this a new bug?

Do you know a way around this so you can actually tell the accurate elements selected?

Viktor Tachev
Telerik team
 answered on 13 Mar 2019
1 answer
315 views

I have a Kendo listbox with a toolbar that allows sorting (up/down) and delete of a list item. When my listbox has enough items that extends it beyond the view of a mobile device, scrolling down causes the toolbar to scroll off screen. Because of this, if a user wants to move the bottom item of the listbox up, they have to scroll down, select the item, then scroll back up to access the toolbar actions, which makes for poor user experience. How can make the toolbar scroll along with list, or even just duplicate the toolbar at the bottom of the list?

 

 

Alex Hajigeorgieva
Telerik team
 answered on 13 Mar 2019
1 answer
250 views

I am using two listboxes, connected with each other, that allow drag and drop between the two. While using the reorder code found in another thread fixes the issue with reordering items within the same list, it doesn't address the issue when dragging and dropping an item from one listbox to the other. I understand that is because this isn't a "reorder" action, it is a "drop" action. I've tried many different angles, like using the "add" event, but there is no "offset" property in the (e) object.

How can I accomplish the same thing, that is, keep the dropped item in the order it is visually dropped?

Eyup
Telerik team
 answered on 13 Mar 2019
18 answers
1.9K+ views

I cannot understand the following sentence from https://goo.gl/q14C6L very well

The dataSource is designed to work with flat (not nested) data. Defining a 'complex' objects in the schema.model is not supported

For this reason I think there is on schema model the from property which allow to rename / alias data fields ( for example from a foreign remote server )

Yes , but if dataSource doesn't support complex object why :

  1. in the schema.model.<fieldN>.type is present a 'object' type ?
  2. in the grid for example is available dot notation to retrieve in some place a nested value on model ?? es: Category.name - is it not in contrast with previous sentence  ?

Also - What is the role of field.type == object during various operation ?? for example if I have a datasource with a field of type object in a grid, it is normally rendered like a string. How is it related to defaultValue ??

So I cannot understand why  documentation is not coherent

 

Thanks

 

Alex Hajigeorgieva
Telerik team
 answered on 13 Mar 2019
3 answers
9.8K+ views
Hi,

I'm looking for a list in the documentation for Data Source that defines what types of fields can be defined for a configured schema. The code below is from your example here: http://demos.kendoui.com/web/grid/editing-custom.html 

For example: UnitPrice is specified as type "number". Where can I get the list of all these types? 

var dataSource = new kendo.data.DataSource({
                       pageSize: 30,
                       data: products,
                       autoSync: true,
                       schema: {
                           model: {
                             id: "ProductID",
                             fields: {
                                ProductID: { editable: false, nullable: true },
                                ProductName: { validation: { required: true } },
                                Category: "Category",
                                UnitPrice: { type: "number", validation: { required: true, min: 1} }
                             }
                           }
                       }
                    });
Alex Hajigeorgieva
Telerik team
 answered on 13 Mar 2019
1 answer
616 views

 

 

Hello,

I have Kendo Upload control inside kendo modal window ("kendoWindow") in my MVC project. How do I use ajax call to pass uploaded file to server/Controller?

 Thanks  

Ivan Danchev
Telerik team
 answered on 12 Mar 2019
3 answers
4.6K+ views

I am currently debugging some issues we are having with trying to enable the 'All' option for page sizes.  Based on what I've found out, it appears as if the <select> that holds the page size options is setting the value for All to 'All' instead of the total number of records.  Is this how this is supposed to work?

 

Is there a list of common issue with trying to get this to work I can try to look through?

 I can add 

          pageable: {  
                        pageSizes: [ 10,25,50,100,'All' ],  
                        buttonCount: 5, 
                        message: {
                                  empty: 'No Data',
                                  allPages:'All'
                                 }
                          }  , 

This adds an 'All' option, but if you select it nothing happens.

I can add the following to the end of my $(document).Ready()

var pageSizes = [{ text: \"10\", value: 10 }, { text: \"25\", value: 25 }, { text: \"50\", value: 50 }, { text: \"100\", value: 100 },{ text: \"All\", value:" + Data_Table.Rows.Count + "  }];
$('.k-pager-sizes select[data-role=\"dropdownlist\"]').data('kendoDropDownList').setDataSource(new kendo.data.DataSource({ data: pageSizes }));

Which helps, but seems like a hack.

Any advice would be greatly appreciated.

Alex Hajigeorgieva
Telerik team
 answered on 12 Mar 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?