Telerik Forums
Kendo UI for jQuery Forum
2 answers
118 views
I am having some trouble setting the widths of KendoUi Widgets via either a css class or the style="width:  "

Below is a sample of some code from an MVC test project I am working. The date picker control is being rendered the entire width of the screen. The only way I can can get it to size correctly is by limiting the width of the parent element. Is this the the only way sizing of the widget can be controlled. Thanks.

<br><div><br>    <input id="dateTest" style="width: 200px" /></div><br>@Html.Telerik().ScriptRegistrar().OnDocumentReady(" $('#dateTest').kendoDatePicker();")


Greg Horvath
Top achievements
Rank 1
 answered on 30 Jul 2012
2 answers
127 views
Hi all,

I have a grid, loading remote data and grouped on a single field by default. 

Collapsing/reopening groups of data is not working, the icon changes but nothing happens. 
Column reordering is working in FireFox and Chrome, but not in IE. I can drag the column but dropping isn't allowed anywhere.

How do i debug the above issues? Where should i look? There are no javascript errors etc.

Regards,
Tycho
Tycho
Top achievements
Rank 1
 answered on 30 Jul 2012
9 answers
844 views
I have a table that has a foreign key to another table, and I would like to provide a dropdownlist as the editor for the foreign key field and then save the object back to the database using oData.
I can get the grid to create just fine, and CRUD operations work great on the main set of data.  
This leaves with me a couple of options.
I can simply bind the column to the foreign key field int field, and use a custom editor to create the dropdownlist to provide the id from the lookup table on, but leaves me displaying a simple int in the grid instead of a more meaningfull property of the lookup table.
Or I can use the $expand in the Read of the DataSource, include a field bound to the more meaningfull property, but can't get the editor to work quite right or the Update postback to work.

I have made some fiddles to try to show my point.
http://jsfiddle.net/giltnerj0/h4wx5/ 
http://jsfiddle.net/giltnerj0/h4wx5/1/ 
(These won't work for actual CRUD operations due to the JSONP from using demos.kendoui.com as the service)
Ambica
Top achievements
Rank 1
 answered on 30 Jul 2012
5 answers
1.1K+ views
what is the syntax to create this (wcf) oData query as a KendoDataSource.Transport:
var URL = DataServiceURL + "Customers()?$filter=startswith(CustomerName, '" + searchValue + "') eq true";
Thanks
Nikolay Rusev
Telerik team
 answered on 30 Jul 2012
1 answer
118 views
It have a problem with the toolbar icon it seem to have à probleme with the sprite.

See the screen shot for detail
Alex Gyoshev
Telerik team
 answered on 30 Jul 2012
0 answers
198 views
I made a 2-level hierarchy using html helper attached here. As I navigated though the second level child tables, some of them are not displaying any data at all. To reproduce this issue:
  1. Run the application
  2. Expand the first row and all its child tables including its 2nd level child tables
  3. Expand the second row (parent table) and then all its child tables
  4. As a result, the second row's 2nd level child tables don't display any record. 
But when I debug it, the controller returns the correct data. I have a thought that Kendo grid might just be confused where to populate data since my 2nd level child grids have duplicating names. And it seemed to be just navigating through the DOM to find the first matching grid name (as its only parameter basis). There are possibilities that grid name duplicates are being produced having only the ID value of the parent data as its signature. Or did I miss anything with my code?

How would I get the parent table ID (that is, the parent table of the 2nd level child grid == the first level child table) so that I can append it to the current child table ID like:

.Name("childGrid_#=ID#_" + parentTableID )

Is there any better way that you might suggest in preventing a duplicated grid name?
Any thoughts might be a great help.
Thanks in advance! 
Avitot
Top achievements
Rank 1
 asked on 30 Jul 2012
1 answer
96 views
In the documentation here:

http://docs.kendoui.com/api/framework/datasource 

You state under the transport.update section (and probably read, create and delete too) you state:

var dataSource = new kendo.data.DataSource({
    transport: {
        update: function(options) {
            // make AJAX request to the remote service
 
            $.ajax( {
                url: "/orders/update",
                data: options,
                success: function(result) {
                    // notify the DataSource that the operation is complete
 
                    options.success(result);
                }
            });
        }
    }
});

It should say "data: options.data," not "data: options,".


Atanas Korchev
Telerik team
 answered on 30 Jul 2012
0 answers
152 views
We have a scenario where we want to ease into Kendo UI, but have a project that needs to remain on ASP.NET 2.0 Web Forms for a good few months before upgrading (it will still be web forms for a while, before the MVC move).

Basically we need to have a Kendo UI grid initialized with seed data in the form of JSON and allow the user to perform Pop-up Inline Editing (like http://demos.kendoui.com/web/grid/editing-popup.html), but without saving that data back to the server after each edit.  

The user's need to have the ability to see their changes in the data immediately reflected in the grid, but we plan on trying to fit this into a post-back styled architecture by reading the JSON data from the datasource (after it's updated with changes from the user) and copying that to a hidden field which can by POSTed back to a form location (and later on we can change this action to send data to a web service).

Are there any examples of a Kendo UI Grid where the data is edited locally and read out into something (e.g. copied to another JavaScript variable or hidden form field) on item/row update without interacting with a service boundary?

It would greatly ease the decision if something similar or exactly this scenario could be posted/provided on this thread showing that Kendo UI can work with this.

Thanks!
jgill
Top achievements
Rank 1
 asked on 30 Jul 2012
1 answer
119 views
Has anyone had an issue with the datasource calling the same paging over and over? I am trying to come up with a simplified version to test this theory. But here is my code for creating the dataset:

ds = new kendo.data.DataSource(
         {
             transport: {
                 read: { url: params.readPath }
                
             },
             serverPaging: true,
             serverSorting: true,
             pageSize: 100,
             schema: {
                 id: "c0",
                 data: "results",
                 total: "count",
 
                 parse: function(data) {
 
                     params.fields = data.fields;
 
                     params.onSuccess(params);
 
                     return data;
                 }
             }
         });
     ds.read();

When I run this, it just hits the service over and over for pages 1 to 100. Any ideas?
Jonathan
Top achievements
Rank 1
 answered on 29 Jul 2012
0 answers
181 views
Hello,

I have a grid bound to a view model array property.

 I am adding new items asynchronously to the array and it works, they are getting displayed in the grid.

However, I see that the grid is adding columns for EVERY property of the item object, even if I specifically set the columns with the fields:

 $(document).ready(function () {
            $("#battleGrid").kendoGrid({
                columns: [
                                      {
                                          title: "Title",
                                          field: "Title"
                                      },
                                      {
                                          title: "Map",
                                          field: "Map"
                                      }]
            });


            $("#battleGrid").kendoGrid({
                selectable: "row"
            });
        });


$(function () {
            viewModel = kendo.observable({

                battles: [],


                addBattle: function (battle) {
                    this.get("battles").push(battle);
                },
            });

            // apply the bindings
            kendo.bind(document.body.children, viewModel);
        });

 <div id="battleGrid" data-role="grid" data-sortable="true" data-bind="source: battles"
                    style="height: 700px">
                </div>

The grid shows 5 columns instead of 2.

This looks very bad, I hope there's a solution.

How can I tell the grid to stop auto generating the columns and create only specific columns?


Thanks!
Andrew
Top achievements
Rank 1
 asked on 29 Jul 2012
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?