Telerik Forums
Kendo UI for jQuery Forum
2 answers
115 views
I am making a C# Razor MVC web app which uses kendo UI charts. I have 2 different chart setups on my index view.

3 of my charts pass a single parameter to a function called _GetAttrTop3 which then passes more parameters on to the controller. My 2 other charts don't send a parameter, but fires a function called _GetAttr() which sends parameters to the controller.

The problem is with the 3 charts that pass the parameter to the _GetAttrTop3 function. The parameter that gets passed to the function always gets passed along to the controller but there is always another parameter in that function that gets dropped.

Originally "Shift" was the parameter that wasn't passing, so I made it a session variable to fix the problem, but "Type" stopped getting passed, and now "LineName" isnt passing. So it seems that it always drops one parameter when I try to send it a parameter from one of the 3 WasteCategory#Charts. This is strange because the 2 other charts that dont send a parameter to their respective return function ( _GetAttr() ) work just fine.

attached is my _Layout.cshtml and my view called Index.cshtml
Davin
Top achievements
Rank 1
 answered on 11 Jun 2013
1 answer
128 views
My customer, a bank, is used to (and it looks like it is a common behaviour) let users insert some special characters, in numeric boxes, to simplify and speed up typeing.
Notably, the use 'k' for 1.000, and 'm' for 1.000.000: so, to insert for example 1500000, the user can type '1.5m', obtaining the same result (and with minor chance of error).
Can I implement anything like that, in the NumericTextBox?
Thanks as always
Andrea
Georgi Krustev
Telerik team
 answered on 11 Jun 2013
4 answers
1.0K+ views
Hi there,

need to search kendo ui grid by text box. please let me know is possible.

Thanks,
Rajesh.C

Alexander Valchev
Telerik team
 answered on 11 Jun 2013
1 answer
103 views
hi guys.
last friday i  purchase icenium developer license and kendo web license. till friday i use the icenium and kendo web in my test apps  with trial license so i didnt publish them. now after purchasing, when i try to use kendo.web.js file in my project i get messed style in mmy app..
when i use kendo.all.min.js file instead of kendo.web.js everything is fine...
anyone know why?
best regards
 maor
Steve
Telerik team
 answered on 11 Jun 2013
1 answer
160 views
I wanted some persistence with Cascading Combo Boxes when using an AJAX data binding.
The solution also needed to be able to pass a 'selected value from the controller handling the data retrieval.

This is what i came up with, hopefully this is useful to someone else aswell
cshtml
Only thing of note here is the jQuery DataBound event that will handle getting the selected value and setting it
<label for="Client">Client</label>
            @(Html.Kendo().ComboBox()
                .Name("Client")
                .Placeholder("Select Client...")
                .DataTextField("ClientName")
                .DataValueField("ClientID")
                .Events(e => e.DataBound("onDataBoundClient"))
                .DataSource(source =>
                    {
                        source.Read(read =>
                            {
                                read.Action("GetClientsCombo", "Tools");
                            });
                    })
                )
            <label for="Package">Package</label>
            @(Html.Kendo().ComboBox()
                .Name("Package")
                .Placeholder("Select Package...")
                .DataTextField("PackageName")
                .DataValueField("PackageID")
                .Events(e => e.DataBound("onDataBoundPackage"))
                .DataSource(source =>
                    {
                        source.Read(read =>
                            {
                                read.Action("GetPackagesCombo", "Tools")
                                    .Data("filterPackages");
                            })
                            .ServerFiltering(true);
                    })
                .Enable(false)
                .AutoBind(false)
                .CascadeFrom("Client")
              )
ToolsController.cs
Additional bool coloumn in select that will return true only if selected Client/Package Id is = to session var
public JsonResult GetClientsCombo()
        {
                int selectedClientId = Session["selectedClientId"];
                var query = //Linq Query to get results
                            select new
                                {
                                    ClientID = LinqClientIdColumn,
                                    ClientName =  LinqClientNameColumn,
                                    Selected = LinqClientIdColumn == selectedClientId
                                };
                return Json(query, JsonRequestBehavior.AllowGet);
        }
 
        public JsonResult GetPackagesCombo(int clients, string packageFilter)
        {
                int selectedPackageId = Session["selectedPackageId"];
                var query = //Linq Query to get results
                            select new
                            {
                                PackageID = LinqPackageIdColumn,
                                PackageName = LinqPackageNameColumn,
                                Selected = LinqPackageIdColumn == selectedPackageId
                            };
           
                return Json(query, JsonRequestBehavior.AllowGet);
 
        }
