Telerik Forums
Kendo UI for jQuery Forum
1 answer
122 views
for the existing listview (datasource already binded), I want to change the existing datasource's (transport.read.url) and refresh the listview. 

I tried to look for any example codes, but couldn't find it. Any advise? or code example might help.
Steve
Telerik team
 answered on 21 Jan 2014
1 answer
142 views
I have two series in a radar chart: one with the minimum values and the other with the maximum values.

I would like to get a radar chart with the area filled between the minium and the maximum values.

Actually the image should look like generating the area for the maximum values and cut away the minium value area...

How could I achieve that?

Thanks for any hint!
Iliana Dyankova
Telerik team
 answered on 21 Jan 2014
1 answer
115 views
I am creating an app in which I dont want to use font glyphs as background images.

Trying to use an image instead was not that easy actually, it will  not show up.
what is the preferred way of doing this?

This is what I tried
.km-icon.km-drawer-button.km-notext
{
 
background: url("img/menu_button.png");
 
width: 19px;
 
height: 16px;
 
display: block;
}
Sebastian
Telerik team
 answered on 21 Jan 2014
7 answers
599 views
Hi All

How to pass object to controller action through LoadContentFrom method or is there any alternative option to pass object to controller action.

Right now I am able to pass the string value to controller action but I want to pass the @model.ClientInfo object to  action from controller.

So please help me how do I achieve this scenario. Here is my all code.
 

@model ViewModel

<div class="f-group">

    <div>
        <ul id="Section">
            <li><a class="Tooltip" href="#" data-id="Client1">@Model.Client1.Name</a></li>
            <li><a class="Tooltip" href="#" data-id="Client2">@Model.Client2.Name</a></li>
            <li><a class="Tooltip" href="#" data-id="Client4">@Model.Client3.Name</a></li>
            <li><a class="Tooltip" href="#" data-id="Client4">@Model.Client4.Name</a></li>
        </ul>
    </div>

    @(
         Html.Tooltip()
        .For("#Section")
        .Filter("a")
        .LoadContentFrom("LoadPopup", "Client")
        .Position(TooltipPosition.Bottom)
        .Width(250)
        .Events(events => events.RequestStart("requestStart").Show("showTooltip"))
     )

function requestStart(e) {
    e.options.data = {
        baseModel: e.target.data("id")
    };
}

function showTooltip() {
    this.refresh();
}
</div>

  public ActionResult LoadPopup(ClientInfo baseModel)
        {
            return this.PartialView("_ClientPopup", baseModel);
        }
Daniel
Telerik team
 answered on 21 Jan 2014
3 answers
176 views
Can anyone advise on the recommended approach to cascading combo boxes when the user could be "timed out" from their session when they select from the first list.

Basically, the first list is populated by being bound to the mvc model on page load.  However, the second is defined to pull data from the server via a json Response.

The issue is that if, between loading the first page and the user selecting something from that list, the user is timed out of their session the list doesn't get populated, not error is display, and the list is populated with a lot of "undefined" values.

So, my question is, what's the best practice for handling this situation with kendo mvc?

here's the code for the view..

<div class="row">
    <div class="leftbox">
        @Html.LabelFor(m => m.OrganisationId)
    </div>
    <div class="rightbox">
        @(Html.Kendo().ComboBoxFor(m => m.OrganisationId)
              .BindTo(Model.OrganisationList)
              .Placeholder("Select Organisation")
              .Suggest(true)
              .Filter(FilterType.Contains)
              .HtmlAttributes(new { @class = "kendoDropdown wideDropdown", selectWidth = "400" }))
    </div>
