Telerik Forums
Kendo UI for jQuery Forum
12 answers
2.0K+ views
Hi,
Is it possible to add built in Multiselect Drop-down in kendo grid. I have attached a sample snap shot of the problem.

Alexander Popov
Telerik team
 answered on 27 Feb 2014
1 answer
332 views
I've been doing alot of searching but haven't found a clear answer for this. I have a set up textboxes that and a submit button and a Kendo UI grid. I want to post the data to the grid's datasource so that it will return the results based on the criteria. I am not using the MVC wrappers.

I've gotten closer but I can't seem to get the datasource to send the post data when I click submit. I've debugged and in my $("#fmSearch").submit it is hitting the jquery plugin and I've confirmed that it is converting the form data to JSON properly, but it seems as though it it not sending the updated information to the server so that the Action can read it.

JavaScript
var dsGalleryItem = new kendo.data.DataSource({
        transport: {
            read: {
                url: '@Url.Content("~/Intranet/GalleryItem/SearchGalleryItems")',
                type: "POST",
                data: $("#fmSearch").serializeFormToJSON(),
                cache: false
            }
        },
        schema: {
            model: {
                id: "galleryItemID",
                fields: {
                    galleryItemID: {
                        nullable: true
                    },
                    imageName: {},
                    collectionName: {},
                    categoryName: {},
                    lastUpdatedOn: { type: "date" }
                }
            }
        }
    });
 
 
 
 
    var gvResults = $("#gvResults").kendoGrid({
        autoBind:false,
            columns: [{
                field: "imageName",
                title: "Item Name",
                template: "<a href='@Url.Content("~/Intranet/GalleryItem/Details/")#=galleryItemID#'> #=imageName#</a>"
            }, {
                field: "collectionName",
                title: "Collection"
            }, {
                field: "categoryName",
                title: "Category"
            }, {
                field: "lastUpdatedOn",
                title: "Last Updated",
                format: "{0:M/d/yyyy}"
            }
            ],
            selectable: "row",
            change: onRowSelect,
            dataSource: dsGalleryItem
        });
 
 
 
 
 
 
    $("#fmSearch").submit(
        function (event) {
            event.preventDefault();
            dsGalleryItem.read({ data: $("#fmSearch").serializeFormToJSON() });
    });

MVC Action
[HttpPost]
    public JsonResult SearchGalleryItems(string keyword, int? category, int? collection, DateTime? startDate, DateTime? endDate)
    {
 
        var galleryItemList = (from g in db.GalleryItems
                               //where g.imageName.Contains(keyword)
                               select new GalleryItemViewModel
                               {
                                   galleryItemID = g.galleryItemID,
                                   imageName = g.imageName,
                                   collectionName = g.collection.collectionName,
                                   categoryName = g.category.categoryName,
                                   lastUpdatedOn = g.lastUpdatedOn
                               });
 
        var galleryItemCount = Json(galleryItemList.ToList());
 
        return Json(galleryItemList.ToList()); ;
    }

The action is not setup to retrieve different data right now. I am just using the debugger so that I can see that it is getting the values .

The controller is called. But the postdata is not being sent to it. Example: I have a dropdown that defaults to 1. When the page is loaded the 1 gets sent to the controller as category. Debug shows its value as 1. I enter a keyword into the a text box and hit submit but the keyword never gets there. The category is still sent as 1 though. Its like it is posting the old data and never posting the new data from the form.
Nikolay Rusev
Telerik team
 answered on 27 Feb 2014
1 answer
1.0K+ views
1) http://jsfiddle.net/3ML7s/3/
now uncomment data  {text: "Item", value:"2"},
when I select vocabulary item I open a popup window
which inserts new value into dropdown and closes it, for simplicity, 'showModalDialog' replaced here by 'alert'

2) now comment data  {text: "Item", value:"2"},
when there no real items (just 'empty' and 'vocabulary') I need to open vocabulary immideatly
when popup closes dropdown widget stays still open
but I need mimic 1):
close dropdown and switch to empty item

How can I do this?
Alexander Valchev
Telerik team
 answered on 27 Feb 2014
5 answers
508 views
http://jsfiddle.net/ruchan/AgV52/1/

Problem replication:
-click "Init List" and then add new tag to the box by keyboard.
-now click fill List button [it fills "1,2,3" as selected values].
- All the values are not being selected. or sometimes only last value is selected
var list=[{label:'tag1', value:'1'},
         {label:'tag9', value:'9'},
         {label:'tag8', value:'8'},
         {label:'tag7', value:'7'},
         {label:'tag6', value:'6'},
         {label:'tag5', value:'5'},
         {label:'tag4', value:'4'},
         {label:'tag3', value:'3'},
         {label:'tag2', value:'2'}];
 
function fillData(tagIds){
 
    var tagObj = $("#addTags").data("kendoMultiSelect");
    if (tagObj == undefined) { // if not loaded
        $("#addTags").kendoMultiSelect({
            dataTextField: "label",
            dataValueField: "value",
            dataSource: list,
            value: tagIds, placeholder: "Select from list",
            change: function() {
                // change
            }
        });
    } else { // if already loaded only change the values.
        tagObj.value(tagIds);
        console.log(tagIds);
        console.log(tagObj.value());
    }
}
function fillaList(){
    var tagIds=[1,2,3];
    fillData(tagIds);
}
function clearList(){
    fillData([]);
}
 

