Telerik Forums
UI for ASP.NET MVC Forum
1 answer
80 views
Hello,

I have been trying to figure out  solution that will work with my data. A StockChart has been working very well for right now but my data can be inconsistant with the days. Sometimes there will be two points hours apart, sometimes there will be two points days apart. As result of this, as you zoom into the StockChart, there won't always be data points for a day(s). The current view of this is that the line chart creates a gap from the edge of the graph to the first data point of that specific view. I wish for the line to be continuous at all points even if there is no data. In other words, it is a stepped line chart, and I want the value to maintain until it is changed, so that there is always a line as you continue to zoom. Is there a setting to achieve this?
Iliana Dyankova
Telerik team
 answered on 01 Jul 2014
3 answers
446 views
I am succeding in changing tick labels on a slider called on javascript

  <script>
        $(document).ready(function () {
 
            var slider = jQuery("#slider").kendoSlider({
                increaseButtonTitle: "Right",
                decreaseButtonTitle: "Left",
                showButtons: true,
                min: 1,
                max: 4,
                largeStep: 1,
 
                tooltip: {
                    enabled: false
                },
                orientation: "horizontal"
            });
 
            var steps = {};
            steps[0] = 'very low';
            steps[1] = 'medium';
            steps[2] = 'hight';
          
 
            var sliderItems = slider.siblings(".k-slider-items");
             
            $.each(steps, function (index, value) {
                var item = sliderItems.find("li:eq(" + (index) + ")");
                item.attr("title", value);
                item.find("span").text(value);
            });
 
        });
 
    </script>
 
 <div id="slider">
 
</div>

Work!
But, I would like to do the same trick on a Slider generated by an asp helper

@(Html.Kendo().Slider()
                      .Name("nameSlider")
                      .IncreaseButtonTitle("Right")
                      .DecreaseButtonTitle("Left")
                      .Min(0)
                      .Max(3)
                      .SmallStep(1)
                      .Value(0)
                      .Orientation(SliderOrientation.Horizontal)
                      .HtmlAttributes(new { @class = "balSlider" })
                      .Deferred()
)
 
 
  @Html.Kendo().DeferredScripts()
 
 <script>
 
$(document).ready(function () {
 
        var selectedSlider = $("#nameSlider").data("kendoSlider");
 
         var sliderItems = selectedSlider.siblings(".k-slider-items");
 
         $.each(steps, function (index, value) {
                var item = sliderItems.find("li:eq(" + (index) + ")");
                item.attr("title", value);
                item.find("span").text(value);
            });
 
    });
 </script>

unfortunately, it does not work.

Any ideas?



Iliana Dyankova
Telerik team
 answered on 01 Jul 2014
0 answers
99 views
Could someone point me to a working example of how to implement a Kendo MVC Wrapper Grid that has Add and Edit popup.
In the popup editor to Edit: I'd like to be able to show the Product.Name, but change only the ProductType and ProductCategory.
In the popup editor to Add, I'd like to be able to select the Product, ProductType, and ProductCategory.
e.g.

ProductCategory:
ID
Name

ProductType:
ID
Name

Product:
ID
Name
ProductType
ProductCategory

Thanks
Paul
Top achievements
Rank 1
 asked on 30 Jun 2014
2 answers
186 views
say I have draw a line chart with 5 data series. At some data points multiple series may intersect. e.g., at x=10, all the lines have a y-value of 0.  When user mouse hover these overlap data points, I always want to show the tooltip from series k. That is to say, series k has a "z-index" bigger than other series. Could kendo chart provide such a parameter? I want to show some particular line always on top of other lines when overlap, as well as its tooltip.
Iliana Dyankova
Telerik team
 answered on 30 Jun 2014
1 answer
172 views
I would like to call a JavaScript function when a nodes' checkbox is clicked so that I can update anther control on screen. There is not a "OnChecked" event, so is it possible ?

Any help appreciated,
John
Dimiter Madjarov
Telerik team
 answered on 30 Jun 2014
1 answer
71 views
Hello, 

I have seen the default behavior on the live demo of Zoom switch from Days to Weeks to Year if you zoom out far enough. I was wondering if it was possible to have data say in a week span to start in days and zoom into displaying hours. 