</div>
<div class="row">
    <div class="leftbox">
        @Html.LabelFor(m => m.UserId)
    </div>
    <div class="rightbox">
        @(Html.Kendo().ComboBoxFor(m => m.UserId)
          .Placeholder("Select User")
          .DataSource(source => source.Read(read => read.Action("GetUsers", "Auth").Data("getOrganisationId")).ServerFiltering(true))
          .DataTextField("value")
          .DataValueField("id")
          .HtmlAttributes(new { @class = "kendoDropdown wideDropdown"})
          .Enable(false)
          .AutoBind(false)
          .CascadeFrom("OrganisationId")
      .Events(e => e.Change("enableButton") )
    </div>
Vladimir Iliev
Telerik team
 answered on 21 Jan 2014
1 answer
348 views
Using the official Kendo UI typescript definitions, trying to use the "grid" in the following manner refuses to compile; The error points to the toolbar property. This code works fine in normal javascript, and has never given me any trouble until I tried to use TypeScript.

this.elements.grid = $('#grid').kendoGrid({
        dataSource: {
            transport: {
                read: {
                    url: "/administrator/data/items",
                    dataType: "json",
                    type: 'GET',
                    cache: false
                }
            },
            schema: {
                total: "total",
                data: "data"
            },
            page: 0,
            pageSize: 15,
            take: 15,
            serverPaging: true,
            serverFiltering: true,
            type: "aspnetmvc-ajax"
        },
        toolbar: kendo.template($("#search-byName").html()),
        pageable: {
            refresh: true,
            pageSizes: true
        },
        selectable: "row",
        columns: [
            {
                field: "Id",
                width: 25,
                title: "Identity"
            },
            {
                field: "Name",
                width: 40,
                title: "Name",
                template: "<div class='#: Quality.CSS #'>#: Name #</div><div>#: (Origin.Label != null) ? Origin.Label : '' #</div>"
            }
        ],
        change: function (e) {
            // get the selected row from the grid
            var selected = this.select();
            // get the data from the selected row
            var data = this.dataItem(selected);
            // update the model
            viewModel.map(data.toJSON());
            // perform binding as needed
            viewModel.subscribe();
            // set the mode to editing, since we have
            // selected an existing item
            viewModel.set("Editing", true);
        },
    }).data("kendoGrid");
Atanas Korchev
Telerik team
 answered on 21 Jan 2014
1 answer
116 views
I have my upload set to be async with the autoupload off.  I have created a list template which adds a dropdown to each of the files to be uploaded.  How can I on upload reference the dropdown for each of the corresponding file uploads and pass that dropdown's value as metadata along with the file.  I know how to attach meta data, but I don't know how to get the current file's, that is being uploaded, container so I can get the correct dropdown value to attach to the metadata.  I have read that the files can upload out of order, so I can't depend on the files being uploaded in a perfect order.  

Thanks,
Joe
Dimiter Madjarov
Telerik team
 answered on 21 Jan 2014
1 answer
186 views
Hello,

the labels of pie/donut chart are not completely shown under certain circumstances. Please see the attached screenshot.
The left label reads 'Verpasst 0%', the right one 'Angenommen 100%'

As a workaround at this time I set left and right margin (according to german text).
Since the text varies according to languages this workaround does not work under all conditions.

Is this a bug and is there another workaround?

TIA
Dirk
Iliana Dyankova
Telerik team
 answered on 21 Jan 2014
3 answers
286 views
I have the following Data Source in my page:

var dsAll = new kendo.data.DataSource({
    serverFiltering: true,
    transport: {
        read: {
            type: 'POST',
            url: '/pages/ajax/page.ashx',
            dataType: 'json',
            data: {
                action: 'model',
                modelname: function () {
                    return $('#txtModelName').val()
                }
            },
            cache: false
        }
    },
    schema: {
        data: function (response) {
            if (response == undefined) {
                $('#spanDateRange').hide();
                $('#gridTrend').hide();
            }
            else {
                console.log('DataSource "dsAll" Bound');
                $('#spanDateRange').show();
                $('#gridTrend').show();
                return response;
            }
        },
        model: {
            fields: {
                TrendModelId: { type: 'number' },
                EOM: { type: 'date' },
                Seg: { type: 'string' },
                LostPriceQty: { type: 'number' },
                LostPriceRev: { type: 'number' },
                LostAvailQty: { type: 'number' },
                LostAvailRev: { type: 'number' }
            }
        }
    }
});
The date is passed to the Data Source in this format '2009-12-31T00:00:00'.

But when I bind to a grid or dropdownlist, the format is a weird 'Thu Dec 31 00:00:00 PST 2009'. Strangely enough, creating a template and using kendo.toString(EOM, "d") does produce '12/31/2009'.  If I bind a dropdownlist to the Data Source the selected value is returned in the weird format, even if I define a valuetemplate.

I need the to date to be in some valid format and I'm not sure how to fix it.


Edit:
Ok after further testing I found that the strange formatting only occurs with IE. But I'm still trying to figure out why the value is returned in that format, rather than in the format I specifiy in the valuetemplate.



Alexander Popov
Telerik team
 answered on 21 Jan 2014
1 answer
154 views
i want to get data from excel file,
And draw  chart using excel data,
Iliana Dyankova
Telerik team
 answered on 21 Jan 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?