Telerik Forums
UI for ASP.NET MVC Forum
25 answers
1.1K+ views

Is there a way to display checkbox with 'Select All/Deselect All' checkbox within column menu which selects all or deselect all columns of the grid? We have about 40 to 50 columns in grid, clicking each column to hide bunch of columns is pretty tedious work.

 

Thanks.

Viktor Tachev
Telerik team
 answered on 15 Apr 2021
1 answer
106 views

Hi,

i was working on MVC project and rendered the filemanager in view with helpers.

after first loading the filemanager i did select a file and using "getSelected()" method, it returns an array of "FileManagerEntry" for each selected file.

when you load the second time it shows no files selected and in this case when i call the same "getSelected()" method, still it returns  1 record. i was expecting to be 0.  can you please let me know what would be the issue.

 

Thanks

Regards

Hassan.

Aleksandar
Telerik team
 answered on 14 Apr 2021
1 answer
142 views

Hello,

Is it possible to change the language of the header? (Ex: instead of Sun, Mon to another language), I have tried changing the CurrentThread and CurrentUIThread culture to Italian but i still get the days of the week in english, the datetime pickers on Gantt also have values in English while i want them in Italian.

Futhermore, when i create a new Task i would like to have the word "New task" in Italian, but can't find a way to change it.

Thank you.

Bilhan.

 

Bilhan
Top achievements
Rank 1
 answered on 14 Apr 2021
1 answer
107 views
    
Eyup
Telerik team
 answered on 12 Apr 2021
2 answers
158 views

I am using a DatePicker in a Modal to change the dates of various records without reloading the whole page. The Modal is loaded via an Ajax call. The modal contains a form and a single field similar to:

 

@(Html.Kendo().DatePickerFor(x => x.ScheduledDate)
                    .Start(CalendarView.Year)
                    .Depth(CalendarView.Month))
                )

 

This works fine the first time the modal loads but on subsequent calls, the date picker is not rendered and an unstyled textbox is shown instead.

I am guessing that this has something to do with the fact that the page has already handled a control with the same id but because the modal has been replaced with new html, there are no duplicate ids on the page and I want to force kendo to render the picker again on the new control.

 

How do I do this?

Paul
Top achievements
Rank 1
 answered on 09 Apr 2021
5 answers
750 views

I've got a Kendo editor with custom CSS styles that I'm importing via a custom style sheet. Is there a way to apply the classes to the p element instead of wrapping the text with a span element. I'm trying to control how the user formats the text to just the classes in my style sheet.

Thanks.

@(Html.Kendo().EditorFor(model => model.HtmlContent)
                               .HtmlAttributes(new { style = "width: 85%;height:600px;" })
                               .Encode(false)
                               .Tools(tools => tools
                                   .Clear()
                                   .Bold().Italic().Underline().Strikethrough()
                                   .JustifyLeft().JustifyCenter().JustifyRight().JustifyFull()
                                   .InsertUnorderedList().InsertOrderedList()
                                   .Outdent().Indent()
                                   .CreateLink().Unlink()
                                   .InsertImage()
                                   .InsertFile()
                                   //.SubScript()
                                   //.SuperScript()
                                   .TableEditing()
                                   .ViewHtml()
                                   .CleanFormatting()
                                   //.FontName()
                                   //.FontSize()
                                   //.FontColor().BackColor()
                                   .Formatting(formatting => formatting
                                     .Add("Intro Paragraph", ".doc-intro-paragraph")
                                     .Add("FAQ Question", ".doc-question")
                                     .Add("FAQ Answer", ".doc-answer")
                                     .Add("Section Title", ".doc-section-title")
                                 )
                               )
                               .PasteCleanup(p => p
                                   .All(false)
                                   .Css(true)
                                   .KeepNewLines(false)
                                   .MsAllFormatting(true)
                                   .MsConvertLists(true)
                                   .MsTags(true)
                                   .None(false)
                                   .Span(true)
                               )
                               .StyleSheets(css => css.Add(Url.Content("~/Content/TextEditor.css")))
 
                               .ImageBrowser(imageBrowser => imageBrowser
                               .Image("~/Content/Images/{0}")
                               .Read("Read", "ImageBrowser")
                               .Create("Create", "ImageBrowser")
                               .Destroy("Destroy", "ImageBrowser")
                               .Upload("Upload", "ImageBrowser")
                               .Thumbnail("Thumbnail", "ImageBrowser")
                               )
 
                               .FileBrowser(fileBrowser => fileBrowser
                               .File("~/Content/Documents/{0}")
                               .Read("Read", "FileBrowser")
                               .Create("Create", "FileBrowser")
                               .Destroy("Destroy", "FileBrowser")
                               .Upload("Upload", "FileBrowser")
                               )
                           )

 

 

Alex
Top achievements
Rank 1
Iron
 answered on 09 Apr 2021
3 answers
463 views

Hello,

