Telerik Forums
Kendo UI for jQuery Forum
1 answer
185 views
Hi,


I want to use Kendo upload into kendow window, but I am getting issue while uploading it. Below code for kendo upload in page.


ISSUE : I am getting multiple times response in "onSuccessWnd" function and also in my controller. So that same image will display multiple times. Please me solution for same.

It is working perfectly without window.


/********************** image.cshtml page  *********************/

@(Html.Kendo().Upload()
                  .Name("attachments")
                  .HtmlAttributes(new { id = "FilesToUploadWnd", style = "width:100%" })
                  .Messages(m => m.Select("select files from your computer… "))
                  .ShowFileList(false)
                  .Async(async => async
                            .Save("SaveWnd", "Log")
                        )
                  .Events(e => e
                            .Success("onSuccessWnd")
                          )
 
                )


/********************** javascript function  *********************/

function onSuccessWnd(e) {
 
        var url = "../FolderName/" + e.response.status.toString();
 
        var elem = document.createElement("img");
 
        elem.setAttribute("height", "70");
        elem.setAttribute("width", "70");
         
        elem.setAttribute("src", url);
 
        document.getElementById(appendID).appendChild(elem);
  
}
Please let know if any body have a solution for that.
Daniel
Telerik team
 answered on 19 Jun 2013
1 answer
66 views
Hi!

When the page is zoomed in Chrome and FF (haven't checked other browsers) at approximately 150%, and you try to slide over the tree nodes with a mouse from top to bottom, the whole tree shakes along with its nodes. It's subtle but very inconvenient. Can anything be done to get rid of this behavior? At 100% zoom it's cool. 

This can be reproduced even in a demo: http://demos.kendoui.com/web/treeview/index.html

Thanks in advance!
Dimo
Telerik team
 answered on 19 Jun 2013
2 answers
2.1K+ views
Inside selContentItem() shouldn't e.sender be the kendoListView and thus the same as (in this case) $('#contentListView').data('kendoListView')? When I break and debug, it looks like it (though == returns false), but e.sender.dataSource is empty.

$('#contentListView').kendoListView({
        dataSource: data
        , template: kendo.template($("#template").html())
        , selectable: "single"
        , schema: {
            model: {
                children: "Children"
                , id: "id"
                , hasChildren: "hasChildren"
            }
        }
        ,change: selContentItem
    });
  
function selContentItem(e) {
    //I would expect the following to return true and if it did (and similar logic followed), the next line would work nicely but it doesn't because the first line returns false. Why?
  
    console.log(e.sender == $('#contentListView').data('kendoListView'));
    console.log(e.sender.dataSource.view()[e.sender.select().index()]);
  
}
Michael
Top achievements
Rank 1
 answered on 18 Jun 2013
1 answer
7.7K+ views
Hi, 

I want to restrict the number of files that can be uploaded to the server for a single Upload click to a maximum of 20.

Is there any way to achieve this in the Kendo UI file upload control. ? 
Roberto
Top achievements
Rank 1
 answered on 18 Jun 2013
7 answers
439 views
Hello,

I have a few questions about globalization :
1) Why don't you use the browser language by default ? If the script of the current culture of the browser was added, why not use it by default ? For the moment, it's always 'en-US'
2) I added the script <script src="scripts/js/cultures/kendo.culture.fr.min.js"></script> in my application. If I set the culture to 'fr-FR' (kendo.culture("fr-FR")), it doesn't work, the default 'fr' script is not used (I think it should be).
3) Is it possible (and how) to use your globalization framework to localize our own strings ?

Cordially,
Kakone.
Georgi Krustev
Telerik team
 answered on 18 Jun 2013
1 answer
154 views
I have a declarative grid inside a template and I'd like to allow the columns to be filterable, but with filterable.extra set to 'false'. Is this possible?
Here's a JSBin example

I've tried every variation of data-filterable-extra="true" / data-filterableextra="true" / data-filterableExtra="true" / etc...
Ideally, I'd only have the input box and assume that the search method is 'contains'.

Note that this lives within a template, and that I need to loop through an array to get the values, so my implementation actually looks more like this.
Dan
Top achievements
Rank 1
 answered on 18 Jun 2013
2 answers
115 views
I have a Kendo UI Web treeview configured to do OnDemand loading from a remote dataservice using JSON and ODATA.  This is working very well, and I have been very pleased.

