Telerik Forums
Kendo UI for jQuery Forum
8 answers
4.5K+ views
Hi guys - I'm currently in the process of evaluating the Kendo UI toolkit and im just wondering if you can help me with this problem!

Ive got a KendoDropDownList control and when the selected item changes I update the DataSource on my grid (hopefully).. the problem is when its changed the grid doesn't reflect the changes

View code:
<div class="filter-definitions" style="width: 100%;">
    @(Html.Kendo().DropDownList()
           .Name("filters")
           .DataTextField("Name")
           .DataValueField("Id")
           .HtmlAttributes(new { style = "width: 95%;" })
           .SelectedIndex(-1)
           .DataSource(source => source.Read(read => read.Action("GetUserFilters", "Grid")))
           .Events(e => e.Select("filter_select"))
          )
    <input type="button" value="Add" />
</div>
<div class="filter-grid-container" style="width: 100%; margin-top: 20px;">
    @(Html.Kendo().Grid<GridFilterResult>()
           .Name("filter-grid-results")
           .Columns(columns =>
                       {
                           columns.Bound(p => p.Name);
                           columns.Bound(p => p.DOB);
                       }
                   )
            .Pageable()
            .Sortable()
            .Scrollable()
            .Filterable()
          )
</div>
<script>


and my Javascript

    function filter_select(e) {
        debugger;

        var selectedItem = this.dataItem(e.item.index());

        var filterGrid = $("#filter-grid-results").data("kendoGrid");

        filterGrid.dataSource = new kendo.data.DataSource({
            type: "json",
            transport: {
                prefix:"filter-grid-results-",
                read: {
                url: "/Grid/GetFilterResults",
                contentType: 'application/json; charset=utf-8',
                type: 'GET',
                dataType: 'json'
            }
              , parameterMap: function (data, type) {
                  var values = {};
                  values["filterId"] = JSON.stringify(selectedItem);
                  return values;
              },
                schema: { data: "Data", total: "Total", errors: "Errors", model: { fields: { Name: { type: "string" }, DOB: { type: "date"}}} }
            }
        });
        filterGrid.dataSource.read();
    }

everything looks fine but it just doesn't work and I cant figure out why - can anyone help me with this?


cheers.
ste.
Alison
Top achievements
Rank 1
 answered on 12 Sep 2012
2 answers
163 views
Hi There,

                    I would like to develop an mobile web application using kendoui mobile. How to setup the Vs 2010 with kendo ui in order develop for mobile. Can you guys give me a tutorials for this. My application should work like the example or demo you have made available online with the url.

Thanks,
Syed
moegal
Top achievements
Rank 1
 answered on 11 Sep 2012
3 answers
421 views
You can see this in effect here:
http://jsfiddle.net/pwhmF/42/

The initial viewmodel's value is databound correctly, however neither the viewmodel / datepicker's value gets updated after a mouse click selection.  Yet typing and pressing enter works??

Is there something wrong with my databinding configuration?
Duane
Top achievements
Rank 1
 answered on 11 Sep 2012
1 answer
71 views
Hi!

I am trying to get the model's ID "value" sent to my controller when someone selects a row in the grid.
Is this possible? And how do i make it ?

Please let me know how the controller should look like and also the JQuery.

Im using ASP.NET MVC4 Razor View.

Thanks!
Carlos
Top achievements
Rank 1
 answered on 11 Sep 2012
0 answers
70 views
Nevermind got it working.
Tim
Top achievements
Rank 1
 asked on 11 Sep 2012
2 answers
213 views
I have a grid that requests data remotely. This is where the filtering and sorting is also performed. So data will be returned in batches of 20/50/100 depending on the paging and selection.

Quite a few of the options will have datasets of >1500 records (could potentially be far more and will grow) which complicates things. The group by appears to be working fine but visually its not as easy to traverse when it is in this mode - As the first 3-6 pages could be the same group and the user may want to go digging into a few groups (or not even know they exist) making it harder to find rows. 
http://demos.kendoui.com/web/grid/index.html - group by last name and shrink both... you visually scan about two items per page on average. When the data set is much larger then imagine only one group over several pages and you are looking for data.

Ideally I would like it to show as many groups as the paging is set and then page on the different groups similar to the way hierarchy would: http://demos.kendoui.com/web/grid/hierarchy.html 
Going down the route of the hierarchy would be a little tedious as there may be many items grouped in the header and in different orders. So out of 8 columns 5 are likely to be commonly grouped, and could be grouped to all the different levels but a depth of three is more likely. Lastly overriding the default grouping aspect... This all could be quite complicated, but if this can be managed quite easily then im all for it.

