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

I have multiple switches on a page, each switch has the same class assigned to it.

What i need is that if any switch is checked / changed i need an event to fire and also need to check the state of the remaining switches.

@(Html.Kendo()
    .SwitchFor(a => a.IsAdmin)
    .HtmlAttributes(new { @class = ".permissions" })
    .Messages(c => c.Checked("YES").Unchecked("NO")))

I have tried numerous jquery approaches but none of them even fire when the switch is toggled.


    $('body').on('change', '.permissions', function () {
        // this event handler never gets trigged.....
        // get an instance of each switch and get the toggled / checked state.
        alert();
    });

Patrick
Top achievements
Rank 1
Iron
 answered on 24 Sep 2021
1 answer
152 views

Hi , Creating Bot like application using kendo list view.

If the Current logged in user Name is matched with exiting comment , then create div and align left else align div right. Not able to do in a template.

Please help:

Thanks

Karthey

 

 

Patrick | Technical Support Engineer, Senior
Telerik team
 answered on 22 Sep 2021
1 answer
143 views





After using aggregate method in Grid, search doesn't work.

Error message: "No generic method 'Sum' of type 'System.Linq.Enumerable' is compatible with and with provided type arguments"

 

Thanks.

Anton Mironov
Telerik team
 answered on 20 Sep 2021
1 answer
239 views

Hello

I have a situation where I have a number of columns that are supposed to be read only for editing.  However, I would like for the user to be able to enter in values for those columns when creating a new record.

Is this possible with Grid?

I have something like


@(Html.Kendo().Grid<View_Model>()
    .Name("RecordGrid")
    .Columns(column =>
    {
         columns.Bound(o => o.model_id).Hidden();
         columns.Bound(o => o.supplier_id).Title("Supplier ID").Width(150)
         //...about 20 more columns
         columns.Command(command => { command.Edit(); command.Destroy(); }).Width(200).Locked();
   }
   .ToolBar(toolbar => toolbar.create())
   .Editable(editable =>
   {
         editable.Mode(GridEditMode.Inline)
         .ConfirmDelete(Constants.CONFIRM_REC_DELETE);
    })
    //... etc
    .DataSouce(dataSource => dataSource
          .Ajax()
          .Model(model =>
          {
               model.Id(o => o.model_id);
               model.Field(o => o.supplier_id); //.Editable(false);
//and then just the remaining model fields and the create/read/etc functions

supplier_id (and a few others) I'd prefer to have as read_only (especially being a foreign key) but I need it available for create as ideally I'd have the user pick a supplier and under the hood it gives me the supplier_id foreign key.

I'd like to know if this is possible, because I have about 4-5 fields (and supplier_id is the only FK among them) that should be readonly for edit, but not for create.

Eyup
Telerik team
 answered on 17 Sep 2021
1 answer
668 views

Hi,

i have kendo grid with records with in cell edit mode ( few columns as integer values).

so when i am editing records and when i clicked on particular cell ( integer value ), based on that cell value i want to display a history icon in that cell.

so by using that history icon i want to display that record history in modal popup.

 

Eyup
Telerik team
 answered on 17 Sep 2021
1 answer
753 views

I have a form, which uses Kendo validation to check the mandatory fields have been completed. This works, but the validation messages appear underneath the form fields, disrupting the form layout.

If I add the following style to my page, the messages appear next to the inputs:-

.k-form-error
    {
        display:inline-block !important;margin-left:5px;
    }

 

However, if this is done, the messages do not disappear when the field is filled in. How can I achieve this?

NB: I do find the new-look forums to be much less useable than the old one, |t is much harder to browse through previous posts for a topic.

There is also no suitable tag for this question.

Eyup
Telerik team
 answered on 17 Sep 2021
0 answers
301 views

I have a login form that have a boolean item (Remember Me) which is a bool value, The form shows the field as Input (Text Field) .. This is the form :

 


@(Html.Kendo().Form<SchoolCore.Models.ViewModel.LoginViewModel>()
                                                .Name("LoginForm")
                                                .Validatable(v =>
                                                {
                                                    v.ValidateOnBlur(true);
                                                    v.ValidationSummary(vs => vs.Enable(false));
                                                })
                                                .HtmlAttributes(new { action = "Login", method = "POST" })
                                                .Items(items =>
                                                {
                                                    items.Add()

                                                        .Field(f => f.Email)
                                                        .Label(l => l.Text("Email :"));

                                                    items.Add()
                                                        .Field(f => f.Password)
                                                        .Label(l => l.Text("Password :"));

                                                    items.Add()
                                                        .Field(f => f.RememberMe))
                                                        .Label(l => l.Text("Remember Me"));
                                                })
                                            )

What I miss?

Thanks in advanced

Abdulsalam Elsharif
Top achievements
Rank 2
Iron
Iron
 asked on 16 Sep 2021
1 answer
554 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
201 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
105 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
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
Rating
ScrollView
ButtonGroup
CheckBoxGroup
NavBar
ProgressBar
QRCode
RadioButton
Scroller
Timeline
TreeMap
TaskBoard
OrgChart
Captcha
ActionSheet
Signature
AppBar
BottomNavigation
Card
FloatingActionButton
Licensing
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
DateTimePicker
TimePicker
StockChart
RadialGauge
ContextMenu
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?