Telerik Forums
Kendo UI for jQuery Forum
15 answers
1.4K+ views
Hi there

I am trying to implement Image Browser for Kendo Editor using the example here : http://demos.kendoui.com/web/editor/imagebrowser.html

My controller class : 

public class ImageBrowserController : EditorImageBrowserController
    {
        private const string contentFolderRoot = "~/Content/";
        private const string prettyName = "Images/";
        private static readonly string[] foldersToCopy = new[] { "~/uploads/newsitem/" };
 
 
        /// <summary>
        /// Gets the base paths from which content will be served.
        /// </summary>
        public override string ContentPath
        {
            get
            {
                return CreateUserFolder();
            }
        }
 
        private string CreateUserFolder()
        {
            var virtualPath = Path.Combine(contentFolderRoot, "UserFiles", prettyName);
 
            var path = Server.MapPath(virtualPath);
            if (!Directory.Exists(path))
            {
                Directory.CreateDirectory(path);
                foreach (var sourceFolder in foldersToCopy)
                {
                    CopyFolder(Server.MapPath(sourceFolder), path);
                }
            }
            return virtualPath;
        }
 
        private void CopyFolder(string source, string destination)
        {
            if (!Directory.Exists(destination))
            {
                Directory.CreateDirectory(destination);
            }
 
            foreach (var file in Directory.EnumerateFiles(source))
            {
                var dest = Path.Combine(destination, Path.GetFileName(file));
                System.IO.File.Copy(file, dest);
            }
 
            foreach (var folder in Directory.EnumerateDirectories(source))
            {
                var dest = Path.Combine(destination, Path.GetFileName(folder));
                CopyFolder(folder, dest);
            }
        }
    }
My js code

$("#Content").kendoEditor({
        encoded: false,
        imageBrowser: {
            messages: {
                dropFilesHere: "Drop files here"
            },
            transport: {
                read: "/console/ImageBrowser/Read",
                destroy: {
                    url: "/console/ImageBrowser/Destroy",
                    type: "POST"
                },
                create: {
                    url: "/console/ImageBrowser/Create",
                    type: "POST"
                },
                thumbnailUrl: "/console/ImageBrowser/Thumbnail",
                uploadUrl: "/console/ImageBrowser/Upload",
                imageUrl: "/console/ImageBrowser/Image?path={0}"
            }
        },
        tools: [
            "bold",
            "italic",
            "underline",
            "strikethrough",
            "fontSize",
            "foreColor",
            "backColor",
            "justifyLeft",
            "justifyCenter",
            "justifyRight",
            "justifyFull",
            "createLink",
            "unlink",
            "insertImage",
            "style",
            "viewHtml"
        ],
        style: [
                { text: "Highlight Error", value: "hlError" },
                { text: "Highlight OK", value: "hlOK" },
                { text: "Inline Code", value: "inlineCode" }
        ],
        stylesheets: [
            "../../content/web/editor/editorStyles.css"
        ]
    });

My image folder is : /uploads/newsitem and the code generates a folder /content/userfiles/images and this folder does have write permission. 

When any actions are invoked on EditorImageBrowserController they are 404'ed. I've attached a screen shot to show what is going on.

Any help would be greatly appreciated.
Rosen
Telerik team
 answered on 28 Oct 2013
3 answers
111 views
Hi Telerik support team
I am using custom icons for listview but those don't work fine using the documentation guidelines
I Attached the project for your review.

Thanks in advance and I am aware for your help.

Regards.

Diego Varela
Kiril Nikolov
Telerik team
 answered on 28 Oct 2013
1 answer
157 views
Hi everyone! 

I'm having a problem with treeview - I need to set a callback function (or an individual parameter to a common function, which would be even better) for the click event on each treeview leaf element (or all elements regardless whether they be leaf or non-leaf node). Imagine it as a structured menu for javascript functions (not http links).


 I'm now using a very unelegant and unnice workaround with javascript: link in dataUrlField. I'v been reading through this forum, SO and whatever google threw at me but could not find any single mention about callbacks in the treeview other than dataUrlField and the select event, use of which I find as unfeasible as the first possibility I mentioned. 

Thank you very much for ideas and suggestions.

Pavel
Pavel
Top achievements
Rank 1
 answered on 28 Oct 2013
3 answers
1.5K+ views
I have two grids on top of one another, showing different data but using the same column layout. Don't ask why; it's a market research thing.

To save space, I really don't need the header row for the second grid, since it aligns with the header columns for the first grid.

How to get rid of header row for the second grid and use that saved space for data rows?

I've tried this, but it leaves a gap at the bottom of the grid instead of distributing the saved space to the rest of the grid.
#cntr-bnch .k-grid-header {
    display               : none;
}
Garðar
Top achievements
Rank 2
 answered on 28 Oct 2013
2 answers
84 views
Hello,

I think the visible property doesn't render the navigator chart as expected, when set to false : http://jsbin.com/uyAvOna/1/edit

Stefania
Stefania
Top achievements
Rank 1
 answered on 28 Oct 2013
1 answer
71 views
Now I need filter grid data by mutil values(user kendoMultiSelect ui), how to fix it?

use as

columns: [
           ....................
          {
                                field: "City",
                                width: 130,
                                filterable: {
                                    ui: cityFilter
                               }
             },
            .....................
]

AND:
function cityFilter(element) {
                    element.kendoMultiSelect({
                        dataSource: sourceData,
                        dataTextField: "text",
                        dataValueField: "text",
                    });
                }
Kiril Nikolov
Telerik team
 answered on 28 Oct 2013
3 answers
279 views
I'm looking for a way to replace this MS chart (see attachment) with a horizontal bar chart that has a range for high and low values (yellow portion in the image).  Is there any way to do this with the DataViz charts? 
Iliana Dyankova
Telerik team
 answered on 28 Oct 2013
3 answers
619 views
Hello
I would like to add custom action that is fired outside of grid, but with grid current result set (without paging). So I would like to pass to my action grid related query string like sort, filter, group. Is it possible to obtain current query params in the same way as when using grid with server sorting, paging filtering and grouping?

I couldn't find any method on data source or grid to get grid query string.

Regards
Marcin
Kiril Nikolov
Telerik team
 answered on 28 Oct 2013
1 answer
168 views
Hi,

I m using kendo hierarchy grid to my web page. In here I used some search boxes to filter data by server.
when click search button I reload data to my grid. But Its not show child grid data. I attached my aspx page and a page print.

Please help me.

Thanking
Nikolay Rusev
Telerik team
 answered on 28 Oct 2013
3 answers
129 views
Hi,
When uploading a rather big image 500kb< in the image browser, it doesn't show a thumbnail when the upload has finished. The loading icon just spins and spins and spins. You can try for your self in your own demo. I tried both IE9 and FF18.

Regards,
Mattias
Rosen
Telerik team
 answered on 28 Oct 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
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
AICodingAssistant
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
+? 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?