Telerik Forums
Kendo UI for jQuery Forum
4 answers
169 views
When I add grid and dropdownlist control in page, I found the control size is bigger than your demo's. How come that? I attach my screenshot
Troy
Top achievements
Rank 1
 answered on 16 Dec 2013
1 answer
210 views
hey guys
I'm facing the following issue right now:

we use a grid which has a custom toolbar button which runs some function in the background. the code looks like this:

$("#CategorizeNow").click(function categorizing (e) {
        e.preventDefault();
 
        $.ajax({
            url: '@Url.Action("RunAutoCategorization", "Pattern")',
            beforeSend: function() {
                $("#CategorizeNow").addClass("k-state-disabled").html("Categorizing!");
            },
            success: function () {
 
                $("#CategorizeNow").removeClass("k-state-disabled").html("Finished");
                $("#CategorizeNow").kendoTooltip({
                    content: "successfully finished",
                    position: "top",
                    animation: {
                        close: {
                            effects: "fade:out"
                        },
                        open: {
                            effects: "fade:in",
                            duration: 1000
                        }
                    }
                }).show($("#CategorizeNow"));
                 
 
 
            }
 
        });
    });
what we want to achieve is: after the categorize button is clicked it should be disabled first. when the background operation succeeded, the tooltip should be displayed at the top of the categorize now button and the button should get its original state again and be enabled again.

right now the tooltip is only showing if the operation has finished and the mouse enters the button.

any advice would be helpful.

thx in advance and kind regards
thomas
Alexander Popov
Telerik team
 answered on 16 Dec 2013