My issue comes to light when programmatically selecting a node in the tree, and then clicking its expand icon.  What occurs is that the selection immediately jumps to the first root node.  However, if before or after expanding, you manually select (using your mouse) a node then this behavior stops occurring.

I also notice that when programmatically selecting a node I lose my focused node, but that the focus returns whenever a manual selection is made (using your mouse).

I am not sure that these behaviors are related in anyway, and frankly I do not need the focus, my big issue is the selection changing when all that is done is merely expanding the selected node.

So, to recreate:

1) Setup a treeview in the fashion I described above (with 4 levels)
2) Load the treeview's root nodes (1st level) (rest of the nodes are loaded on-demand when expand occurs)
3) Programmatically expand the first root node to the 3rd level down (arbitrary level #)
3) Programmatiically select this node (with children) on the 3rd level
4) Now it is time for the user to interact with the tree  (Notice at this point how no node has focus (cant keyboard navigate)
5) Merely, expand the currently selected node to view its children
6) Notice, the selection has jumped to the first root level node (but also notice now how this node has focus)

As I said before, my most impeding issue at this point is the selection changing.

Do you know how I can prevent the selection from changing when I just expand the programmatically selected node?


Thanks,

Lee
Lee
Top achievements
Rank 1
 answered on 18 Jun 2013
4 answers
179 views
Hi,

I am using Datagrid and would like to add the error handle function. Follow the doc from Kendo and I change the code as below in sample project. But the error always fired no matter with error or not. Can support team help? Many thanks, George

@(Html.Kendo().Grid<Kendo.Mvc.Examples.Models.OrderViewModel>()    
    .Name("grid")
    .Columns(columns => {
        columns.Bound(p => p.OrderID).Filterable(false).Width(100);
        columns.Bound(p => p.Freight).Width(100);
        columns.Bound(p => p.OrderDate).Format("{0:MM/dd/yyyy}").Width(140);
        columns.Bound(p => p.ShipName);
        columns.Bound(p => p.ShipCity).Width(150);
    })
    .Pageable()
    .Sortable()
    .Scrollable()
    .Filterable()
    .HtmlAttributes(new { style = "height:430px;" })
    .DataSource(dataSource => dataSource
        .Ajax()
        .PageSize(20)
        .Read(read => read.Action("Orders_Read", "Grid"))
        .Events(events => events.Error("alert('errorAlert')"))
     )
)



public ActionResult Orders_Read([DataSourceRequest]DataSourceRequest request)
        {
            return Json(GetOrders().ToDataSourceResult(request));
        }
Daniel
Telerik team
 answered on 18 Jun 2013
1 answer
119 views
Hello! I have a problem with binding MVVM objects to action parameters.

When I have on client side in viewmodel array of observable objects (for example (pseudocode) array TestArray: 0 {Id: 3, Name: 'qwe', State: 2}, 1 {Id: 5, Name: 'rty', State: 3}) and I post this from popup window (grid editing), on server side I get such form values: TestArray[0][Id], TestArray[0][Name], TestArray[0][State], TestArray[1][Id], TestArray[1][Name], TestArray[1][State]
But I expect to get: TestArray[0].Id, TestArray[0].Name etc., becouse I want MVC to bind this data to IEnumerable of custom type (public int Id, public string Name, public int State).

Can you give me advise how to solve this problem, thank tou
Daniel
Telerik team
 answered on 18 Jun 2013
2 answers
357 views
I have a VM has a DataSource in it.

var layerTable = new kendo.data.DataSource();
When new data arrives, I am able to populate the LayerTable with the data() function. But I also want to dynamically add in aggragates to this.

1.vm.SetLayers = function(values) {
2.    this.LayerTable.data(values);
3.    this.LayerTable.aggregate = [{ field: "FileCount", aggregate: "count" }];
4.    //this.trigger("change", { field: "LayerTable" });
5.};
I am finding that when I later try to get the aggregates() I get an empty object.

1.vm.LayerTable.aggregates();

Dr.YSG
Top achievements
Rank 2
 answered on 18 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
Drag and Drop
Application
Map
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
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
Licensing
ScrollView
Switch
TextArea
BulletChart
QRCode
ResponsivePanel
Wizard
CheckBoxGroup
Localization
Barcode
Breadcrumb
Collapsible
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
TimePicker
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
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
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?