JS ondatabound events
These functions are called when data is bound to the combo boxes. They get the data object from the AJAX call and return an array of objects, using jQuery Grep, where selected is === true then use the first object found to populate select a default value from the combo.

I initially tried compacting these two functions into one abstracted function and passing the jquery selector reference and selectedObject[].property as variables in the event handler. Evidently passing variable eg (.Events(e => e.DataBound("onDataBoundPackage('var1', 'var2')")) in the databound event handler breaks the databinding.
function onDataBoundClient() {
                    var DataObject = $("#Client").data("kendoComboBox").dataSource.data();
                    var selectedObject = $.grep(DataObject, function (obj) {
                        return obj.Selected === true;
                    });
                    $("#Client").data('kendoComboBox').value(selectedObject[0].ClientID);
                };
                function onDataBoundPackage() {
                    var DataObject = $("#Package").data("kendoComboBox").dataSource.data();
                    var selectedObject = $.grep(DataObject, function (obj) {
                        return obj.Selected === true;
                    });
                    $("#Package").data('kendoComboBox').value(selectedObject[0].PackageID);
                };

Jayesh Goyani
Top achievements
Rank 2
 answered on 11 Jun 2013
1 answer
46 views
Hi

How can I search only e.g. "web/splitter" subcategory in Kendo forums?
(secondly there seems to be no general category to post this kind of question.. :)

Thanks
 Raido
Iva
Telerik team
 answered on 11 Jun 2013
1 answer
207 views
Is it possible to call a viewmodel method from within the markup for a viewmodel?
Alexander Valchev
Telerik team
 answered on 11 Jun 2013
3 answers
135 views
I have two JS fiddles:

http://jsfiddle.net/fL28r/1/   - Using 2011.3.1129
http://jsfiddle.net/fL28r/2/   - Using 2012.1.515

First Fiddle:
If you try to drag and drop from the Grid to the treeView, you will see that the cursor offset looks valid and the row is not below the cursor.

Second Fiddle:
If you try to drag and drop from the GridView to the treeView, you will see that the hint gets displayed UNDERNEATH the cursor. This is causing me problems as it seems to think that the dropTarget is the hint object instead of a treeNode.

I have also tried this in the latest commercial build (v2012.1.601 [using my commercial account]) and am able to reproduce the issue. Would I be able to get help in resolving this issue?
Stefano
Top achievements
Rank 1
 answered on 11 Jun 2013
1 answer
194 views
I am trying to upload a file via a service that implements OData. I cannot seem to set any additional headers on the upload control. I need to set a custom slug header.

Here is the error I am receiving. Despite what it says the header format is below the error.

Invalid slug header for attachment. Slug headers must be of the form "EntitySet,ItemId,Name".

Here is how the headers should look:
    Slug: MyListTitle|1|mydocument.docx
T. Tsonev
Telerik team
 answered on 11 Jun 2013
1 answer
113 views
We want to reset the scroller in the data-after-show function of a view. It works well everywhere except after a getting to a page using the back-button - as it seems that when we get there the app view id is still the one of the page where the button was clicked, and not the page to which we return and where the event is bound.

Is there a way around this?
Petyo
Telerik team
 answered on 11 Jun 2013
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
DatePicker
Spreadsheet
Upload
ListView (Mobile)
ComboBox
TabStrip
MultiSelect
AutoComplete
ListView
Menu
Templates
Gantt
Validation
TreeList
Diagram
NumericTextBox
Splitter
PanelBar
Application
Map
Drag and Drop
ToolTip
Calendar
PivotGrid
ScrollView (Mobile)
Toolbar
TabStrip (Mobile)
Slider
Button (Mobile)
Filter
SPA
Drawing API
Drawer (Mobile)
Globalization
LinearGauge
Sortable
ModalView
Hierarchical Data Source
Button
FileManager
MaskedTextBox
View
Form
NavBar
Notification
Switch (Mobile)
SplitView
ListBox
DropDownTree
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
ColorPicker
Pager
Styling
MultiColumnComboBox
Chat
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
ScrollView
Switch
BulletChart
Licensing
QRCode
ResponsivePanel
TextArea
Wizard
CheckBoxGroup
Localization
Barcode
Breadcrumb
Collapsible
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
TimePicker
BottomNavigation
Ripple
SkeletonContainer
Avatar
Circular ProgressBar
FlatColorPicker
SplitButton
Signature
Chip
ChipList
VS Code Extension
AIPrompt
PropertyGrid
Sankey
Chart Wizard
OTP Input
SpeechToTextButton
InlineAIPrompt
StockChart
ContextMenu
DateTimePicker
RadialGauge
ArcGauge
AICodingAssistant
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?