Telerik Forums
Kendo UI for jQuery Forum
3 answers
358 views
Hello,

I created a kendo grid and I handled the save event of the grid to execute my code for inserting/updating the database. However, every time I try to insert or update an item the save event is fired twice. I have attached a simple running page which demonstrates the issue.
Could you give me an advice what might be the reason for this problem and how it could be resolved? When an item is updated it is not such a problem if the item is updated twice, however, when inserting an item if the save event is fired twice two items will be inserted in the database which is not correct.

Thank you for your assistance in advance!
Rosen
Telerik team
 answered on 24 May 2013
6 answers
455 views
The scenario in the link below is almost exactly what my project requires.

http://demos.telerik.com/aspnet-ajax/grid/examples/programming/draganddrop/defaultcs.aspx

Unfortunately it has taken the better part of 2 weeks hunting through KendoUI's terrible documentation and poorly maintained forums and have not been able to recreate the situation.

Can someone please direct me as to where to find out how to create a set of drag and drop grids?
Samuel
Top achievements
Rank 1
 answered on 23 May 2013
4 answers
190 views
I have been seriously looking over the new kendo features (View, Layout, Router, etc). I am trying to figure out the best practices for structuring my app with said new features and was looking for some input on the subject.

I would appreciate some feedback to the following questions:
  1. My general impression is that the ObservableObject is solely intended for supplying data and event handlers to views+widgets. The responsibility of populating widgets and binding events falling to the bound views and any widgets they contain. Is this assumption correct?
  2. Assuming yes, if I want to pop up a temporary window, or add a widget to one of my bound views, who should be responsible for this? The ObservableObject, View, Widgets, or the Router?
  3. When it comes to displaying and editing data, the impression that I have gotten is that we are supposed to use views (with a form) for single objects, and widgets for collections of objects. Is that correct?
  4. When it comes to binding templates to MVVM bound widgets inside Views, all your examples say to use IDs to script tags within the page. Well what should I do when I am loading templates as strings in RequireJS rather than putting them in the DOM?

Thanks for any help you can provide. I am really eager to start using these new features. :)

Mike Powell
Top achievements
Rank 1
 answered on 23 May 2013
1 answer
95 views
Hello,

In the datetimepicker demo, the line separator is displayed correctly.  However, on my web site, it doesn't.

After investigating the problem, I did find out that the CSS used in the Kendo Demo isn't the same CSS distributed in the 2013.1.319 version.

Indeed, an height: 100% style seems to be present in the Demo CSS, but there's no trace of it in the distributed CSS.

Here's an image that will show you what is going on exactly

Best regards,

Simon
Simon
Top achievements
Rank 1
 answered on 23 May 2013
2 answers
194 views
We have recently upgraded our jQuery version, as well as downloaded the latest version of Kendo UI.
Since then, the following code, which worked previously, doesn't do anything:
var splitter = $("#horizontal").data("kendoSplitter");
if (expand && $("#center-pane").data("pane").collapsed) {
        //expand
        splitter.expand("#center-pane");
}
else {
        //collapse THIS ONE ISN'T WORKING
        splitter.collapse("#center-pane");
}
Either this is a known bug for everyone who recently upgraded jQuery, or, I suspect it is more likely because we are using a *customized* minified jQuery file, rather than the jquery.min.js included in the Kendo download. 

So, my question is: specifically, what dependencies of jQuery are required for the splitter tool. Also, are there any jquery.ui.js dependencies for the splitter? Aka, what jQuery libraries is the Splitter built upon? I couldn't find this type of documentation in the product specs. I would like to make sure our custom minified file includes all that is completely needed.

Thanks for your help!
Sarah
Petur Subev
Telerik team
 answered on 23 May 2013
3 answers
173 views
I've looked for a recent example of this and can't seem to find it.

I
have a listview that displays results.  I want the user to see a slider
and edit the slider without having to enter the edit mode of the
listview.  I'll use custom ajax to pull that off... BUT i can't seem to
add the slider to the template... it never renders. I just get the plain
input box.