4 answers
563 views
I`m binding data via Ajax to grid. I added Change event to the grid. what happening is code inside the Onchange event is executing twice .
I have ajax call inside the Change event function , how can I control this ?  My requirement is I should able to write an event that fires at row level like row select event.


 @(Html.Kendo().Grid<User>()
      .Name("grid")
      .DataSource(datasource => datasource
          .Ajax()
          .ServerOperation(false)
          .Model(model => model.Id(p => p.UserID))
          .Read(read => read.Action("AllUserRecords_Read", "User"))
          .PageSize(15)

      )
      .Columns(columns =>
      {
          columns.Bound(p => p.FirstName).Width(40);
          columns.Bound(p => p.LastName).Width(80);
          columns.Bound(p => p.EmailAddress).Width(70);
       })
      .Pageable(pageable => pageable.PreviousNext(true).PageSizes(new[] { 5, 10, 15, 20 }))
      .Filterable()
      .Events(events => events.DataBound("onDataBound").Change("grid_change"))
      .Selectable(select => select.Mode(GridSelectionMode.Single))
      .Resizable(resize => resize.Columns(true))
      .Reorderable(reorder => reorder.Columns(true)))

 function grid_change(e) {
            $.ajax({
                type: "POST",
                url: "/User/GetRoles",
                data: { userID: id },
                async: false,
                success: function (response) {
                    $("#roles").replaceWith(response);
                },
                error: function (response, q, t) {
                    alert(response.responseText);
                }
            });
 function onDataBound(arg) {
        this.element.find('tbody tr:first').addClass('k-state-selected');
}
}
Artsem
Top achievements
Rank 1
 answered on 16 Dec 2013
5 answers
153 views
In WPF RadControls you can pass a function call back to a RadWindow. Can you use a similar approach with Kendo modalView?

WPF Example

this.commandWindowClosing = new RelayCommand<CancelEventArgs>((args) =>
            {
                if (!_closing)
                {
                    args.Cancel = true;
                    RadWindow.Confirm(AppConstConfirmShutdown, this.RequestShutdown);
                }
            });
 
private void RequestShutdown(object sender, WindowClosedEventArgs e)
        {
            try
            {
 
                if (e.DialogResult == true)
                {
                            // Do something
                }
Sorry for posting C# :-)

Is this approach possible with Javascipt and modalView in am mobile app? the samples I've seen don't do this

I know you can override the close event but that doesn't help me, If Kendo implemented Confirm,Alert etc like RadWindow it would be very useful.
Kiril Nikolov
Telerik team
 answered on 16 Dec 2013
4 answers
243 views
I'm not sure if I'm doing something conceptually wrong, but I'd like to use a predefined model and fill it with data form a remote request through DataSource AND the same model inside a view for exposing it's data in HTML.

Right now, I'm doing something like that:
ModelUserProfile: kendo.data.Model.define({
 id: "userId"
,fields: {
 ,firstName: { type: "string" }
 ,lastName: { type: "string" }
        ...
}
});
 
var datasource = new kendo.data.DataSource({
       ...
      schema: {
            model: ModelUserProfile
      },
      ...
});
<div
    id="show-userprofile"
     data-role="view"
     data-model="ModelUserProfile"   
     data-layout
="default"
>
...
</div>
 
<script id="templateUserprofile" type="text/x-kendo-template">
...
   <div data-bind="visible: firstName">Vorname:</div>
...
</script>

As soon as I use the binding inside the view, I'm getting an "Uncaught TypeError: Cannot read property 'get' of undefined" from kendo.mobile.min.js.

Am I doing this wrong (or too complicated?).

As a work-around, I changed it to:
# if (firstName) { # <div>Vorname:</div> # } #
which works fine, but I'd prefer to bind it.

Thanks in advance for any help on this.


Roman
Top achievements
Rank 1
 answered on 16 Dec 2013
3 answers
384 views
I have a Kendo Grid with a column bounded to a enum.  All works fine except when it comes to sorting.  The sorting is performed on the int values of the items, instead of by the text.  i.e.

public enum Test{
    Red = 1,
    Yellow = 2
    Amber = 3
}

Sorting ascending, it outputs: Red, Yellow, Amber.  Instead of Amber, Red, Yellow.
Sorting descending it outputs: Amber, Yellow, Red.  Instead of Yellow, Red, Amber.

How can I get it to sort properly based on the text strings on the left?

Thx!

Mao
Alexander Popov
Telerik team
 answered on 16 Dec 2013
1 answer
45 views

New to Kendo and tablet/responsive development and am really lost trying to decide what widgets to use for the following.

Id like something to work like the dropdownlist in the mobile framework forms section except it would work like this.
Click on an initiator.
Depending on window size, slide over or just open something on the screen like the dropdown does.
Load and display a grid which has the potential to be very long. Allow the user to highlight more than one row which will act as selections so vertical scrolling will be required.
Hit a back or close and you are back to the same page where the initiator is.

I've found some widgets here and there while going through all the examples but didn't write them down and now I can't find them anymore.

thanks
Kiril Nikolov
Telerik team
 answered on 16 Dec 2013
1 answer
187 views
Hello My dear friends , 

I am having problem in organizing the Scheduler's elements.   My requirements is 

Read only Status :
=================
* Title Fields 
* Description  Fields 


Remove Elements :
=================
* All Day Events 
* Repeat 

For your better understanding, please download the file attached herewith. 

Any help and code sample would be highly appreciated. 

Alexander Popov
Telerik team
 answered on 16 Dec 2013
1 answer
126 views
This isn't a big deal, but thought I would bring it to attention.

When creating a grid using MVVM and if you forget to set the data-selectable="multiple,rows" or even data-selectable="true" on a grid, you can get the wrong error message in Chrome's Console when you try to select all rows using javascript. Instead of telling you that the error occurred in kendo.grid.js on line 2057 because the property "objects" doesn't exist, it tells you that the error occurred in kendo.treeview.js on line 964 (or 966).

The code to reproduce is here, but I can only get the map file details when using Chrome. Click on the button that runs "Select All" and it won't select in the jsFiddle example, but if you were to run it in Chrome, it spits out a TypeError with the (wrong) information about file and line number.
http://jsfiddle.net/joelpenner/cCaz3/

Again, not that big of a deal, but still something to know about.
Mihai
Telerik team
 answered on 16 Dec 2013
3 answers
134 views
Hello,

I'm looking for a way to load an external url into a view in such a way that the tabstrip menu stays visible.
Tried all sorts of things, iframes, url load methods etc all to no avail.
Is there a way to use the inappbrowser in conjunction with a tabstrip menu?
Any hint to get a browser working with a tabstrip is highly appreciated...

Thanks, Hans.
Steve
Telerik team
 answered on 16 Dec 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?