Is there any way of changing the group by functionality to work more effectively in this scenario? Ie load the group by first and lazy load the data second depending on the opened/collapsed group(s)

Note: Loading all of the data before hand and using client side group by isnt really an option as it takes too long to process the data. It will be loading descriptions in the grid (html formatted text) so the data becomes quite hefty.

Thanks,
Matt
Matthew
Top achievements
Rank 1
 answered on 11 Sep 2012
0 answers
243 views
Hi everyone,



I am developing a single page application with Kendo UI. Since many widgets append some HTML to the <Body> the Memory consumption grows quickly when using the application (even if the widgets are no longer part of the application, e.g. closed).



To work around this, I usually remove any direct descendants of the <Body> upon unloading certain parts of my application. While this works great so far, I'm currently struggling to get the date picker widget working with this technique.



The Problem is that the date picker works fine when the application initializes it for the very first time, but after removing that date picker and creating another one some time later it won't work as intended. The Dropdown calendar is displayed but None of the links or Buttons react to clicks except for the current date on the bottom of the calendar.



Is there a way to get this working? Like I said, other widgets like Dropdown lists and Windows just work fine with my "garbage collection".



Here's a demo of the issue: http://jsfiddle.net/zwGyM/1/



Regards
Majid
Top achievements
Rank 1
 asked on 11 Sep 2012
0 answers
319 views
Hi, I am using KendoMobileListView and I want to know how I can get the index of selected Item. My DataSource contains multiple entries and I want to be able to find out the index of selected item to show appropriate data

$('#Template').kendoMobileListView({       
        dataSource: EmployeeVisitsInfo,
        template: '<table  style="width: 100%"><tr><td><p>${a = (typeof data.Name !== "undefined") ?Name : data.LastName</td></table>',
        click:  function(e){
          var datasource = $('#Template').data("kendoMobileListView");
          var index = datasource .select().index();
          var dataItem = ds.dataSource.view()[index];
          console.log(index)
        }
    });

I dont think this is the right way to get the index of selected item because i am keep getting and error saying :

Uncaught TypeError: Object [object Object] has no method 'select'  

Any Idea how I can go about doing this ? Thank you
Pourya
Top achievements
Rank 1
 asked on 11 Sep 2012
1 answer
126 views
Following issue: MVVM model contains groups array, for each group we create a DIV with some information (fields) using source binding and data-template attribute. Each div contains a button, which is suppose to be a mobile button, but it does not render as a mobile button. I simplified my example - each div has simply a button:

<div id="test" data-role="view" data-model="viewModel">
    <div data-bind="source:groups" data-template="groupsTemplate"></div>
    <button data-role="button" data-bind="click:buttonClick">Add new Button</button>
</div>
<script id="groupsTemplate" type="text/x-kendo-template">
    <button data-role="button" data-bind="text:caption"></button>
</script>
and a viewModel:
var viewModel = kendo.observable({
    caption: "buttons",
    groups:[
        {name:"button1", caption:"First", error:""},
        {name:"button2", caption:"Second", error:""},
        {name:"button3", caption:"Third", error:""}
    ],
    buttonClick: function(){
        this.groups.push({name:"button4", caption:"Forth", error:""});
    }
});
//kendo.bind($('#test'), viewModel);
new kendo.mobile.Application();​


the result is: http://jsfiddle.net/S7edM/2/ 

Of course if I uncomment line with kendo.bind, and remove data-model attribute from root div it renders correctly, since it created mobile application on already existing DOM, but if I need to add a new button, it does not renders to mobile button.

General question: If I have different mobile components like switch, list view etc. in such "groups", which are added and removed through templates and view model, do I have any "afterAdd" and "beforeRemove" events, and is there any kendo mobile method to init newly created DOM elements? 
Petyo
Telerik team
 answered on 11 Sep 2012
1 answer
128 views
Hi Guys,

I am new to Kendo and was able to get the List on JSp in grid format but when I click on edit button, I am able to edit the data on JSP but when I click on Update , I am not able to update in database, I just want to get the data back to action class, so that I can atleast update them using JAVA code.

The only problem is with transport I guess, I dont know how to pass the URL.
Please give me a small example of code snippet how to pass control in URL if possible.

Help appreciated.

Thanks and regards,
Nitesh
Atanas Korchev
Telerik team
 answered on 11 Sep 2012
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
Drawing API
Drawer (Mobile)
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
Breadcrumb
Collapsible
Localization
MultiViewCalendar
Touch
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
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?