Telerik Forums
Kendo UI for jQuery Forum
5 answers
232 views
See this jsbin for a working example - http://www.jsbin.com/icidip/3/edit

This applies to both the Slider and RangeSlider widgets.  I have tried this on builds up through the latest internal build, 2013.1.614 commercial (KendoUI Web), with the same results.

It appears as though the events defined declaratively via data-bind, are looking for a callback function contained with the Model rather than the ViewModel. This behavior is different from the other kendo controls we are using (DropDownList, etc.).  The bind value also displays ODD behavior, in that it will accept a collection to bind to that exists EITHER on the ViewModel OR the Model.

Can you help straighten this one out?  We are looking to bind the Slide event to an event we define inside of the ViewModel, not nested inside of the Model (meaning, we expect events on the control to act like events on other Kendo Controls).  Thanks.

Brian

Alexander Valchev
Telerik team
 answered on 27 Jun 2013
1 answer
197 views
Hello! How can I make just such a structure? I using Kendo UI Web.
Kiril Nikolov
Telerik team
 answered on 27 Jun 2013
2 answers
1.4K+ views
Hi,

I'm new to kendo ui grid and i would like to use remote binding as grid's data source. When i try binding grid with yahoo's api, i meet a problem where the footer is not showing any data count or paging although the grid has successful bind.  I have attached my code below. 

Any help would be greatly appreciated.. Thanks

Attachment

 
Yew
Top achievements
Rank 1
 answered on 27 Jun 2013
4 answers
1.1K+ views
So I'm using the DatePicker control for a field that only requires the month and year. I have the behavior of the popup working properly, by setting the Start and Depth to "Year". In doing so, I ran into a problem where the month would be different than the one I selected. I'm not sure if it was this issue, or an issue where, because the date was coming down as the first of the month, the server was on GMT, and the client was GMT-4. So when it got client-side, the date came back as the last day of the previous month at 8pm.

I solved this problem by intercepting the date during inserts on the server, setting it to the 10th of the month and year at Noon, and then saving it. This should have solved the problem, but when I use the DatePicker in a Grid (MVC or Web), the cell goes red once I leave it, whether I actually changed the date or not. This is *extremely * confusing to my end users, and given that I am using the MVC grid, subclassing it with my own functionality is not necessarily an option.

The problem lies in how the textbox blur function works, and how it compares values. When it has the following ParseFormats:

.ParseFormats(new[] {"MM/yyyy", "MM yyyy"})

the DateTime object in the browser doesn't have a day to assign, so it assumes the first of the month. When you leave the field, the function simply compares the old value to the new one, sees that the old day (the 10th) is different from the new day (the 1st) and changes the value, which bubbles back to the DataSource, and tells the Grid the data has changed.

I believe that the blur function should work in a vastly different way. It should break down the date into its various components, and call the set methods on the old value, instead of just doing a wholesale replacement on the date value. In this example, the function cycle through each component of the date, checking if any of the ParseFormats contain the string representation of that part (d, m, y, etc). If it does, it should call the getXXX method of the old date, and compare it to the getXXX method of the new date. If they are different, it should call setXXX on that component alone, instead of doing a wholesale replacement of the current value of the control.

I know that this would complicate the blur function a bit, but it would more accurately represent how the picker should work, given the already-built-in ability to adjust the depth of the control.

Please let me know if you have any questions or need code to reproduce the issue.

Thanks!
Georgi Krustev
Telerik team
 answered on 27 Jun 2013
3 answers
674 views
Struggling to find a simple solutions
 I need to know how to bind it and what the format of the data should be when reading data directly from the server.  I have tried everything but I can't get the data correct. 

My needs
I need the DISTINCT names down the left side.
I need columns stacked horizontally by color
I need an aggregate total running horizontally accross from left to right. 

The data I have on the server. 
[{ name : "jaime", color: "green",  value : 23 }, 
 { name : "jaime", color: "yellow",  value : 34 },
 { name : "jaime", color: "red",  value : 23 },
{ name : "rob", color: "green",  value : 23 }, 
 { name : "rob", color: "yellow",  value : 11},
 { name : "rob", color: "red",  value : 64 }]

