Telerik Forums
Kendo UI for jQuery Forum
2 answers
357 views
Hello

I'm using KendoUI with ASP.NET. Setting the position of a KendoUI window element is relatively easy, but I'm finding it difficult to get position(top, left) dynamically.

Can it be done? If window is moved from its original position to other, can I somehow read the new coordinates. The information has to be somewhere because positions are know when a window is closed and opened again.

Cheers,
JoonasK
Joonas
Top achievements
Rank 1
 answered on 11 Apr 2013
2 answers
1.8K+ views
My solution requires us to add rows programatically. There is a complication in that the rows need to be added to a subgrid. Looks like it works but the data is now being saved. To test our problem, I have added a button which runs the function below on your grid-odata-crud example which I downloaded from github.

            function AddRow() {
                var productsGrid = $('#grid').data('kendoGrid');
                var dataSource = productsGrid.dataSource;
                dataSource.add({ ProductID: 10002, ProductName: 'A Johns Product 1', UnitPrice: 10.00, UnitsInStock: 5, Discontinued: false });
                dataSource.sync();
                console.log('Done');
            }

Should the above work. No rows are added to the database using this technique although I can add rows in the usual manner via the 'Add new record' button.

Hope you can help.
Sanket
Top achievements
Rank 1
 answered on 11 Apr 2013
8 answers
1.2K+ views
In a kendo grid is it possible to pick and choose which fields from the given model show in the popup form when popup edit mode is enabled (i.e. i have 10 properities in my model that is past to my grid and I only whish to show 5 specific ones)? How would I go about doing this if it is possible.
Almond
Top achievements
Rank 1
 answered on 11 Apr 2013
8 answers
74 views
I am porting an android/iOS kendoui mobile app to wp8. There is a very pronounced what screen that flashes on every navigation. I'm not doing anything special. Has this been reported by others? Is there a fix?
Kenneth
Top achievements
Rank 1
 answered on 11 Apr 2013
1 answer
87 views
Good day,

I want changed the default delete button found on the grid. I want to replace it for an image, is there any way I can do that?

Thank you,

Guillermo Sanchez. 
Guillermo
Top achievements
Rank 1
 answered on 10 Apr 2013
2 answers
72 views
Hi,

I am creating an application which requires a listview with items coming from an external xml datasource.
This is what my datasource looks like:
01.var expenseFormDataSource = new kendo.data.DataSource({
02.        transport: {
03.            read: {
04.                url: EA.baseURL + "resources/expenseService/getExpenseForms",
05.                dataType: "xml",
06.                type: "POST"
07.            },
08.            parameterMap: function(options) {
09.                return {
10.                    token: EA.getToken()
11.                };
12.            }
13.        },
14.        schema: {
15.            type: "xml",
16.            data: "expenseForms/expenseForm",
17.            model: {
18.                fields: {
19.                    id: "id/text()",
20.                    date: "date/text()",
21.                    statusId: "statusId/text()"
22.                }
23.            }
24.        }
25.    });
A preview of the returned XML can be found in attachment.  (I want to create a listitem per expeseFrom).

The listview is created when the view is initalized.  Here is the code:
1.$("#expenseFormList").kendoMobileListView({
2.       dataSource: expenseFormDataSource,
3.       pullToRefresh: true,
4.       template: $("#expenseForm-template").text()
5.   });
The expenseFormList is an empty unordered list inside my view. The expenseFrom-template looks like this:
1.<script id="expenseForm-template" type="text/x-kendo-template">
2.    <a data-role="listview-link" id=#="\"my-expenses-show-pdf-" + id+ "\""#>
3.        <div class="expenseForm-date">#= kendo.toString(new Date(Date.parse(date)), "dd/MM/yyyy") #</div>
4.        <div class="expenseForm-status">Status: #= expenseStatusIdToString(statusId) #</div>
5.    </a>
6.</script>
This all works except when I include "kendo.data.min.js".  When I include the file,  the items in the list are not rendered and no error message is provided in Chrome Developers Tools.  The same issue also occured when I tried to follow the listview with pull-to-refresh tutorial:  no items when the file was included.
I have to include the JavaScript file for a Kendo dropdownlist,  somewhere else in my application.  
What should I do? 
Thanks!

Sander
Top achievements
Rank 1
 answered on 10 Apr 2013
