Telerik Forums
Kendo UI for jQuery Forum
2 answers
95 views
I am putting this thread here because the issue is in the datasource and not in the dropdownbox.

I have a screen with a dropdownbox and a grid.  The grid has data passed to it in the model and creates a datasource to load those values.  The dropdownbox uses a URL to call the controller to retrieve values remotely.  When the screen is loaded, the items in the list all have the correct description (the relevant text and id options are set on the drop down), but the selected item just reads '[object object]'.

This is where it gets odd.  If I remove the grid and change nothing else, the drop down works correctly.  All options being passed into the drop down and the datasource are identical in every way in both situations.

I have switched to the non minified script and stepped through.  When I have the grid I reach L105 of kendo.data.js (wrapAll) and:

target[0] instanceof ObservableObject returns true, but

target[0] instanceof kendo.data.ObservableObject returns false.

ObservableObject and kendo.data.ObservableObject are references to the exact same definition, so how is this even possible?  This false result then causes the drop down box code to display the selected item the way it does.

I have been unable to replicate this issue in the Kendo dojo so I realise it will probably be hard for you to offer any help, but can you think of anything which might cause this?

All parameters are identical, the grid on the screen is the only difference.  It still happens if I remove the datasource from the grid so it's not even two datasources clashing.

I will continue trying to recreate this outside of my system (its a complex project so I cannot post it as an example).
Karl
Top achievements
Rank 1
 answered on 11 Apr 2014
4 answers
163 views
Hello,

I have a little issue using the Grid control (MVC). All works fine except for one small problem. The filter window doesnt appear when you click the filter option on the grid header.

I can see in the source that window is being shown, the only problem is it's top value is -1000px. If I manually adjust this to 0px then the window appears at the top of the window (as you would imaging).

<div class="k-animation-container" style="margin-left: -2px; padding-left: 2px; padding-right: 2px; padding-bottom: 4px; overflow: visible; display: block; position: absolute; top: -10000px; z-index: 10002; left: 502.40625px; box-sizing: content-box;">
//omitted container showing filter form.
 
</div>

Has anyone come across this before and possibly have a fix in place?

From what I can tell the correct kendo & jQuery files are referenced.

bundles.Add(new ScriptBundle("~/bundles/kendo").Include(
                        "~/Scripts/kendo/kendo.all.min.js",
                        "~/Scripts/kendo/kendo.aspnetmvc.min.js"));
 
            bundles.Add(new StyleBundle("~/Content/kendo/css").Include(
                        "~/Content/kendo/kendo.common.min.css",
                        "~/Content/kendo/kendo.default.min.css"));

jquery version 1.8.3, I cant upgrade any higher than that at the moment as it breaks alot of other scripts on the site.

Cheers,

Nico
Darshan
Top achievements
Rank 1
 answered on 11 Apr 2014
1 answer
1.0K+ views
Hi

I have defined a multiselect element in my page. The I am trying to get the value of select items using javascript. When the .Value line is executed on the frontend a duplicate element is created.

The pre and post image is attached.

Please help

Regards,
Sanjay
Definition
@(Html.Kendo().MultiSelectFor(m => m.SeleFromAvail)                           
    .Name("seleLst")
       .Placeholder("Select")
       .HtmlAttributes(new { id = "seleLst", style = "width:940px;" })                           
       .BindTo((List<SelectListItem>)ViewBag.lstAvail)
       .Value((List<SelectListItem>)ViewBag.lstSele)
       .AutoClose(false)
       )
Javascript       
param = $("# seleLst ").kendoMultiSelect().data("kendoMultiSelect").value();
Georgi Krustev
Telerik team
 answered on 11 Apr 2014
3 answers
141 views
Hey I've noticed that with the kendoUI datepicker when initialized outputs the container div and calendar at the end of the HTML body.  I would like to be able to control where this content is appended to the DOM.

The main reason is because I am using this picker on a Bootstrap dropdown that closes on document click, my custom javascript prevents the dropdown from closing if a click is made on any element within that particular dropdown, however since the DatePicker is rendered outside of that div at the end of the BODY tag, choosing a date closes both the datepicker and the dropdown.

