Telerik Forums
Kendo UI for jQuery Forum
1 answer
130 views
Hi,

I've been going through the bullet chart documentation and figure out how to manipulate different parts of the chart including the target line. What I have not found is how to set the target in the chart parameters. For instance if my values go from 0-8 and I want me bullet graph target to be 7.7 is there a way to set it right inside of the target :{} parameters and now inside of the JSON as I would have to add this field to the current database, or add formatting after the request. So to keep it simple I would like to set the target: in the Kendo JQuery chart params. Thanks.

Alex
Daniel
Telerik team
 answered on 27 Mar 2013
1 answer
92 views
On the destroy event in a grid, I need to have it remove it from the grid and set a delete flag so that when I hit sync it will remove it from the remote database. Right now it saves to localstorage (so they can close the browser and come back to it) then you can sync it up. Problem is that deleting it from the local database means it doesn't send anything to the server to tell it should be deleted. If there is a way to change the "Venue" line to read "deleted" or something then I can parse that out, but I'd want it to not show.

Hopefully that makes some sense.

Here is the delete in the grid call.
command : [{
    name : "delete",
    text : "Del",
    click: removeLine,
}],

Here is the removeLine function:
1.function removeLine(e) {
2.  console.log('removeLine');
3.  e.preventDefault();
4.  var dataItem = $(e.currentTarget).closest("tr");
5.  console.log(dataItem);
6.}
Here is my datasource:
01.dataSource = new kendo.data.DataSource({
02.    change : function() {
03.        var dataSourceJson = JSON.stringify(dataSource._data);
04.        console.log(dataSourceJson);
05.        // Set Datasources into localstorage
06.        localStorage.setItem('dataSource', dataSourceJson);
07.    }, data : products, pageSize : 20, schema : {
08.        model : {
09.            id : "ID",
10.            fields : {
11.                ID  : {
12.                    Type: "number"
13.                },
14.                Venue : {
15.                    type : "string"
16.                }, Match : {
17.                    type : "number"
18.                }, Team : {
19.                    type : "number"
20.                }, Alliance : {
21.                    type : "string",
22.                }, DO : {
23.                    type : "string"
24.                }, CP : {
25.                    type : "number"
26.                }, AP : {
27.                    type : "number"
28.                }, AF : {
29.                    type : "number"
30.                }, TP : {
31.                    type : "number"
32.                }, TF : {
33.                    type : "number"
34.                }
35. 
36.            }
37. 
38.        }
39.    }
40.});
Alexander Valchev
Telerik team
 answered on 27 Mar 2013
1 answer
103 views
I get this error when using the kendo window. It’s odd because that’s how the examples show on the Telerik Kendo demos (http://demos.kendoui.com/web/window/index.html) and it works, but it will throw this error anyways. I had to download the latest script files for Telerik Kendo UI Web (http://www.telerik.com/account/your-products/internal-builds.aspx) just to even get the window to work.

Error occurs on the .open() in the script to open the kendo window.

What do I need to do to stop having the run time error pop up?

Partial View:
@{
    ViewBag.Title = "User Preferences";
}
 
<h2>User Preferences</h2>
@(Html.Kendo().Window()
    .Name("winPreferences")
      .Content(Html.Partial("_UserPreferences").ToHtmlString())
      .Title("Edit User Preferences")
      .Draggable()
      .Resizable()
      .Width(500)
 )
<script>
     
        
    $("#winPreferences").data("kendowindow").open();
        
    
</script>
Additional info: 
Using jquery-1.9.0, kendoui.web.2013.1.325.commercial
Kamen Bundev
Telerik team
 answered on 27 Mar 2013
1 answer
128 views
I'm trying to rebind grid to a different datasource and would like to update the header columns .

Tried the follwoings but not workign
$('#grid')..data("kendoGrid").columns=columnStringArray;

Thanks.
Dimiter Madjarov
Telerik team
 answered on 27 Mar 2013
2 answers
31 views
Hi,
We are using a SPA architecture to display the grid.
when clicking the filter (clear or submit) the url changes (post occurs)

is there a way to disable it? (and simply trigger the event to filter)
Efi
Top achievements
Rank 1
 answered on 27 Mar 2013
1 answer
208 views
Is there a way to override or add functionality to the data source so i can add natural sort functionality?  I have a column that has numbers stored as text.  I need it to sort using a natural sort.

I'm using the an ajax data source on a grid.  Where does the sort actually happen, server side or client side?

thanks,
~ Paul
Alexander Valchev
Telerik team
 answered on 27 Mar 2013
1 answer
200 views
Hi,
I have used Kendo ui ajax grid with custom template. Custom template enables dropdown list.

    <div class="upperBarType3">
        <div class="dataGrid">
            @(Html.Kendo().Grid(Model)
        .Name("alarGrid")
                .HtmlAttributes(new { style = "height:400px" })
                .Columns(columns =>
                {
                    columns.Bound(p => p.AlarmCode);
                    columns.Bound(p => p.AlarmName);
                    columns.Bound(p => p.DeviceClassification);
                   columns.Bound(p => p.PriorityList).ClientTemplate "<div class='TreeView' name='TreeView'></div>");
                })
                .Scrollable()
                .Pageable(p => p.PageSizes(true))
                .Sortable()
                .Events(e => e.DataBound("onDataBound"))
                .DataSource(datasource => datasource
                .Ajax()
                .ServerOperation(false)
                .Model(model =>{model.Id(p => p.AlarmCode);})
                .Read(read => read.Action("AlarmConfiguration", "AlarmConfiguration"))
                )
                )
        </div>
    </div>
    
     <div class="btnBar" id="btnBarTabs">