In our MVC project we used two kendo dropdownlist widgets. Since data may become huge we implemented virtual.valueMapper() to get job done. Both dropdownlist worked as expected but when I debug code and found one of valueMapper() never be called. Those two dropdownlist had exactly same setting. Why they are function differently? I am so curious the reason. Could someone explain this? Below are the code. Thanks in advance.

    <div class="col-lg-3 col-md-3 col-sm-3">
        @(Html.Kendo().DropDownListFor(model => model.FIELD1)
                                                .DataTextField("Display")
                                                  .DataValueField("Value")
                                                  .Filter("contains")
                                                  .DataSource(source =>
                                                  {
                                                      source.Custom()
                                                          .ServerFiltering(true)
                                                          .ServerPaging(true)
                                                          .PageSize(80)
                                                          .Type("aspnetmvc-ajax")
                                                          .Transport(transport =>
                                                          {
                                                              transport.Read("GetField1Data", "Editor");
                                                          })
                                                          .Schema(schema => schema.Data("Data").Total("Total"))
                                                          ;
                                                  })                                       
                                                 .Virtual(v => v.ItemHeight(26).ValueMapper("valueMapperField1"))//<- never be called 
                                                   
            )
    </div>
    <div class="col-lg-3 col-md-3 col-sm-3">
        @(Html.Kendo().DropDownListFor(model => model.FIELD2)
                                                  .DataTextField("Display")
                                                  .DataValueField("Value")
                                                  .Filter("contains")
                                                  .DataSource(source =>
                                                  {
                                                      source.Custom()
                                                          .ServerFiltering(true)
                                                          .ServerPaging(true)
                                                          .PageSize(80)
                                                          .Type("aspnetmvc-ajax")
                                                          .Transport(transport =>
                                                          {
                                                              transport.Read("GetField2Data", "Editor");
                                                          })
                                                          .Schema(schema => schema.Data("Data").Total("Total"))
                                                          ;
                                                  })                                           
                                                 .Virtual(v => v.ItemHeight(26).ValueMapper("valueMapperField2")) //<- call valueMapperField2 function correctly.                                              
            )

    </div>

Ivan Danchev
Telerik team
 answered on 08 Apr 2021
6 answers
1.4K+ views

I'm having an issue that I need help with.

First, I'll explain what I need to do. I need to set three properties on a Grid

    1.- The "pageSizes" (the options on the "items per page" dropdown).

    2. The "pageSize" (default page size for the grid).

    3.- The "height".

I'm doing this using the "setOptions" method, like this:

        grid.autoBind = false;
        grid.setOptions({
            groupable: true
            , pageable: {
                pageSizes: selPageSizes,
                pageSize: selDefaultPageSize
            }
            , dataSource: { pageSize: selDefaultPageSize }
            , height: selGridHeight
        });       

This is working fine, but I'm getting an error. The grid is refreshed after calling the .setOptions method (I understand that it is the expected behavior) and I get the "Cannot read property 'removeClass' of null" (screenshot attached, along with the screenshot of the code that is triggering this error).

I tried setting the "autoBind" property to "false" before calling the .setOptions method, but I'm still getting the error.

I've checked on the forum, and I found the following post:

   https://www.telerik.com/forums/i-m-sometimes-getting-this-error-ucaught-typeerror-cannot-read-property-%27removeclass%27-of-undefined

I tried what was suggested there, but some things won't apply, and the others won't work (BTW, the first link is broken, which was the most promising one).

So, is there a way that I can prevent the grid to refresh after calling .setOptions? Or there's something that I can do to avoid the error, if the grid is refreshed?

Or is there any other way to set the three properties that I mentioned at the beginning of the post?

 

Georgi Denchev
Telerik team
 answered on 07 Apr 2021
1 answer
608 views

I have a requirement that on a page that already contains a number of widgets to display a window that contains the same widgets.

The problem is that the page and the partial view loaded in the window are created using

@Html.Kendo().XXXFor(m => m.Property)....

and have discovered that when I load the window the widget on the page disappear and the widget on the window is not created. Also there are a lot of errors in the kendo code.

Is there a way to change the name that is required by the telerik but to leave the input names as they are?

Neli
Telerik team
 answered on 07 Apr 2021
1 answer
127 views

Hi everyone,

I have created a view page that displays four charts, now I want to PDF each of these charts on one page so four pages total.

So far I can export all four charts on a single page.

is there any way to achieve this, is it possible.

thanks

Ray

Nikolay
Telerik team
 answered on 07 Apr 2021
Narrow your results
Selected tags
Tags
Grid
General Discussions
Scheduler
DropDownList
Chart
Editor
TreeView
DatePicker
Upload
ComboBox
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
MultiColumnComboBox
Dialog
DropDownTree
Checkbox
Slider
Switch
Notification
ListView (Mobile)
Pager
Accessibility
ColorPicker
DateRangePicker
Wizard
Security
Styling
Chat
MediaPlayer
TileLayout
DateInput
Drawer
SplitView
Barcode
ButtonGroup (Mobile)
Drawer (Mobile)
ImageEditor
RadioGroup
Sparkline
Stepper
TabStrip (Mobile)
GridLayout
Template
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
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
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?