Telerik Forums
UI for ASP.NET MVC Forum
0 answers
5 views

I have a form generated using Html.Kendo().Form.  I would like to be able to export the contents of the form (labels, textboxes, checkboxes) to a new PDF on the click of a button, and then subsequently merge it with another PDF.

Is there a generic method that would enable me to do this, rather than using the PdfProcessing Library to create a new document and then add each of the fields from the ViewModel one by one.

Thank you.

Richard
Top achievements
Rank 1
 asked on 17 Sep 2021
1 answer
7 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
8 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
10 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
6 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
6 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
11 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
0 answers
3 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.

Abdurrahman
Top achievements
Rank 1
 asked on 15 Sep 2021
1 answer
7 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
14 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
 updated answer on 14 Sep 2021
Top users last month
Matthias
Top achievements
Rank 5
Bronze
Bronze
Iron
Psyduck
Top achievements
Rank 4
Bronze
Bronze
Iron
Liu
Top achievements
Rank 1
Iron
Alex
Top achievements
Rank 1
Veteran
Iron
Iron
George C.
Top achievements
Rank 2
Iron
Veteran