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

I'm trying to use the Kendo Datepickerfor in an MVC application that doesn't allow past dates to be selected. If we use .Min or .DisableDates then the input doesn't display the date from the Model.

I've tried a workaround with using a template to set the past dates as 'k-state-disabled' but couldn't get to a solid solution of disabling click events. It would work using the Open event, but when navigating in the calendar, it would still allow past dates to be selected.

Thoughts/help would be great.

Anton Mironov
Telerik team
 answered on 05 Jul 2021
2 answers
165 views

Hi,

I am trying to get the .InsertUnorderedList()  to set a bullet point for every line there is in the Editor. But it only does the first line. Anyone that knows how to change this behaviour?

I have attached a picture of this.

Thanks,

Mark

Mark
Top achievements
Rank 1
Iron
 answered on 05 Jul 2021
1 answer
665 views

Hi,

How can I save the results of all steps when filling in all the Wizard steps ?  (in Telerik Asp.Net MVC Wizard control)

Lets say that step 2 is dependant on step 1 (screen should be rendedered with/without certain controls dependant of what was filled in on step 1.

How can I achieve this ?

Is there a serverside 'Next' click event or so ? Or a Select step event or so ?  I havent seen it to my dissapointing surprise.

(I know I can load content tabs with Ajax, but that doesnt give me the entered data.)

Martin

 

Ivan Danchev
Telerik team
 answered on 02 Jul 2021
1 answer
3.3K+ views

Hello,

how can i send a id parameter on Onclick delete action javascript, this is my code. i don't want to use action link because i'm using ajax call

Thanks for helping.

 


@(Html.Kendo().Grid(Model)
            .Name("Conventions")
            .Columns(columns => {
                columns.Bound(c => c.Libelle).Width("450px");
                columns.Bound(c => c.DateEnvoi).Format("{0:dd/MM/yyyy}");
                columns.Bound(c => c.Statut.Libelle).Title("Statut");
                columns.Template(@<text></text>).ClientTemplate("<span class='k-icon k-i-delete' id='deleteIcon'></span>").HtmlAttributes(new { onclick = "onDeleteConvention()" }).Width("40px");

            }).NoRecords("Pas de conventions trouvés")
            .Scrollable().Height(200).DataSource(dataSource => dataSource
                .Ajax()
                .PageSize(20)
                .ServerOperation(false)
                .Model(model =>
                {
                    model.Id(p => p.ConventionId);
                    model.Field(p => p.Libelle).Editable(false);
                    model.Field(p => p.DateEnvoi).Editable(false);
                    model.Field(p => p.Statut.Libelle).Editable(false);
                })
             )
            )

Ivan Danchev
Telerik team
 answered on 30 Jun 2021
1 answer
202 views

Hi,

I have a kendo grid with some thousands of records with employees.

so when i click new record in kendo grid, in new row first column is employee name. here am using employeename Edit template view to display employee inside kendo grid while editing.

so is there any possibility like i want to retrieve all the employees from grid and assign those values to dropdown list ( employeename Edit template view) instead of calling to DB.

Eyup
Telerik team
 answered on 30 Jun 2021
1 answer
120 views

Hi ,

I have a kendo grid which displays the all employees and their timesheets values. with sum aggregates in footer grid.

here is my requirement.

currently i am editing June month column of A person from the image shown.

in jQuery after getting A person records (using current cell and finding emp number of current row then am querying only that empnumber  to get  A person records) then i want to do sum of column of editing cell (june column).

but i dont want to apply any filters to grid. grid should display previous values only not to show only A person values.

 

Eyup
Telerik team
 answered on 30 Jun 2021
1 answer
531 views

I want to create MVVM Kendo Grid where it is grouped in multiple levels and also want a nested grid or a hierarchical grid for each parent's grid row i.e. each k-master-row .  In the ScreenShot Is it possible to create a Nested/ Child / Hierarchical Grid for each row? If yes, Can someone please provide me with sample demo. 

I didn't find any documentation or helpful resource?

 

 

Parent Grid:

   Grouped by Field 1

          Grouped By Field 2

             Row1

                           Nested  / Child Grid with child Grid Columns  For ROW1

             Row2

                        Nested / Child Grid with child Grid Columns For ROW 2

 

 

 

 

 

Tsvetomir
Telerik team
 answered on 28 Jun 2021
0 answers
458 views

I am using Kendo for Asp.Net MVC in my application. Recently I upgraded to version 2021.2.616 After that the treelist stopped showing data. Only "No records available." is shown(see attached pic)


@(Html.Kendo().TreeList<Models.CategoryModel>()
    .Name("treelist")
    .HtmlAttributes(new { id = "itemtreelist" })
    .Toolbar(toolbar =>
    {   
toolbar.Custom().Click("AddNewCategory_click").Text("Add New Item Category").Name("addNewCategory");

        }
    })
    .Columns(columns =>
    {
        columns.Add().Field(e => e.Name).Width(200).Filterable(filterable => filterable.Ui("itemNameFilter"));
        columns.Add().Field(e => e.Description).Width(300);
        columns.Add().Field(e => e.IsActive).Template(
            "#if(IsActive == true){#" +
                Html.Kendo().CheckBox().Name("name#:IsActive#").HtmlAttributes(new { @class = "IsActive" }).Checked(true).ToHtmlString()
            +"#}else{#" +
                Html.Kendo().CheckBox().Name("name#:IsActive#").HtmlAttributes(new { @class = "IsActive" }).Checked(false).ToHtmlString()
            + "#}#"
            ).Width(75).Filterable(false) ;
        columns.Add().Field(e => e.ImagePath).Title("Image").Filterable(false).Template(
            "#if(ImagePath == null){#" +
                "No Image"
            + "#}else{#" +
             "<img src='#=ImagePath#' alt='#=Name#' Title='#=Name #' style='height:50px;' />"
            + "#}#"
            );

        columns.Add().Command(c =>
        {
            
               
                c.Custom().Click("EditCategory_click").Text("Edit").Name("editCategory");
           
        }).Width(125);

        columns.Add().Command(c =>
        {
           
                c.Destroy();
           
        }).Width(125);


    })
    .Editable(e=>e.Mode("Inline"))
    .Height(200)
    .Filterable(filterable => filterable
        .Extra(false))
    .Sortable()
    .DataSource(dataSource => dataSource
        .Read(read => read.Action("GetItemCategories", "Category"))
        .Create(c => c.Action("CreateItemCategory", "Category"))
        .Update(c => c.Action("UpdateItemCategory", "Category"))
        .Destroy(c => c.Action("DestroyItemCategory", "Category"))
        .Model(m => {
            m.Id(f => f.Id);
            m.ParentId(f => f.ParentCategoryId);
            m.Expanded(true);
            m.Field(f => f.Name);
            m.Field(f => f.Description);
            m.Field(f => f.IsActive);
        })
    )
    .Height(600)

)


 