Here is my data call
transport: {
    read: {
        url: "/Inspection/SupervisorChartData/",
        dataType: "json"
    }
},
I need to know how to bind the chart based on the data and datasource read syntax. This is the source code from the stacked chart example demo page which is closest to my needs.

        <div id="example" class="k-content">
            <div class="chart-wrapper">
                <div id="chart"></div>
            </div>
            <script>
                function createChart() {
                    $("#chart").kendoChart({
                        title: {
                            text: "Olympic Medals won by USA"
                        },
                        legend: {
                            visible: false
                        },
                        seriesDefaults: {
                            type: "bar",
                            stack: true
                        },
                        series: [{
                            name: "Gold Medals",
                            data: [40, 32, 34, 36, 45, 33, 34, 83, 36, 37, 44, 37, 35, 36, 46],
                            color: "#f3ac32"
                        }, {
                            name: "Silver Medals",
                            data: [19, 25, 21, 26, 28, 31, 35, 60, 31, 34, 32, 24, 40, 38, 29],
                            color: "#b8b8b8"
                        }, {
                            name: "Bronze Medals",
                            data: [17, 17, 16, 28, 34, 30, 25, 30, 27, 37, 25, 33, 26, 36, 29],
                            color: "#bb6e36"
                        }],
                        valueAxis: {
                            max: 180,
                            line: {
                                visible: false
                            },
                            minorGridLines: {
                                visible: true
                            }
                        },
                        categoryAxis: {
                            categories: [1952, 1956, 1960, 1964, 1968, 1972, 1976, 1984, 1988, 1992, 1996, 2000, 2004, 2008, 2012],
                            majorGridLines: {
                                visible: false
                            }
                        },
                    });
                }
 
                $(document).ready(function() {
                    setTimeout(function() {
                        createChart();

                    }, 400);
                });
            </script>
        </div>



jwize
Top achievements
Rank 1
 answered on 26 Jun 2013
2 answers
354 views
I have a master/detail grid (Read only) with a custom stand alone filtering control.

Im looking to be able to filter the details records and update the master data as well.
Im looking to do this all client side.

(ie: Master table of Customers/ Detail table of Orders.  
When i filter the orders by a field (say: Filled = true) through this stand alone control...
I want the Master table to update to show only the records that have details that have the filtered items.)

Is this possible?  How would I go about this?
Sean
Top achievements
Rank 1
 answered on 26 Jun 2013
4 answers
144 views
It seems like the only way to define templates for controls declared with .Net syntax is to use escaped literal text. Whereas if the control is declared with javascript syntax, one can embed the template content in a named/ID'ed script tag and reference that ID. Is there any way to accomlish this with .Net syntax?
FAYE SCHAB
Top achievements
Rank 1
 answered on 26 Jun 2013
2 answers
102 views
The image EditKey1 was generated from the following code inside the Icenium Simulator. Note particular the three divs that are shown as content inside the "enterStatus" div. All three divs are seen in the image.
<div data-role="view" id="share" data-layout="default" class="share-view"
    data-init="app.viewModels.editYFKey.init" data-show="app.viewModels.editYFKey.show" data-model="app.viewModels.editYFKey">
    <header data-role="header">...</header>
    <div id="enterStatus" class="user-status-wrp" style="background-color: white; height:100%;" >
        <div class="user-share" style="width:100%;">
            <span id="YFKeyEdit_NameLabel" style="width: 98%; text-align: center;" ><b>Name:</b></span><br />
            <input id="YFKeyEdit_Name" placeholder="Enter a brief name for the key area here" style="width:99%;" required validationMessage="The name for this key must be given!" />
            <div id="newCommentValidation" class="validation">The name is required!</div>
        </div>
        <div class="user-share" style="width:100%;">
            <span id="YFKeyEdit_IntentionsLabel" style="width: 100%; text-align: center;" ><b>Intentions:</b></span>
            <a class="nav-button" data-align="right" data-role="button" onclick="AddIntention">Add</a>
            <span id="editYFKeyIntentions">
                <ul>
                        <li>test1</li>
                        <li>test2</li>
                        <li>test3</li>
                        <li>test4</li>
                </ul>
            </span>
        </div>
      <div class="user-share" style="width:100%;">
            <span id="YFKeyEdit_DescriptionLabel" style="width: 100%; text-align: center;" ><b>Description:</b></span><br />
            <span class="txtarea-wrp">
                <textarea id="YFKeyEdit_Description" rows="3" placeholder="Enter a description for the key area here" style="width:99%; resize: none;" required validationMessage="The name for this key must be given!" />
            </span>
            <div id="newCommentValidation" class="validation">The name is required!</div>
        </div>
    </div>
