Telerik Forums
Kendo UI for jQuery Forum
3 answers
147 views
code below ,  how to use kendoui API  to  custom these buttons in listview  to make single select one from these, 
<ul data-role="listview">
    <li class="btngroup">
        <a data-role="button" data-click="btnClick" class="scorebtn">10</a>
        <a data-role="button" data-click="btnClick" class="scorebtn">9</a>
        <a data-role="button" data-click="btnClick" class="scorebtn">8</a>
        <a data-role="button" data-click="btnClick" class="scorebtn">7</a>
        <a data-role="button" data-click="btnClick" class="scorebtn">6</a>
        <a data-role="button" data-click="btnClick" class="scorebtn">5</a>
        <a data-role="button" data-click="btnClick" class="scorebtn">4</a>
        <a data-role="button" data-click="btnClick" class="scorebtn">3</a>
        <a data-role="button" data-click="btnClick" class="scorebtn">2</a>
        <a data-role="button" data-click="btnClick" class="scorebtn">1</a>
    </li>
</ul>
1)button click event target is null ? why? use JQuery method below:
$(".btngroup .scorebtn").on("click",function(e){
console.log("btn click"+e.target);
});
e.target is null

2) when click button btnClick function is not fire
function btnClick(e){
    console.log("btnClick");
    console.log(this.element);
}
Alexander Valchev
Telerik team
 answered on 31 May 2013
3 answers
97 views
Hi,

My organization is evaluating your dataviz product and was wondering if the charts allowed a user to compare series in the tooltip with a line - similar to so http://www.highcharts.com/stock/demo/compare. If not, what is the timetable for when this feature may be available?

Thanks much,
Tonih
Iliana Dyankova
Telerik team
 answered on 31 May 2013
1 answer
44 views
When you have a data source that is more than a few pages long, here is a settings and steps to replicate the problem.

  • Select an editable cell on the intial load of the grid
  • Scroll down the grid until dynamic loading occur
  • The select another cell to edit
  • commit the edit by moving the focus away from that cell.
We found that the transport.update method is fired more than once (sometimes more than twice) in this case.

var gridData = new kendo.data.DataSource({
    transport: transport,
    serverPaging: true,
    serverSorting: true,
    serverFiltering: true,
    schema: {
    ...
    },
    pageSize: 50,
    autoSync: true,
    error: gridHelper.error
});
 
grid.kendoGrid({
    dataSource: gridData,
    sortable: true,
    navigatable: true,
    editable: true,
    scrollable: {
        virtual: true
    },
    resizable: true,
    selectable: 'row'
});
Petur Subev
Telerik team
 answered on 31 May 2013
1 answer
139 views
I would like to set a minimum interval for the value axis in a chart because values with decimals don't make sense in this instance (you can't have half of a working chair, for instance).