<table border="0" cellspacing="0" cellpadding="0" align="center" class="btnBarTbl">
<tr>
<td>
<input id="btnCancel" type="button" value="Cancel"  causesvalidation="false" />
<input type="submit" name="Submit" id="Submit" class="Submit"  value="Submit" onclick="index()"  />
                    <input type="hidden" id="priorityValue" name="priorityValue"/>
                    <input type="hidden" id="data" name="data"/>
</td>
</tr>
</table>
</div>

<script type="text/x-kendo-tmpl" id="template">
 <option id='${ID}'>${Name}
</option>
 </script>
 
<script>
    function onDataBound(e) {
        $("#alarGrid tbody tr .TreeView").each(function () {
        var currentDataItem = $("#alarGrid").data("kendoGrid").dataItem($(this).closest("tr"));
        $(this).kendoDropDownList({
                dataSource: {
                    data: currentDataItem.PriorityList
                },
                dataTextField: "Name",
                dataValueField: "Id"//,
                //template: kendo.template($("#template").html())
            })
        })
    }
    function index() {
        var data = $("#alarGrid").data("kendoGrid").dataSource.data().toJSON();
        var value = "";
        var count = $("form[id='AlarmConfigForm'] .dataGrid .k-grid-content span .k-input").length;
        for (i = 0; i < count; i++) {
            value = value +data[i].AlarmCode+";"+ $("form[id='AlarmConfigForm'] .dataGrid .k-grid-content span .k-input")[i].innerHTML + "+";
        }
        data = JSON.stringify({ 'data': data });
        $('#priorityValue').val(value);
        $('#data').val(data);
        return data;
    }
</script>


In the above code, if i click on pagination link or sort column then dropdownlist get reseted i.e. if i change value of dropdownlist and then click on say sort on column then dropdown list value get reseted. Also by exploring more on this, i find that this occur due to DataBound event is hitted every time. Is there any way to work on this.

Besides this i tried with Server editing, in that case, post back of page is done on every event like sorting,paging change click.
Daniel
Telerik team
 answered on 27 Mar 2013
3 answers
428 views
Hey

I am using Kendo Taglibs and i am unable to set the axis crossing values in kendo charts the way i used to do it in html without the taglibs. 
For example, earlier i used to use 
 $("#chart").kendoChart({
valueAxis: {
                        min: -10,
                        max: 10,
                        // Keeps the default axis at the 0 crossing point
                        // and moves the "label" axis to the very bottom
                        axisCrossingValues: [0, -10]
                     },
})

(http://jsbin.com/ahavog/107/edit)

But i am not able to use this with the taglib:- 
 <kendo:chart-valueAxis>
<kendo:chart-valueAxisItem  axisCrossingValue="-10000" >
</kendo:chart-valueAxisItem>

I am not able to set the other value resulting in the label and the default axis at the same level. Please help. 
Hristo Germanov
Telerik team
 answered on 27 Mar 2013
1 answer
103 views
hi. Can I define a class using class and the class kendo.data.DataSource kendo.observable? Kendo.data.DataSource and kendo.observable class properties will create will contain the class will be as follows. These two want to make mixin class.

thanks.
Daniel
Telerik team
 answered on 27 Mar 2013
2 answers
120 views
I am using Date/Time Pickers in application to scheduler task. But I don't need all list hours, so I want define the hours list.
It's possible ? Someone can help me?

If I can pass array list, resolve my problem.
Erick Pessoa
Top achievements
Rank 1
 answered on 27 Mar 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?