Few Notes:

1. There are no console errors

2. The data is coming from the server correctly. I checked and verified in developer console

3. Everything was working before upgrade (previously used 2019.x.xxx)

4. this is the part of the code (in action method) that returns the data for the treelist


IEnumerable<CategoryModel> result = ... linq query here ...;
return Json(result.ToTreeDataSourceResult(request,
                    e => e.Id,
                    e => e.ParentCategoryId,               
                    e => e                   
                    ));

Azhar
Top achievements
Rank 1
Iron
 asked on 28 Jun 2021
0 answers
3.4K+ views
I am trying to create a hyperlink column in Kendo grid that will display a Purchase Order number and link to a SSRS Report. The link should open the report in a separate tab  with the PO Number as a parameter
Jim
Top achievements
Rank 1
 asked on 25 Jun 2021
1 answer
143 views

Hello,

I have created wrapper for tekerik grid in c# MVC code.

Now I want to add checkbox/image in header instead of plain text.

I have found one property named "Telerik.Web.Mvc.UI.GridColumnSettings.HeaderTemplate" but it is of type delegate Action.

I do not have idea how to set the header template and finally checkbox/image.

 

Kindly suggest.

 

Thanks & Regards

Nitin kumar

Anton Mironov
Telerik team
 answered on 25 Jun 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?