Telerik Forums
UI for ASP.NET MVC Forum
3 answers
456 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
102 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
195 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
181 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
78 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
180 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
649 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
385 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
99 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
2 answers
84 views


when the  minimum value is zero, and x-axis type is datetime, the UI element below axis is missing.  here is a repro. http://jsbin.com/cabiqexo/3/edit


(but when the minimum value is negative, or x-axis type is not datetime, ui element can be shown completely in axis. )
Anyone have idea how to show complete elements at x-axis in the above example? 
Thanks!
Jianxun
Top achievements
Rank 1
 answered on 26 Jun 2014
Narrow your results
Selected tags
Tags
Grid
General Discussions
Scheduler
DropDownList
Chart
Editor
TreeView
DatePicker
Upload
ComboBox
MultiSelect
ListView
Window
TabStrip
Menu
Installer and VS Extensions
Spreadsheet
AutoComplete
TreeList
Gantt
PanelBar
NumericTextBox
Filter
ToolTip
Map
Diagram
Button
PivotGrid
Form
ListBox
Splitter
Application
FileManager
Sortable
Calendar
View
MaskedTextBox
PDFViewer
TextBox
Toolbar
MultiColumnComboBox
Dialog
DropDownTree
Checkbox
Slider
Switch
Notification
ListView (Mobile)
Pager
Accessibility
ColorPicker
DateRangePicker
Wizard
Security
Styling
Chat
MediaPlayer
TileLayout
DateInput
Drawer
SplitView
Barcode
ButtonGroup (Mobile)
Drawer (Mobile)
ImageEditor
RadioGroup
Sparkline
Stepper
TabStrip (Mobile)
GridLayout
Template
Badge
LinearGauge
ModalView
ResponsivePanel
TextArea
Breadcrumb
ExpansionPanel
Rating
ScrollView
ButtonGroup
CheckBoxGroup
Licensing
NavBar
ProgressBar
QRCode
RadioButton
Scroller
Timeline
TreeMap
TaskBoard
OrgChart
Captcha
ActionSheet
Signature
DateTimePicker
AppBar
BottomNavigation
Card
FloatingActionButton
Localization
MultiViewCalendar
PopOver (Mobile)
Ripple
ScrollView (Mobile)
Switch (Mobile)
PivotGridV2
FlatColorPicker
ColorPalette
DropDownButton
AIPrompt
PropertyGrid
ActionSheet (Mobile)
BulletGraph
Button (Mobile)
Collapsible
Loader
CircularGauge
SkeletonContainer
Popover
HeatMap
Avatar
ColorGradient
CircularProgressBar
SplitButton
StackLayout
TimeDurationPicker
Chip
ChipList
DockManager
ToggleButton
Sankey
OTPInput
ChartWizard
SpeechToTextButton
InlineAIPrompt
TimePicker
StockChart
RadialGauge
ContextMenu
ArcGauge
AICodingAssistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?