</div>


The image EditKey2 was generated from the following code inside the Icenium Simulator. Note that the ONLY difference is that the three divs are in a different order. NOTE THAT THE THIRD DIV JUST DISAPPEARS. Any idea what I am doing wrong, or what concept I'm missing? 
<div data-role="view" id="share" data-layout="default" class="share-view"
    data-init="app.viewModels.editYFKey.init" data-show="app.viewModels.editYFKey.show" data-model="app.viewModels.editYFKey">
    <header data-role="header">...</header>
    <div id="enterStatus" class="user-status-wrp" style="background-color: white; height:100%;" >
        <div class="user-share" style="width:100%;">
            <span id="YFKeyEdit_NameLabel" style="width: 98%; text-align: center;" ><b>Name:</b></span><br />
            <input id="YFKeyEdit_Name" placeholder="Enter a brief name for the key area here" style="width:99%;" required validationMessage="The name for this key must be given!" />
            <div id="newCommentValidation" class="validation">The name is required!</div>
        </div>
            <div class="user-share" style="width:100%;">
            <span id="YFKeyEdit_DescriptionLabel" style="width: 100%; text-align: center;" ><b>Description:</b></span><br />
            <span class="txtarea-wrp">
                <textarea id="YFKeyEdit_Description" rows="3" placeholder="Enter a description for the key area here" style="width:99%; resize: none;" required validationMessage="The name for this key must be given!" />
            </span>
            <div id="newCommentValidation" class="validation">The name is required!</div>
        </div>
        <div class="user-share" style="width:100%;">
            <span id="YFKeyEdit_IntentionsLabel" style="width: 100%; text-align: center;" ><b>Intentions:</b></span>
            <a class="nav-button" data-align="right" data-role="button" onclick="AddIntention">Add</a>
            <span id="editYFKeyIntentions">
                <ul>
                        <li>test1</li>
                        <li>test2</li>
                        <li>test3</li>
                        <li>test4</li>
                </ul>
            </span>
        </div>
    </div>
</div>
Thanks for your assistance!
CW
Chris
Top achievements
Rank 1
 answered on 26 Jun 2013
2 answers
76 views
I have the following (simplified) VMs;

public class ProjectModel
{
    public int ProjectId { get; set; }
    public string Name { get; set; }
    public string Description { get; set; }
    public List<CountryModel> Countries { get; set; }
}

public class CountryModel
{
    public int CountryId { get; set; }
    public string Name { get; set; }
}

I am using the Grid with ajax binding to display the list of projects. I have a custom UI for the user to specify search criteria, i.e. textboxes for name and description, and a MultiSelect control so that the user can select one or more countries.

I want custom filtering against the countries - I want the search to perform an AND filter returning Projects that are associated with all the countries selected by the user.

I am currently able to capture title, description and the selected countries from the MultiSelect, and pass them to my ProjectSearch Controller Action as additional data (using the DataSource Read Data). I then create  FilterDescriptors for the project name and description, but am a bit stuck as to how to do it for the countries. 

So what is the correct way of creating the FilterDescriptors for a country search? What "member" should I specify? What operator do I use?

Many thanks for any assistance.

Phil
Philip Street
Top achievements
Rank 1
 answered on 26 Jun 2013
0 answers
298 views
Hi,
We have used kendo grid in our Tablet app which is developed in html5 using winjs.
We need need to export the data in Kendo grid to ppt.Please help me regarding the same.
Rama
Top achievements
Rank 1
 asked on 26 Jun 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?