I tried using valueAxis.labels.format = "n0". However, in an empty grid (which automatically scales to a max of 1.2) this rounds values such as 0.4 down to 0 and values such as 0.6 up to 1 (I've attached a screenshot of what this looks like). I was hoping that any scale value that had a decimal part would not be displayed at all.

Is there any way for me to accomplish this? Other requirements are that I can't set a hard max on the value axis as I need the graph to be dynamically scalable on that axis.
Iliana Dyankova
Telerik team
 answered on 31 May 2013
1 answer
1.5K+ views
When I add a new row my date column is getting a default value assigned to it which is the date from when the grid initially loaded and not the current date.  Is this the expected behavior?
Iliana Dyankova
Telerik team
 answered on 31 May 2013
2 answers
252 views
Hi,
I have been trying to launch a window from a base page and the launch window content view will have to be from an action.
With the below code block, I'm getting a blank window, please help in this regard.
fyi... I have converted my existing application to KendoUI using the tool menu upgrade wizard.

<div id="divDocsUploadWindow">
    @(Html.Kendo().Window()
        .Name("DocsUploadWindow")
    .Title("Customer")    
     .Draggable()
    .Resizable()
    .Width(736)
    .Visible(false)
    .Modal(true)
    )
</div>     
the jquery portion:
 $("#btnOpenDocs ").click(function () {           
        var windowWidget = $("#DocsUploadWindow").data("kendoWindow");
        windowWidget.refresh({
             url: "@Url.Action("UploadViewAction", "UploadController")"
        });
        windowWidget.center();
        windowWidget.open();            
    });

view:
@model Models.UploadFile
@{
    ViewBag.Title = "Upload";
}
<h2>_Upload</h2>
<label>test</label>
@(Html.Kendo().Upload()
        .Name("attachments")       
        .Multiple((bool) ViewData["multiple"])
        .Async(async => async
            .Save("Save", "Upload")
            .Remove("Remove", "Upload")
            .AutoUpload((bool) ViewData["autoUpload"])
        )
    )

Thanks,
Subbu.
Subramanian
Top achievements
Rank 1
 answered on 31 May 2013
1 answer
156 views
Hey Guys,

I'm binding a grid to a table (using the kendo-knockout) library and my table has a caption.  Unfortunately when the binding takes place the caption is no longer in the right place.  It stays on the content table thus appearing between the headers and the main table content.

So..
    <table>
        <caption>Caption</caption>
        <thead>...</thead>
        <tbody>...</tbody>
    </table>

Get's rendered as 

Headings
Caption
Data

rather than 

Caption
Headings
Data

as you might expect.

Is there any way to have captions supported.  I can easily overcome this by having my caption above the table in a span or some such but I'd really like to keep my html as semantic as possible.

Chris
Dimiter Madjarov
Telerik team
 answered on 31 May 2013
1 answer
469 views
I have a grid set up with my datasource and working properly with popup editing. My popup has two drop down lists and a number field. What I would like to do is set the value of the number field to a specific value when the user makes their selection from the first drop down list, essentially pre-populating the number value to "highest entered value for the user selected item + 5". 

Is there a way to hook up to the "change" event for the  drop down list in the popup editor and as part of the function for the change event, query the current dataset bound the grid to retrieve a value, then set that value to the numeric field in the popup editor?

Robert 



Daniel
Telerik team
 answered on 31 May 2013
3 answers
125 views
Hi ,
 I'm trying to build a image gallery with options on swipe the image to the next image and prev image location of an array of images.

The best next thing i could find was the following http://www.webresourcesdepot.com/image-gallery-for-mobile-and-touch-devices-photoswipe/
which does the job perfectly on any browser and with custom toolbar where you can add options for close and etc.
The problem is when i compile the kendo application for ipad 2.0 using phonegab and the latest xcode version the gallery opens fine but i have no event custom listeners except the ones the gallery supports.
I mean if on the toolbar i attach a div with a ID and i try call that id onclick or on tap the event doesnt triggers.
The gallery appends classes on the body and adds some html as well.

So i cant find a relative solution to this problem , is there any other gallery someone could suggest to use that runs on kendo ui mobile?





Alexander Valchev
Telerik team
 answered on 31 May 2013
1 answer
6.0K+ views
Hi
I'm using Kendo window in my MVC application. I was wondering if there is any way to fill the content of the window from partialView ?
For example I have a partial view stored in file PartialViewSample.cshtml

@model Product
@using(Html.BeginForm("InsertProduct","Product"))
{
    Html.TextBoxFor(val => val.Name);
    Html.TextBoxFor(val => val.Id);
}

and in some other place I would like to load this content to kendo window.

<button id="addButton">Add</button>
 <script type="text/javascript">
     $(document).ready(function () {
         var window = $("#window").kendoWindow({
             height: "200px",
             modal: true,
             title: "Centered Window",
             visible: false,
             width: "200px"
             
         }).data("kendoWindow");
     });

If the user clicks the button I would like to load content of the window. I was trying to do this that way

    
$("#addButton ").click(function () {
        var window = $("#window").data("kendoWindow");
        window.content("@Html.Partial("PartialViewSample ",new Product()).ToHtmlString()");
        window.center();
        window.open();
    });
Unfortunatelly it doesnt work. Is there any way to load content of the window from using Html.Partial or sth like that ?
Daniel
Telerik team
 answered on 31 May 2013
Narrow your results
Selected tags
Tags
+138 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?