Any ideas?
Georgi Krustev
Telerik team
 answered on 11 Apr 2014
3 answers
1.2K+ views
Hello,

In the following code, I would like to bind some data (to display it)... but is some case, I need to change the value of some component by code (in JavaScript). In this case, the ViewModel is not updated (by a "two way" binding). Why ?

HTML
    <input type="button" id="btnChangeValues" value="Change Values" /><br/><br />
    <input id="myNumeric" data-bind="value: MyNumeric" /> 
    <input id="myDate" data-bind="value: MyDate" />   

JavaScript
   window.onload = function() {

    var viewModel = kendo.observable({ MyNumeric: 123, MyDate: new Date(2014, 1, 15) });

    $("#myNumeric").kendoNumericTextBox();
    $("#myDate").kendoDatePicker();
    kendo.bind(document.body, viewModel);

    $("#btnChangeValues").click(function() {
        $("#myNumeric").data("kendoNumericTextBox").value(789);
        $("#myDate").data("kendoDatePicker").value(new Date(2015, 3, 28));
        alert(viewModel.get("MyNumeric") + " - " + viewModel.get("MyDate"));   // Display always OLD values: 123 and 2014-2-15
    });

   };


Can you tell me how to force a "ViewModel Refreshing" ? Is it possible ?

Thanks

Denis
Georgi Krustev
Telerik team
 answered on 11 Apr 2014
1 answer
4.6K+ views
We have a grid with editing mode set to inline edit. The grid autoSync is set to false. User make changes to grid, and on clicking a save button (which is outside the grid), edited grid rows are saved to server. Grid row has a textbox, dropdown box and combobox as input field. Each row also have validation status icon in the last column. If user has not entered any value in textbox, or not selected any value in dropdown box or combobox , validation icon for that row is shown. On hover over the validation icon, corresponding errors for that row are shown to user. If user has selected all valid value, validation icon is not shown, indicating everything is correct.

We are currently doing validation on complete grid and refresh grid to show the icon for row with error. This validation is done every time user insert/update input field value. Can you suggest us the best way to do this? Is there a way, like on changing the row input field value, only row should be refreshed and validation icon should show/not show based on validation status.
Petur Subev
Telerik team
 answered on 11 Apr 2014
2 answers
180 views
Our DropDown lists are appearing on the far left side of the screen when the zoom is changed from 100%.

This happens only in Chrome that we've noticed, and seems it might be related to either or both of a Chrome bug, or a jQuery bug.

My question is: does anyone have a workaround for this that they can share?
Travis
Top achievements
Rank 1
 answered on 10 Apr 2014
1 answer
390 views
How do I use the filterlist object to create SQL query to filter data...  {MVC5 Controller  and cshtml}

So we have custom paging on server side.  We only retrieve set number of records based on limit which works great!!!

Now we want to add filtering based on user input : mainly -  contains and startswith.....

In the Controller:  datasource  I have these values:
MemberName :  "columnName"
Operator          :   "starts with"
Value               :   "searchterm"

What is the best way to create sql statement to filter from a database...I can do this obviously with ExpressionVisitor   (ev)
ev.Where(   columnName   like  'searchterm%' )

Here i am building the sql expression...from the input...and also I need to verify the input is safe....(sql injection..)  How would I do this nicely via Kendo UI ?










Petur Subev
Telerik team
 answered on 10 Apr 2014
4 answers
74 views
Hi,

I'm trying to make the filterable listView working on my app, but it does not work with the given dataSource...

I'm stuck and have no idea of what to do... Any suggestion?

You can see the problem at this page : http://crea.anopetia.com/_default

Best Regards.
Paul-Henri
Top achievements
Rank 1
 answered on 10 Apr 2014
12 answers
600 views
Hello,

I was wondering is there a way to get the current desktop version of the listview to have endless scroll?
Barrie
Top achievements
Rank 1
 answered on 10 Apr 2014
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
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Effects
Accessibility
PivotGridV2
ScrollView
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Breadcrumb
Collapsible
Localization
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
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?