note: The problem in only when you do the tag selections from keyboard. Doing it by mouse clicks shows no problem

Is this a bug or i am doing something wrong?

Sean
Top achievements
Rank 1
 answered on 27 Feb 2014
1 answer
99 views
I'm currently trying to get a Kendo grid to talk to my MVC controller action and return pagable data.

I have the grid setup like so:

$(document).ready(function () {

var grid = $("#itemList").kendoGrid({

toolbar: kendo.template($("#template").html()),

columns: ["Manufacturer", "Model", "Price", "Tags"],

dataSource: {

transport: {

read: {

url: "catalogadmin/_index",

dataType: "json",

type: "POST",

data: {

filter: ""

}

},

},

schema: {

data: "data", // records are returned in the "data" field of the response

total: "total" // total number of records is in the "total" field of the response

},

pageSize: 2,

serverPaging: true

},

pageable: true

});

This correctly calls my datasource and passes in the filters etc, but the paging controls don't work. The paging controls appear but have no page numbers or totals. When I click on a next/prev page button, a JS error is thrown saying "Object does not support property or method 'slice'". If I remove the "pageable" option on the grid setup, I don't see any paging controls at all.

As far as I know, I'm correctly returning the total in the JSON result so that the grid knows the data source size:

{"total":4,"data":[data is in here and is all correct]}

Any ideas what could be going wrong here?

Thanks,
Charles

 

 

 

Charles
Top achievements
Rank 1
 answered on 27 Feb 2014
8 answers
353 views
Hello.  Per the API documentation here:
http://docs.telerik.com/kendo-ui/getting-started/mobile/icons

I added icons from the list available at the end of the page.  I added the following to my css file:

.km-orders-e:after,
.km-orders-e:before
{
content: "\e306";
}
.km-items-e:after,
.km-items-e:before
{
content: "\e320";
}

The icons that display for these 2 items are in the attached image.  What are the correct values for the items I want to display from the list of icons?
Petyo
Telerik team
 answered on 26 Feb 2014
1 answer
136 views
Is there any way to customize the Radial Gauge Bezel?  Specifically I would like to be able to change the stroke and color, like shown in the attached image.
I've achieved this by changing the stroke and fill color values in chrome developer console like this:
<path style="display: block; " d="M 21.748 348.065 A230 230 0 1,1 448.252 348.065 L 434.345 342.445 A215 215 0 1,0 35.655 342.445 z" stroke-linecap="square" stroke-linejoin="round" fill-opacity="1" stroke-opacity="1" fill="#d2d3d6" stroke="#9c9b9b"></path>

Is there a way to set this by default, so it renders all path sections like this (Note only top part of radial bezel is colored in this image, and not the yellow and red parts)? We're really in need of this functionality, and we've been looking for it for a _long_ time. 

Thanks in advance :)

Regards,
Nicklas
Iliana Dyankova
Telerik team
 answered on 26 Feb 2014
5 answers
146 views
Hello,
I have a blank ListView showing even after dataBound executes and this.dataSource.data() has data in it.  The odd part is that when it is showing blank, if I tap in an area on the blank ListView where I think there is an item it then shows.  It's as if the ListView is hidden and only shows after I tap within the area of the items.

Internal Build: 2013.3.1414

Your thoughts?

FYI, I switched back to Release Build 2013.3.1324 and it works normal.  There is something wrong with 2013.3.1414

Thanks.
Bassanio
Top achievements
Rank 1
 answered on 26 Feb 2014
1 answer
116 views
I'm using kendo grid on normal web application - it is NOT kendo mobile. I'm using only Kendo DataViz and Kendo Web.
My grid do not have vertical scroll. It always shows all rows.

My probrem is that page scrolling is not working when touching and scrolling on grid.
All is working when I put my finger outside of grid.

Horizontal internal grid  scroll is working without issue. So I can see all columns when I scroll grid horizontally.

But I cannot scroll page when I put finger on grid rows.

Scrolling page is working e.g. on IPhone.

Kind Regards
Marcin
Dimo
Telerik team
 answered on 26 Feb 2014
4 answers
2.6K+ views
It is the first time I am attempting to use the DatePicker, so excuse me in advance if I am just missing something basic, but here is the scenario.

I am using a basic datePicker with a min and max value: (by the way, if I remove the min and max, i have the same problem)

    var periodDays = modelFromServer.DaysInPeriod.length;
    $("#dayPicker").kendoDatePicker({
        min: new Date(modelFromServer.DaysInPeriod[0].Date),
        max: new Date(modelFromServer.DaysInPeriod[periodDays - 1].Date)
    });

When I select a day in the calendar, I would expect that day to show up in text next to the picker, but I have not been able to get it to show up there.  How do you set the displayed date?  See attached image for the picker.

If I break and look at the value of   $("#dayPicker").data("kendoDatePicker").value()  i get the proper date that I selected.  It just won't fill in the text field next to the calendar icon.

Any idea what I am doing wrong?

James
Top achievements
Rank 1
 answered on 26 Feb 2014
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
MultiColumnComboBox
Dialog
Chat
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
ScrollView
Switch
BulletChart
Licensing
QRCode
ResponsivePanel
TextArea
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
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?