2 answers
575 views
I've built an uploader using the latest KendoUI and jQuery 1.9.1. It uses a .NET web service, which returns an empty JSON object to satisfy the new version of jQuery. The uploader seems to work; it shows the checkmark next to the file after uploading and the file gets written to the server.

However, there is no remove button showing. I have a removeURL and removeVerb, but the remove button is not present.

For the record, here is what the upload service returns:
HTTP/1.1 200 OK
Cache-Control: private, max-age=0
Content-Length: 7
Content-Type: application/json
Server: Microsoft-IIS/8.0
X-AspNet-Version: 4.0.30319
X-SourceFiles: =?UTF-8?B?QzpcQ29kZVxGTVNcTWFpblxQcm9qZWN0QWNjb3VudGluZ1xEYXRhU2VydmljZXNcRG9jdW1lbnRzLmFzbXhcRG9jdW1lbnRfQ1JFQVRF?=
X-Powered-By: ASP.NET
Date: Tue, 09 Apr 2013 23:14:56 GMT
 
" { } "
I've tried setting the content-type to "text/plain" but then the JSON gets written as a byte[] rather than text for some reason. This might be the problem but I don't seem to be able to get around it.

Help?
DJo
Top achievements
Rank 1
 answered on 10 Apr 2013
2 answers
365 views
Hello,

In our project we have a kendo grid which display lines with a column "Rank" (int).
Can you help us to reorder rows by drag'n drop and so update the Rank because i have no idea to achieve that.

Thanks for your help,
Guillaume
Vitantonio
Top achievements
Rank 1
 answered on 10 Apr 2013
2 answers
191 views
I retrieved an object via an OData WebAPI service using the DataSource, where the response looks like this:
{"odata.metadata":"http://localhost:49639/api/$metadata#Address/@Element","AddressKey":"1","AddressLine1":"test2","AddressLine2":"Suite 2004","City":"Lawrenceville","State":"Georgia","PostalCode":"30043"}
My schema's model does not have "odata.metadata", and I don't want it included.  The reason this extra property is a problem is that when I do an update, it sends "odata.metadata" as an item back on the OData POST request, and my WebAPI throws an error when trying to automatically map that, so I'd rather it just not send it at all.  Right now, I'm manually deleting the property in the parse function to remove it, but it just feels wrong.  It seems like the DataSource should not create an object with properties from my response that do not exist in the schema's model, so maybe I'm missing something here.  Is the only way to handle this by manually doing something in the parse function?
parse: function(response) {
    // This property causes an issue when sending the model back, so removing it.
    delete response["odata.metadata"];
},







Petur Subev
Telerik team
 answered on 10 Apr 2013
4 answers
1.4K+ views
Hello,
I have server-side kendo grid
01.<div  class="k-rtl">
02.@(Html.Kendo().Grid<BO.UserPemissions>()
03.        .Name("UserPemissionsGrid").Events(e => e.DataBound("UserPemissionsRowDataBound"))
04.        .Columns(columns =>
05.        {
06.            columns.Bound(o => o.UserId).Title("ת.ז.");
07.            columns.Bound(o => o.PermittedProgramGroup).Title("קבוצות הרשאה");
08.            columns.Bound(o => o.PermittedProgramId).Title("תוכניות מורשות");
09.            columns.Command(command => command.Destroy()).Width(150);
10.        })
11.        .Pageable(pager => pager.PageSizes(true))
12.            .ToolBar(toolBar => { toolBar.Create(); toolBar.Save(); })
13.        .Sortable()
14.            .Scrollable()
15.            .Editable(editable => editable.Mode(GridEditMode.InCell))
16.                    .DataSource(dataSource => dataSource.Ajax().Model(model => model.Id("UserId")).Read(read => read.Action("UserPemissionsRowDataRead", "Home"))
17.                                .Update(update => update.Action("UserPemissionsRowDataUpdate", "Home"))
18.                                    .Create(update => update.Action("UserPemissionsRowDataCreate", "Home"))
19.                                            .Destroy(update => update.Action("UserPemissionsRowDataDestroy", "Home"))
20.                )
21.    )
22.</div>
I need to put my text in the standard control buttons inside the grid (see the attached picture)

Any possible help would be appreciated a.s.a.p.

Thanks

Shabtai
Shabtai
Top achievements
Rank 1
 answered on 10 Apr 2013
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?