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
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.
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?
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?
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?
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 :
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
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} }
}
}
}
});
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
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.