I've tried this:
<script type="text/x-kendo-tmpl" id="template">
<div class="search-result k-block k-shadow" >      
      
            <input id="#=apiId#" type="button" class="k-button search-follow" value="#if(userId==null){#Follow#}else{#Unfollow#}#"/>
            <input class="#=apiId#"  value="0" data-role"slider"/># $("."+apiId).kendoSlider({
                orientation: "vertical",
                min: 0,
                max: 5,
                smallStep: 1,
                largeStep: 5,
                showButtons: false
            });#
   </div>
  </script>
and this:

<script type="text/x-kendo-tmpl" id="template">
   
<div class="search-result k-block k-shadow" >     
          <input id="#=apiId#" type="button" class="k-button search-follow" value="#if(userId==null){#Follow#}else{#Unfollow#}#"/>
           <input class="#=apiId#"  value="0" data-role="slider"/>
</div>
</script>


Alexander Valchev
Telerik team
 answered on 23 May 2013
1 answer
723 views
Hi,

I have a datepicker that I am using to increment/decrement the day by using the up/down arrow by binding the keypress event.  This works fine unless the user types in a new date before leaving the datepicker and then hits the up/down arrow in which case the value() is not updated.  What I want to do is upon an up/down arrow keypress, FIRST update the value() and then increment/decrement the day.  How can I do this?

My js is as follows:
$("#thedatePicker").on("keydown", function(e) {
        var keyCode = e.keyCode || e.which;
        var day=0;
         
        if (keyCode == 38) {
            e.preventDefault();
            day=1;
        }
        else if (keyCode == 40) {
            e.preventDefault();
            day=-1;
        }
        else
            return;
 
        var picker = $(this).data("kendoDatePicker");
 
        // update value() here in the event the user manually typed a new date
 
        var dateVal = picker.value();
 
        if (dateVal == null)
            return;
 
        dateVal.setDate(dateVal.getDate() + day);
 
        picker.value(dateVal);
    });


Thank you,
David A.
Georgi Krustev
Telerik team
 answered on 23 May 2013
2 answers
497 views
Hi Everybody,


     I have downloaded KendoUI v 2012.2.710  trial version and trying out few samples.
    
     My Requirement is as follows:

    1. I have two Kendo UI grids.
        a. Left Grid contains data from database.
        b. Right grid Empty.
        c. A button in between two grids.

   Scenario 1:

   I need to drag rows from left grid and drop in right grid,
   on right grid drop, the dropped data should be available only in the right grid, and should not be available in the left grid.

 Scenario 2:
 
  select multiple rows in the left grid.
  Click on the button between the two grids should populate the right grid and the selected data should not be available in the left grid.

Scenario 3:

  on double clicking a row in left grid the data should be moved to the right grid.

And the same should be done right to left also.

Is this possible using kendo grid?
Please give me suggestions ASAP.

Thank You,
Kalidhas.P
KendoUI v 2012.2.710
Rachael
Top achievements
Rank 1
 answered on 23 May 2013
6 answers
193 views
I'm using the Kendo extensions for MVC and binding the grid like so:

@(Html.Kendo().Grid<AS.Model.Usuario>()
    .Name("gridUsuarios")
    .DataSource(dataSource => dataSource // Configure the grid data source
        .Ajax() // Specify that ajax binding is used
        .Read(read => read.Action("_Items", "Usuarios").Data("searchUsuariosParams")) // Set the action method which will return the data in JSON format and the function that will pass parameters
    )
    .Columns(columns =>
    {
        columns.Bound(it => it.Username).Title("Usuario");
        columns.Bound(it => it.Displayname).Title("Nombre");
        columns.Bound(it => it.Email).Title("Email");
        columns.Bound(it => it.ID).Title("").Sortable(false).ClientTemplate("#= editUsuario(data) #");
    })
    .Pageable() // Enable paging an localize it
    .Sortable() // Enable sorting
)

I need a way to get the Ajax.Read.Data function name, in this case "searchUsuariosParams" from the kendo grid javascript object.

Thanks
Sergi
Top achievements
Rank 1
 answered on 23 May 2013
2 answers
1.6K+ views
Hi,
I am trying to create a chart with multiple line series on it. Data source for the chart is setting dynamically so i can change the series value at run time (live mode) .Chart with single line is working properly in my web application, but i want to add multiple line series and set the values dynamically . Is there any way to do it ? How can i change values of multiple line series ?
Jayesh Goyani
Top achievements
Rank 2
 answered on 23 May 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?