Telerik Forums
UI for ASP.NET MVC Forum
1 answer
425 views

Hello

How can I make a $("#FileManager").data("kendoFileManager").refresh() everytime I open a folder on Kendo UI File Manager?

This is my problem:

When I browse to an empty folder, the folder gets reloaded every time I go into the folder.

When I browse to a folder that has files, the folder gets reloaded the first time and afterwards it won't reload/refresh anymore.

Practical case:

- Root
     - FolderA
          - File1
          - File2
     - FolderB

- If I go to FolderA, it will load both files
- When I drag File1 into FolderB, if I go to FolderB I will see the File1 inside
- I go back to FolderA and I drag File2 into FolderB
- If I go to FolderB I can only see File1 inside, FolderB was not reloaded when I went there again

The only 2 ways I found so far to see File2 inside of FolderB are:
- refreshing the whole page
- moving File1 again to another folder, when I do that File2 becomes visible again (a refresh is made);

The second way only happeens because I do a $("#FileManager").data("kendoFileManager").refresh(); but this only refreshes the folder I am currently at.

I would like to make a $("#FileManager").data("kendoFileManager").refresh() everytime I open a folder on Kendo UI File Manager.

Ianko
Telerik team
 answered on 27 Apr 2021
1 answer
182 views

Hi,

 

I have an issue with the Editor control where copy/pasting content with & into the "View HTML" tool window is converting the & to &amp. I've reproduced this behaviour in a pared down version of one of the jQuery demos here

Steps to reproduce:

- Click the View HTML button and copy/paste the following "<a href="https://clk.omgt1.com/?AID=1749609&PID=32811&UID=--MembershipNumber--" target="_blank" rel="noopener">"

- Click the Update button to save the change

- Click the View HTML button again and you can see that the content has been changed to this (emphasis mine to show the differences) - <a href="https://clk.omgt1.com/?AID=1749609&amp;PID=32811&amp;UID=--MembershipNumber--" target="_blank" rel="noopener"></a>

 

I've looked through the documentation and found the option for "encoded" which seems related but setting that to false doesn't fix this problem. Since this problem was originally reported via someone copy/pasting content into the window I've also tried modifying the paste options without success but I can also reproduce this via typing the problematic content in myself so copy/pasting doesn't seem related here.

 

Is there some other option that controls this behaviour or is it a bug with the control?

Neli
Telerik team
 answered on 27 Apr 2021
5 answers
753 views

I have created a grid to show a list of employees. The grid columns are filterable and I have set an initial IsLeaver filter on the data source to only show non-leavers. The problem I have is the suggestion operator is not initially showing all the results I would expect.

For example "LocationA" does not show up as a suggestion when initially trying to type this into the location filter. However, when I press enter their are lots of rows with "LocationA" that show up in the grid.  I am using "contains" for both the operator and suggestion operator so they should be the same.

If I clear the IsLeaver filter in the browser and then set it back to the same value then "LocationA" will start appearing in the suggestions operator.

If I do not set an initial IsLeaver filter and just set the filter in the browser then "LocationA" correctly appears in the suggestions operator.

@(Html.Kendo().Grid(Model)
 .Name("EmployeeDataGrid")
 .Columns(columns =>
 {
    columns.Bound(p => p.ID).Filterable(f => f.Cell(c => c.ShowOperators(false).Operator("contains").SuggestionOperator(FilterType.Contains)));
    columns.Bound(p => p.Name).Filterable(f => f.Cell(c => c.ShowOperators(false).Operator("contains").SuggestionOperator(FilterType.Contains)));
    columns.Bound(p => p.Location).Filterable(f => f.Cell(c => c.ShowOperators(false).Operatord("contains").SuggestionOperator(FilterType.Contains)));
    columns.Bound(p => p.IsLeaver);
})
.Pageable()
.Sortable()
.Filterable(ftb => ftb.Mode(GridFilterMode.Row))
.DataSource(dataSource => dataSource
    .Ajax()
    .ServerOperation(false)
    .Filter(f => f.Add(p => p.IsLeaver).IsEqualTo(false))))

 

Any suggestions as to why "LocationA" is not initially showing up in suggestion operator when there are definitely rows for "LocationA" that are not leavers. I can see these rows when I apply the filter so I can't understand why "LocationA" does not appear in the suggestion operator. 

Andrew
Top achievements
Rank 1
 answered on 26 Apr 2021
1 answer
678 views

The code below is within a poup editor when user click the EDIT button in a row of a grid.

I want to handle when autocomplete field changed.

I added .Events(e => e.Change("autocomplete_change")) in the wrapper and add a javascipt function autocomplete_change() after the wrapper 

when run it and click one of the edit button in a grid row, I got autocomplete_change is not defined error and  the popup will show under the grid without any data.

Is there anyone could help me to let me know how to fix it and  what's going on.

thank you very much.

@(Html.Kendo().AutoCompleteFor(model => model.AnswerA)
                .Name("AnswerA")
                .DataTextField("Answer")
                .Placeholder("Type a answer")
                .Filter("Contains")
                .MinLength(5)
                .HtmlAttributes(new { style = "width:100%" })
                .Height(520)
                .Events(e => e.Change("autocomplete_change"))
                .DataSource(source =>
                {
                    source.Read(read =>
                    {
                        read.Action("ResponseRead", "Method")
                            .Data("onAnswerAData");
                    })
                    .ServerFiltering(true);
                })
              
            )
            <script>
                 function autocomplete_change() {
                       alter("call ShowAddingAnswerPrompt");
                    }
            </script>

Ivan Danchev
Telerik team
 answered on 26 Apr 2021
4 answers
1.2K+ views