Thanks.
Iliana Dyankova
Telerik team
 answered on 27 Jun 2014
1 answer
171 views
Hi,

I am developing a Kendo UI grid binding to ASP.NET MVC Web API controller.  I have used the DataSourceRequestModelBinder class from the sample Web API Kendo project and the grid is working.  Now I am attempting to add my own wildcard textbox field for filtering/searching the grid.

The following is the JS I have for doing this:

$('body').on("keyup click input", "#txtSearchCarGrid", function() {
var $filter = new Array();
var searchText = $("#txtSearchCarGrid").val();

if (searchText.length > 2) {
$filter.push({ field: "CarName", operator: "contains", value: searchText });
$filter.push({ field: "CustomerName", operator: "contains", value: searchText });

$filter.push({ field: "TankSize", operator: "contains", value: searchText });
$filter.push({ field: "MPG", operator: "contains", value: searchText });
} else {
return false;
}

return $("#CarGrid").data("kendoGrid").dataSource.filter({ logic: "or", filters: $filter });;
});

If I comment out the TankSize and MPG lines the filtering works as expected and I can search across the grid for CarName or CustomerName and the grid data will be filtered.  The error I have having is with the TankSize which on my view model class is a int? field and MPG which is a double? field.  When I include the lines in the js to search for them and start typing 60.0 which I know matches a number of MPG values on the grid data I get an error

An exception of type 'System.ArgumentException' occurred in Kendo.Mvc.dll but was not handled in user codeAdditional information: Provided expression should have string type

How can I fix this so I can search numeric fields across my WebAPI Binded grid in my js function?
Nikolay Rusev
Telerik team
 answered on 27 Jun 2014
3 answers
634 views
Hello,

I use dropdownlist as an editortemplate for my Kendo Grid like this:

columns.Bound(c => c.Test.Text).Width("5%").EditorTemplateName("Test").EditorViewData(new { data= ViewData["data"] }); 

and this is my dropdownlist that is in the editortemplates folder:

@(Html.Kendo().DropDownList()
      .Name("Test")
           .DataTextField("Text")
           .DataValueField("Text")
           .AutoBind(true)
           .DataSource(c =>
               {
                   c.Read(k => k.Action("GetMethod", "Controller", new { data = ViewData["data"] }));
               })
)

that works fine. However, there is a problem about refreshing datasource of this dropdownlist. Because i can not find any way to access dropdownlist and refreshing its datasource. How can i do this?, how can i trigger read action of dropdownlist?

            


Vladimir Iliev
Telerik team
 answered on 27 Jun 2014
1 answer
374 views
So my scenario is that I am using the upload helper to do a 1 file upload of an excel file which is fine and dandy.

Rather than save the file to disk I am reading it into memory and then performing some simple file validation on the server (checking allowed extensions and file size)

Providing these checks pass I then am parsing the excel document into a dataset using NPOI Excel Helper and then finally converting this dataset into a List<T> where T is my viewmodel for this particular excel document.

This all works really well but I am wondering how I can pass back the data to the client and then bind it to say a Grid as the documentation for the async process seems to indicate if it finds anything coming back in the content stream then this is classed as an error. So is my only hope to change this to a sync upload and then let the user wait for this process to finish (It can take up to 10 minutes to process a document with 5K lines of data) or is there a way that I can pull back this List collection and bind it to a kendo grid?

Petur Subev
Telerik team
 answered on 26 Jun 2014
1 answer
94 views
Hello,

I have the following code  using Razor.  I am trying to get the error Event but I am not seeing that method.( Assembly Kendo.Mvc.dll, v2014.1.415.545 - public class SplitterEventBuilder )


  .Content(
                Html.Kendo().Splitter()
                    .Name("horizontal")
                    .Events(events => events
                    .ContentLoad("contentLoaded"))

---------------------------------------------------------------
                                             horizontalPanes.Add()
                            .HtmlAttributes(new { id="treeid" })
                            .Scrollable(true)
                            .Collapsible(false)
                            .Resizable(true)
                            
                            .LoadContentFrom(@"getbyid", "controller", new { documentId = 1}
                            
Alex Gyoshev
Telerik team
 answered on 26 Jun 2014
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?