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

I'm working on an ASP.NET MVC application which is using Kendo ui in it. We have used a Kendo UI Editor in it for rich texts. It is being used as follows:

@(Html.Kendo().Editor()
   .Name("textControl-Source")
   .Tools(tools => tools.Clear()
   .Bold().Italic().Underline().Strikethrough()
   .FontSize().FontColor().BackColor()                                                          
   .JustifyLeft().JustifyCenter().JustifyRight().JustifyFull()
   .InsertUnorderedList().InsertOrderedList().Indent().Outdent()
   .SubScript().SuperScript())
   .HtmlAttributes(new { style = "height:240px;width:98.5%", data_mintextlength = "1" })
          .Events(events => events
          .Change("mediaBoardEditNS.textControlChange")
          .Select("mediaBoardEditNS.textControlSelect")
        )
    )

 

There is a requirement if we can somehow customize it to show custom colors by using HEX codes like we can do in Microsoft Word font color picker.

Such feature is present in color picker as present here is custom colors: https://demos.telerik.com/aspnet-mvc/colorpicker

I have searched a lot on Telerik forum and SO as well, but couldn't find anything solid. Let me know if i'm missing something. Thanks

Petar
Telerik team
 answered on 07 Aug 2020
5 answers
508 views

Hello Telerik team

For some reason,I want use raw sql get data by entity framework。

like this :  IQueryable<model> data =DbContext.model.SqlQuery("select * from models").AsQueryable();  //dbcontext  DbSet  

binding request filters : data = data.Where(ExpressionBuilder.Expression<model>(request.Filters,false));

 

Can someone help me why there is no effective?
 Thank you.

 

 

 

Ianko
Telerik team
 answered on 07 Aug 2020
1 answer
811 views

After seeing recent reports of security vulnerabilities in ASP.NET AJAX, wanted to confirm if there are similar known vulnerabilities in ASP.NET MVC

https://www.kroll.com/en/insights/publications/cyber/monitor/telerik-vulnerability-surge-web-compromise-cryptomining-attacks

https://nvd.nist.gov/vuln/detail/CVE-2019-18935

https://nvd.nist.gov/vuln/detail/CVE-2017-11317

Plamen
Telerik team
 answered on 06 Aug 2020
2 answers
1.0K+ views
I tried searching for this but did not find any answer hence posting here. How do i increase the tool bar size on an kendo grid ? 
Petar
Telerik team
 answered on 06 Aug 2020
2 answers
2.3K+ views

Hi All,

          I am using kendo grid for reporting purpose. But in my report i am using one date column for filtering purpose. My problem is when i use isequal to date filter empty grid is showing.why ?. Actually data is available in model. I attached to file. Please look into that

Kojoe
Top achievements
Rank 1
 answered on 05 Aug 2020
4 answers
103 views

Hello,

I want to load document(.docx) and replace some content, 

here is code:

RadFlowDocument document;
using (Stream input = System.IO.File.OpenRead(templatePath))
{
    document = provider.Import(input);               
}
RadFlowDocumentEditor editor = new RadFlowDocumentEditor(document);

1. Replace text: I use :

editor.ReplaceText("#Name#", "AAAAAAA");

 

Georgi
Telerik team
 answered on 05 Aug 2020
5 answers
194 views

I have a form with autocomplete the works fine until I post the form and it comes back. Then when entering data in the field, it does go to the server to filter, but does not show a dropdown.

Is there a way to reset the autocomplete on the form return?

Larry
Top achievements
Rank 1
 answered on 04 Aug 2020
8 answers
3.9K+ views

I have a PartialView that contains two linked Kendo ListBoxes and some other Textboxes and some hidden fields. I want to render the form inside of the Kendo Dialog. I can find examples of inserting these types of controls here: http://demos.telerik.com/aspnet-mvc/dialog/treeview-integration 

But I am trying to using this partial form a bound MVC form to update the object model.

How do I render a PartialView in a dialog?

Georgi
Telerik team
 answered on 04 Aug 2020
6 answers
1.1K+ views

Hello

 

I have a grid containing a list of work items with a detail template displaying details about each item. The detail template is a tabstrip where one tab contains the date and text for the last action taken on that work item. I'm having trouble setting the date in a datepicker.

Here is the code for the tab: 

 

items.Add().Text("Last action").Content(@<text>
   #var ldate=kendo.toString(lastActionDate, "yyyy-MM-dd")#
   <div class='cssLastAction'>#=ldate#
      <div>lastActionDate">@(Html.Kendo().DatePicker().Name("#=ldate#").Value("#=ldate#").ToClientTemplate())</div>
        <textarea rows="10" class="textArea" id="lastAction" name="lastAction" data-bind="value:lastAction">#= lastAction #                 </textarea>
    </div>
 </text>
  );

I have removed some unnecessary code to keep it readable. First I take my lastActionDate from the model and format it to a string, after that I just write the result on the screen   #=ldate# to see that I get a value.

I then also write it as name for the datepicker, again to see that i get the value when inspecting the datepicker .Name("#=ldate#")

Last of all i also write it as the value of the datepicker .Value("#=ldate#")

The problem is that when I inspect the datepicker it doesn't even have a value attribute.

BUT if I instead hardcode a value .Value("1950-01-01") everything works fine.

Why is it that ldate work in the name field but not in the value field for the datepicker and why does the hardcoded value work but the variable parsed as a string doesn't?

Best regards

Jonas

Anton Mironov
Telerik team
 answered on 03 Aug 2020
4 answers
1.0K+ views

Hi,

 

I've placed an MVC wrapped DateTimePicker inside a kendo template, but the problem I'm having is setting the value.  Here's the code I'm using:

 

(Html.Kendo().DateTimePicker()
                .Name("activeTime-#=Ordinal#")
                .Min(new System.DateTime(1970, 1, 1, 0, 0, 0)) // Epoch
                .Format("MM-dd-yyyy HH:mm")
                .TimeFormat("HH:mm")
                .HtmlAttributes(new { style = "width:100%" })
                .Value("#: kendo.toString(ActiveDT, 'MM-dd-yyyy HH:mm') #")
                .ToClientTemplate()
            )​

 This loads a DateTimePicker inside the list view, however the value of the picker is always blank.  I've tried a few things to fix it (deferring, outputting a javascript date object instead of a string, changing everything to create the datetimepicker through javascript rather than the wrapper) and I'm at a bit of a dead end, I was just wondering where exactly I'm going wrong.

 

Thanks,

Kevin

Nikolay
Telerik team
 answered on 03 Aug 2020
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
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?