Hi,

How can I get a label field in the Form ? 

Is it supported out of the box ? Or should I use a span for this ? Or a custom template ?

Martin

 

Frans
Top achievements
Rank 1
Veteran
Iron
 answered on 26 Apr 2021
10 answers
1.0K+ views
Hello and good day,

please help with the following problem: there is an ASP.Net MVC grid in use where one column is an enum column. Furthermore, the grid is filtered using row-filter. Now the default behaviour is that the combobox shows the discrete enum values. So far the expected behaviour. But this unfortunately does not allow to display end-user friendly strings, to supress specific values and certainly not to display localised strings. So the questions:

- how can localised values be set at runtime for the individual enum members in row-filter dropdown instead of the simple .ToString() values?
- how are individual enum values suppressed for row-filter? (not every value should be displayed)

To display localized values within the columns cells is no problem due to .ClientTemplate. Thats fair easy. Thanks!

Unfortunately, the documentation at https://demos.telerik.com/aspnet-mvc/grid/filter-row is rather thin and various API links from which one hoped for enlightenment lead to 404-nirvana: 

https://docs.telerik.com/aspnet-mvc/api/Kendo.Mvc.UI.Fluent/GridColumnFilterableCellSettingsBuilder#templatesystemfuncsystemobjectsystemobject
https://docs.telerik.com/aspnet-mvc/api/Kendo.Mvc.UI.Fluent/GridColumnFilterableCellSettingsBuilder#templatesystemstring

These are listed as links on https://docs.telerik.com/aspnet-mvc/api/grid and several others are dead, too.


I would be happy if you could provide me with some sufficient sample code that solves the two problems mentioned above for a grid created by @(Html.Kendo().Grid... within a .cshtml file.
Thank you very much!
Nils
Top achievements
Rank 1
Veteran
Iron
 answered on 26 Apr 2021
1 answer
1.4K+ views

Hi Telerik,

I was wondering how I can add custom buttons (serverside code) in the toolbar, with both buttons on the left side as right side (I used to do that with a cuistom class, but that doesnt work anymore since the Telerik update).

For example left a 'Button1' and 'Button2', and right a 'Add' button, and a 'Export Button'.

best regards,

Martin

 

Eyup
Telerik team
 answered on 23 Apr 2021
1 answer
222 views
Is it possible to bind a scroll view to an Ajax data source?
Mihaela
Telerik team
 answered on 23 Apr 2021
6 answers
10.7K+ views

Good afternoon, I am not able to make my Html.Kendo (). DatePicker () stay with the date format in "dd / MM / yyyy"

 

            @(Html.Kendo().DatePicker()
                                  .Name("DataAdmissao")
                                  .Culture("pt-BR")
                                  .Value(ViewBag.Dataadmissao)
                                  .Format("dd/MM/yyyy")
                                  .HtmlAttributes(new { style = "width:220px;" }))

        </div>

he returns me the following message and does not show the date  " Index:34 The specified value "02/05/2019" does not conform to the required format, "yyyy-MM-dd" "

 

 

 

Tsvetomir
Telerik team
 answered on 23 Apr 2021
3 answers
8.7K+ views

I've been trying to accomplish this following several forum threads and this guide: http://docs.telerik.com/kendo-ui/aspnet-mvc/helpers/grid/templating/editor-templates but so far I can't make it work. I don't know what I'm doing wrong, since if I use my dropdown list outside the grid it works normally. I can't seem to understand how to bind the dropdown list to a grid column.

This is my grid:
@model IEnumerable<RECON.DAL.Models.Traducciones>
@(Html.Kendo().Grid(Model)
        .Name("Traducciones")
        .Columns(columns =>
        {
            columns.Bound(foo => foo.OrigenId).Title(Global.Origen).EditorTemplateName("_FiltrosTraducciones");
            columns.Bound(foo => foo.Campo).Title(Global.Campo);
            columns.Bound(foo => foo.ValorOrigen).Title(Global.ValorOrigen);
            columns.Bound(foo => foo.ValorDestino).Title(Global.ValorDestino);
            columns.Command(commands =>
            {
                commands.Edit().Text(" ").UpdateText(" ").CancelText(" ");
                commands.Destroy().Text(" ");
            }).Title("Acciones").Width(200);
        })
        .ToolBar(toolbar => toolbar.Create().Text("Nuevo"))
        .Editable(editable => editable.Mode(GridEditMode.InLine))
        .DataSource(dataSource =>
            dataSource.Ajax()
            .Model(model =>
            {
                model.Id(m => m.Id);
            })
            .Create(create => create.Action("Create", "Traduccion"))
            .Read(read => read.Action("Read", "Traduccion"))
            .Update(update => update.Action("Edit", "Traduccion"))
            .Destroy(destroy => destroy.Action("Delete", "Traduccion"))
        ))

 

This is my partial view with the dropdown list:
@model IEnumerable<RECON.DAL.ViewModels.TraduccionesOrigenes>

@(Html.Kendo().DropDownList()
        //.Name("origenes")
        .HtmlAttributes(new { style = "width: 250px" })
        .DataTextField("Descripcion")
        .DataValueField("Id")
        .DataSource(source => source.Read(read => read.Action("GetTraduccionesOrigenes", "Traduccion")))
)

I fill the dropdown list with a stored procedure and outside the grid it works fine.

Now, I don't know if I have to use the EditorTemplateName in the column I want the dropdown list or not, I'd just would like a step by step how to do it so that I can achieve what I want.

Thanks in advance.

Tsvetomir
Telerik team
 answered on 22 Apr 2021
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
Security
ColorPicker
DateRangePicker
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
LLM Kit
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?