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

Hello

I used Upload tool to upload person image, I put an HTML Image element beside the Upload image tool, I want to display the image after upload it.

I invoke .Success event for upload tool and used a javascript function to set the src attribute for the image element with the uploaded image path.

This is the Image element

<img id="imgPerons" src="" width="200" height="250">

This is the javascript function:

function onSuccess(e) {
        var files = e.files[0];

        if (e.operation == "upload") {
            document.getElementById("imgPerson").src = "~/images/person_photos";
        }
    }

I think I have a problem with the path of the image, because I tried to used online images like the following, It works fine

function onSuccess(e) {
        var files = e.files[0];

        if (e.operation == "upload") {
            document.getElementById("imgPerson").src = "https://www.xxx.com/image.jpeg";
        }
    }

What's the wrong with the path of the image?

I saved uploaded image in wwwroot/images/person_photos , 
The Image element and the javascript function in the path Views/Home/Index.cshtml

Any Help

Anton Mironov
Telerik team
 answered on 16 Sep 2021
1 answer
243 views

Hi,

I'm working on develop web application using MVC Core. One of the view will contain around 90 accounts that allow users to enter the number in the 2 years columns of Labor and other (total of 4 columns) when users enter the number in one of column, it should add the labor and other amount to total for that year and update the sub category group (may contain up to 10 groups) plus sum of footer for grand total for all groups.

I try to use Kendo Grid (GridEditMode.InCell) to do the job and write some codes to save to database. The users want to have Total and sub total change as soon as they are changed the number plus have the  all text box display when they load the page. Do you have any recommendation what is the better tools or widgets to use to handle all these requirement? I attached the sample of view layout below.

Thank you for your help.

Stoyan
Telerik team
 updated answer on 15 Sep 2021
1 answer
126 views
Is there a way to change the sweep direction of the polar chart to be ClockWise?
Bartley
Top achievements
Rank 1
Iron
 answered on 15 Sep 2021
3 answers
193 views

Hi,

I'm using RecurrenceEditorFor without scheduler. How can I get values ReccurenceRule and RecurrenceID  and pass to controller?

@(Html.Kendo().RecurrenceEditorFor(model => model.RecurrenceRule)
?
?


Regards
Frank

Frank
Top achievements
Rank 1
Iron
Iron
 updated answer on 14 Sep 2021
1 answer
254 views

Hi,

i have a cascading dropdown list inside grid. when i click ass row and  when i click 2nd drop down able to load data without selecting first dropdown. so here first i want to disable 2nd dropdown and after selecting 1st drop down i want to enable 2nd dropdown  with the values depends on first drop down.

Anton Mironov
Telerik team
 answered on 13 Sep 2021
15 answers
5.1K+ views
Hi,

I am evaluating the kendo controls for purchase and I am having trouble setting a kendo dropdown to readonly in mvc 4 using the razor view engine. I keep getting the error

0x800a01b6 - Microsoft JScript runtime error: Object doesn't support property or method 'readonly'

My solution is a little more complex but basically I have the below code with a bunch of stuff cut out. Everything works fine until i want to set the dropdown to read only on page load in one of my cases. It seems like I am following the documentation but i can't see to figure out what is wrong.  I've spent a good few hours on this and am out of tricks. I've got access to the dropdown for click events that i set on buttons and such but not during the $(document).ready.

I feel like something in .readonly() is using something not in my jquery but that is only a wild guess.

Thanks in a advance

<script>
//.readonly()doesn't work
  $(document).ready(function () {
        var something = $("#ProvinceRegion").data("kendoDropDownList");
        something.readonly();

//note: something.enable(false); works here just readonly() doesn't

});


//notice I can set .enabled on this function below
    function ClearCustomerClick() {

//all the below work
        var dropdownlist = $("#CustomerName").data("kendoDropDownList")
        dropdownlist.select(0);
        var billContactList = $("#BillingContact").data("kendoDropDownList")
        billContactList.enable(false);
        var billSiteList = $("#BillSite").data("kendoDropDownList")
        billSiteList.enable(false);

    }

</script>

and then my dropdown list is below

@using (Html.BeginForm("ProjectSetupDetails", "Setup", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
                    @(Html.Kendo().DropDownList()
                        .Name("ProvinceRegion")
                        .OptionLabel("Pick a region...")
                        .BindTo(Model.RegionList))

}
AGGELIKI
Top achievements
Rank 1
Iron
 answered on 10 Sep 2021
1 answer
618 views

Hi,

here i want to display alternate colors with different color for new row inside kendo grid incell edit mode.

Petar
Telerik team
 answered on 09 Sep 2021
1 answer
263 views

Hello 

I used Telerik UI for ASP.NET MVC Grid to perform CRUD operations and manipulate its data in Popup mode. I create a template to customize the Popup window .. Until now every things works fine except the binding in the drop down list .. I followed exactly this demo but unfortunately the drop down list won't to populate. 

Also, When I want to used a foreignkey column in Grid as below, I got "Value can not be null" error :(

columns.ForeignKey(p => p.category_id, ds => ds.Read(r => r.Action("GetCategories", "Home")), "id", "name").Title("Category");

I attached sample project having the issue.

Any Help Please

Eyup
Telerik team
 answered on 09 Sep 2021
0 answers
176 views

I have a stranger issue, The Kendo Grid for ASP.Net MVC work as expect except when I added any event for ant tool in the popup template, The popup window opens in the same page not poping up

Any Idea?

Abdulsalam Elsharif
Top achievements
Rank 2
Iron
Iron
 asked on 08 Sep 2021
0 answers
330 views

Hi,

I have a Kendo Editor control on one of my pages which I've enabled the "paste cleanup" feature on with the flags "all" and "css" but when I copy/paste content with HTML tags and inline CSS styles into it, those tags/styles are not being removed as expected.

This can be seen on the paste cleanup feature demo page - https://demos.telerik.com/kendo-ui/editor/paste-cleanup when pasting in the following HTML snippet

<h1 style="text-align:center;"><strong>The simple way to get a brand new bike, make huge savings and spread the cost</strong></h1>

 

I've tried various combinations of the options available on that page but nothing works so is there a way of achieving the expected result?

 

 

Lee
Top achievements
Rank 1
 asked on 08 Sep 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
MultiColumnComboBox
Dialog
DropDownTree
Checkbox
Slider
Switch
Notification
Accessibility
ListView (Mobile)
Pager
ColorPicker
DateRangePicker
Wizard
Security
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
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
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?