Telerik Forums
UI for ASP.NET MVC Forum
2 answers
1.0K+ views
Hello,

I have a kendo UI MVC grid, I use the popup edit template.
And I created a customer edit templates.  My model has a property as type (holds three different values).
For different type, my edit template condition changes.  

For example, the release date - for Type 1, it is read only; for Type 2, it is editable; and for Type 3, the label needs to be changed slightly.

I tried to use if statement in the partial view (custom edit template) to check.  But it does not work since popup edit template is loaded when grid is loaded.

So is there a way that I can accomplish what I described here with  kendo UI grid?

Thanks in advance

Dongfen Gao
Dongfen
Top achievements
Rank 1
 answered on 01 Jul 2014
1 answer
127 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
479 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
114 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
239 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
209 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
124 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
198 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
671 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
405 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
Narrow your results
Selected tags
Tags
Grid
General Discussions
Scheduler
DropDownList
Chart
Editor
TreeView
DatePicker
ComboBox
Upload
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
Dialog
MultiColumnComboBox
DropDownTree
Checkbox
Slider
Switch
Notification
Accessibility
ListView (Mobile)
Pager
ColorPicker
DateRangePicker
Security
Wizard
Styling
Chat
DateInput
MediaPlayer
TileLayout
Drawer
SplitView
Template
Barcode
ButtonGroup (Mobile)
Drawer (Mobile)
ImageEditor
RadioGroup
Sparkline
Stepper
TabStrip (Mobile)
GridLayout
Badge
LinearGauge
ModalView
ResponsivePanel
TextArea
Breadcrumb
ExpansionPanel
Licensing
Rating
ScrollView
ButtonGroup
CheckBoxGroup
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
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?