Telerik Forums
UI for ASP.NET MVC Forum
1 answer
99 views
Given the deprecation of the EditorImageBrowserController in Q1 2024 release of Kendo UI, we're seeking guidance on the best approach to migrate our existing application. Could you please provide specific recommendations on how to achieve image management (read, upload and etc) in image browser (from Editor) using the latest Kendo UI components and best practices?
Eyup
Telerik team
 answered on 10 Dec 2024
1 answer
62 views
Html.Kendo().Chart() getting kendo is not defined error
Eyup
Telerik team
 answered on 04 Dec 2024
1 answer
135 views

Hi,

I have a requirement of validation in server side. During adding a new record and update few old records in Kendo Grid and click on Save button it calls the Create and Update method asynchronously. But when i am adding a new record based on its value i need to validate in update method.

But when click on Save button i calls the Create and Update method asynchronously so my validations doesn't work as expected.

Can we run the Create and Update method synchronously one after another when i am adding a new row and update few old row values and click on Save button.

 

Mihaela
Telerik team
 answered on 03 Dec 2024
1 answer
67 views

Hi,

I have a custom Command  delete button, I wanted to disable this button.

I tried the below code, but its disable pagination hyperlink numbers also.

 $(".k-button").addClass("k-disabled");

 

 

Eyup
Telerik team
 answered on 28 Nov 2024
2 answers
58 views

(edit: I didn't initially realize this was being posted in the UI for jQuery forum and have since duplicated in the .net core forum - feel free to remove this one if deemed inappropriate for this forum)

I'm just starting to catalog the issues list, but I'm immediately noticing that any markup passed to non-template areas has ceased rendering.

For example:


<div class="demo-section">
    @(Html.Kendo().Switch()
                .Name("switch")
                .Messages(c => c.Checked("<span>YES</span>").Unchecked("<span>NO</span>"))
    )
</div>

used to render the markup vs displaying the markup text. Now it spits it out.

I have used similar techniques in Grid commands as well, which are all also broken. Basic custom commands I can work around by using the .Template option instead of .Text, but for an Edit's UpdateText and CancelText, I cannot find a workaround that isn't completely unbearable to manage at anything remotely near scale.

Is there a workaround or option to re-enable rendering HTML in these places I am simply not seeing? 

Also, this feels like a pretty significant change to bury inside of a generic "rendering mismatch" (which may not even be referring to this, but I cannot find anything in the breaking changes mentioning something like this change). If there's not an effective way to get back to this functionality, it's going to potentially cost me days/weeks to find a tenable solution.

Josh
Top achievements
Rank 1
Iron
 updated answer on 27 Nov 2024
1 answer
77 views

I have a Kendo grid and in the Create method, I want to do some server side validation and the response I want to show to the user if validation is true or false. 

In the below code CreateTLPCurveAllocations is an MVC action method which is having return type as void.

How to use the CreateTLPCurveAllocations  method with return type, so that I can show that return value/ message to the user.

@(Html.Kendo().Grid<TLPAllocationDetails>()

    .Name("TLPCurveAllocationsGrid")
    .DataSource(datasource => datasource.Ajax().Read(read => read.Action("GetTLPCurveAllocations", "DataMgmt")))
        .Columns(columns =>
        {
        columns.Bound(p => p.AllocationDate).Editable("EditFieldsForNewRec").Format("{0:MM/dd/yyyy}").Title("Allocation Date").Width(90).HeaderHtmlAttributes(new { style = "justify-content:center" }).HtmlAttributes(new { style = "text-align: right" });
        columns.Bound(p => p.CurveDetails).Editable("EditFieldsForNewRec").ClientTemplate("#=getCurveName(data)#").Title("Curve").Width(100).HeaderHtmlAttributes(new { style = "justify-content:center" }).HtmlAttributes(new { style = "text-align: right" });
        columns.Bound(p => p.Allocation).Editable("EditAllocation").Title("Allocation").Width(100).HeaderHtmlAttributes(new { style = "justify-content:center" }).HtmlAttributes(new { style = "text-align:right" });
        })
    .ToolBar(toolbar =>
    {
        toolbar.Create();
        toolbar.Save();                    
    })
    .HtmlAttributes(new { style = "height: 400px;width:97%" })
    .Editable(editable => editable.Mode(GridEditMode.InCell))
    .Pageable()
    .Navigatable()
    .Filterable()
    .Scrollable()
    .DataSource(dataSource => dataSource
    .Ajax()
    .Batch(true)
    .PageSize(5)
    .ServerOperation(false)
    .Model(model =>
    {
        model.Id(p => p.AllocationDate);
        model.Field(p => p.CurveDetails).DefaultValue(ViewData["CurveDetails"] as CurveDetails);
    })
    .Create("CreateTLPCurveAllocations", "DataMgmt")
    .Update("UpdateTLPCurveAllocations", "DataMgmt")
    )
    )

Ivan Danchev
Telerik team
 answered on 27 Nov 2024
1 answer
175 views

I am trying to upgrade a .NET 4.5 project using the Upgrade Wizard.  However, when I attempt to use the wizard I am getting a message saying "No distribution available for your project" and there aren't any versions listed in the dropdown.  

I downloaded the ASP.NET MCV 2024.4.1112.  Am I missing something?

I have attached a photo of the message I am receiving.

Maria
Telerik team
 answered on 26 Nov 2024
1 answer
36 views
I have a TileLayoutItems component on my page
For some reason nor button nor span would actually appear inside header of TileLayoutItem

    <TelerikTileLayout Columns="3"
                       ColumnWidth="285px"
                       RowHeight="285px"
                       Reorderable="true"
                       Resizable="true"
                       ColumnSpacing="0px"
                       RowSpacing="0px">
        <TileLayoutItems>
            <TileLayoutItem @ref="reference">
                <HeaderTemplate>
                    @* <button @onclick="OnCloseButtonClicked"></button> *@
                    <span>sometext</span>
                </HeaderTemplate>
                <Content>
                    <img class="k-card-image" draggable="false" src="images/cards/places/barcelona.jpg" alt="Barcelona" />
                </Content>
            </TileLayoutItem>
            <TileLayoutItem HeaderText="Sofia">
                <Content>
                    <img class="k-card-image" draggable="false" src="images/cards/places/sofia.jpg" alt="Sofia" />
                </Content>
            </TileLayoutItem>
            <TileLayoutItem HeaderText="Rome">
                <Content>
                    <img class="k-card-image" draggable="false" src="images/cards/places/rome.jpg" alt="Rome" />
                </Content>
            </TileLayoutItem>
        </TileLayoutItems>
    </TelerikTileLayout>

Eyup
Telerik team
 answered on 25 Nov 2024
1 answer
79 views

I need a support for ,

I am working on grid custom editing , i want to show success message after successful operation.

How can I do that ? Also If there is any way if we can use inbuild save changes button.

Below is my grid.

Thanks in advance.


            @(Html.Kendo().Grid<RVNLMIS.Models.ListMasterBOQResourceCalc>()
             .Name("ResourceTypeGrid")
             .Columns(columns =>
             {

                 // Resource Type column
                 columns.Bound(c => c.RsrcType)
                     .Title("Resource Type")
                     .ClientTemplate("#= RsrcType ? RsrcType.ResourceTypeName : '' #")
                     .EditorTemplateName("ClientResource")
                     .Sortable(false)
                     .HtmlAttributes(new { style = "text-align:left" })
                     .HeaderHtmlAttributes(new { style = "text-align:left" })
                     .Width(100)
                     ;

                 // Resource Name column
                 columns.Bound(c => c.drpResource)
                     .Title("Resource")
                     .ClientTemplate("#= drpResource ? drpResource.ResourceName : ''#")
                     .EditorTemplateName("ClientSubResources")
                     .Sortable(false)
                     .HtmlAttributes(new { style = "text-align:left" })
                     .HeaderHtmlAttributes(new { style = "text-align:left" })
                     .Width(170);

                 // Quantity column
                 columns.Bound(c => c.rsrcQty)
                     .Title("Quantity")
                     .HtmlAttributes(new { style = "text-align:right" })
                     .HeaderHtmlAttributes(new { style = "text-align:right" })
                     .Width(70)
                     .Format("{0:N2}");

                 // Wastage Percentage column
                 columns.Bound(c => c.wastagePct)
                     .Title("Wastage %")
                     .HtmlAttributes(new { style = "text-align:right" })
                     .HeaderHtmlAttributes(new { style = "text-align:right" })
                     .Width(60);

                 // Total Quantity column
                 columns.Bound(c => c.TotalQty)
                     .Title("Total Qty")
                     .HtmlAttributes(new { style = "text-align:right" })
                     .HeaderHtmlAttributes(new { style = "text-align:right" })
                     .Width(80)
                     .Format("{0:N2}");

                 // Unit column
                 columns.Bound(c => c.Unit)
                     .Title("Unit")
                     .HtmlAttributes(new { style = "text-align:left" })
                     .HeaderHtmlAttributes(new { style = "text-align:left" })
                     .Width(60);

                 // Base Rate column
                 columns.Bound(c => c.BaseRate)
                     .Title("Base Rate")
                     .HtmlAttributes(new { style = "text-align:right" })
                     .HeaderHtmlAttributes(new { style = "text-align:right" })
                     .Width(80)
                     .Format("{0:N2}");

                 // Total Rate column
                 columns.Bound(c => c.TotalRate)
                     .Title("Resource Amount")
                     .HtmlAttributes(new { style = "text-align:right" })
                     .HeaderHtmlAttributes(new { style = "text-align:right" })
                     .Width(100)
                     .Format("{0:N2}");
                 columns.Command(command => command.Destroy()).Width(80);
             })
             .ToolBar(t =>
             {
                 t.Template(@<text> <b class="ml-2"> Boq Resources Details </b>
                          @item.CreateButton()
                          @item.SaveButton()
                  </text>);
             })
             .Editable(editable => editable.Mode(GridEditMode.InCell))
             .Pageable() // Pagination enabled
             .Sortable() // Sorting enabled
             .Scrollable() // Scrollable grid
             .Events(e => e.Save("onGridSave"))
             .HtmlAttributes(new { style = "height:500px;" })
             .DataSource(dataSource => dataSource
                 .Ajax()
                 .Batch(true) // Batch editing
                 .ServerOperation(false) // Client-side operations
                 .Model(model =>
                 {
                     model.Id(p => p.AutoID); // Set primary key
                     model.Field(p => p.AutoID).Editable(false); // Disable editing for AutoID
                     model.Field(p => p.RsrcType).DefaultValue(
                                 ViewData["defaultResourceType"] as RVNLMIS.Controllers.Sub_BOQController.ResourceTypeModel);
                     model.Field(p => p.drpResource).DefaultValue(new RVNLMIS.Controllers.Sub_BOQController.DrpResourceModel
                     {
                         ResourceName = "Select Resource",
                         ResourceID = 0
                     });
                 })
                 .PageSize(20) // Set page size
                 .Read(read => read.Action("GetBOQResource_Details", "Sub_BOQ").Data("getBOQId"))
                 .Create(create => create.Action("EditingCustom_Create", "Sub_BOQ"))
                 .Update(update => update.Action("EditingCustom_Update", "Sub_BOQ"))
                 .Destroy(destroy => destroy.Action("EditingCustom_Destroy", "Sub_BOQ"))
             )
          )
Eyup
Telerik team
 answered on 22 Nov 2024
1 answer
33 views

  @(Html.Kendo().Grid<RVNLMIS.Models.ListMasterBOQResourceCalc>()
   .Name("ResourceTypeGrid")
   .Columns(columns =>
   {

       // Resource Type column
       columns.Bound(c => c.RsrcType)
           .Title("Resource Type")
           .ClientTemplate("#= RsrcType ? RsrcType.ResourceTypeName : '' #")
           .EditorTemplateName("ClientResource")
           .Sortable(false)
           .HtmlAttributes(new { style = "text-align:left" })
           .HeaderHtmlAttributes(new { style = "text-align:left" })
           .Width(120)
           ;

       // Resource Name column
       columns.Bound(c => c.drpResource)
           .Title("Resource")
           .ClientTemplate("#= drpResource ? drpResource.ResourceName : ''#")
           .EditorTemplateName("ClientSubResources")
           .Sortable(false)
           .HtmlAttributes(new { style = "text-align:left" })
           .HeaderHtmlAttributes(new { style = "text-align:left" })
           .Width(120);

       // Quantity column
       columns.Bound(c => c.rsrcQty)
           .Title("Quantity")
           .HtmlAttributes(new { style = "text-align:right" })
           .HeaderHtmlAttributes(new { style = "text-align:right" })
           .Width(70)
           .Format("{0:N2}");

       // Wastage Percentage column
       columns.Bound(c => c.wastagePct)
           .Title("Wastage %")
           .HtmlAttributes(new { style = "text-align:right" })
           .HeaderHtmlAttributes(new { style = "text-align:right" })
           .Width(60);

       // Total Quantity column
       columns.Bound(c => c.TotalQty)
           .Title("Total Qty")
           .HtmlAttributes(new { style = "text-align:right" })
           .HeaderHtmlAttributes(new { style = "text-align:right" })
           .Width(80)
           .Format("{0:N2}");

       // Unit column
       columns.Bound(c => c.Unit)
           .Title("Unit")
           .HtmlAttributes(new { style = "text-align:left" })
           .HeaderHtmlAttributes(new { style = "text-align:left" })
           .Width(60);

       // Base Rate column
       columns.Bound(c => c.BaseRate)
           .Title("Base Rate")
           .HtmlAttributes(new { style = "text-align:right" })
           .HeaderHtmlAttributes(new { style = "text-align:right" })
           .Width(80)
           .Format("{0:N2}");

       // Total Rate column
       columns.Bound(c => c.TotalRate)
           .Title("Resource Amount")
           .HtmlAttributes(new { style = "text-align:right" })
           .HeaderHtmlAttributes(new { style = "text-align:right" })
           .Width(100)
           .Format("{0:N2}");
       columns.Command(command => command.Destroy()).Width(150);
   })
   .ToolBar(t =>
   {
       t.Create().HtmlAttributes(new { style = "float:right; margin: 5px;" });
       t.Save().HtmlAttributes(new { style = "float:right; margin: 5px;" });
   })
   .Editable(editable => editable.Mode(GridEditMode.InCell))
   .Pageable() // Pagination enabled
   .Sortable() // Sorting enabled
   .Scrollable() // Scrollable grid
   .HtmlAttributes(new { style = "height:500px;" })
   .DataSource(dataSource => dataSource
       .Ajax()
       .Batch(true) // Batch editing
       .ServerOperation(false) // Client-side operations
       .Model(model =>
       {
           model.Id(p => p.AutoID); // Set primary key
           model.Field(p => p.AutoID).Editable(false); // Disable editing for AutoID
           model.Field(p => p.RsrcType).DefaultValue(
                       ViewData["defaultResourceType"] as RVNLMIS.Controllers.Sub_BOQController.ResourceTypeModel);
           model.Field(p => p.drpResource).DefaultValue(new RVNLMIS.Controllers.Sub_BOQController.DrpResourceModel
           {
               ResourceName = "Select Resource",
               ResourceID = 0
           });
       })
       .PageSize(20) // Set page size
       .Read(read => read.Action("GetBOQResource_Details", "Sub_BOQ").Data("getBOQId"))
       .Create(create => create.Action("EditingCustom_Create", "Sub_BOQ"))
       .Update(update => update.Action("EditingCustom_Update", "Sub_BOQ"))
       .Destroy(destroy => destroy.Action("EditingCustom_Destroy", "Sub_BOQ"))
   )
)

Above is grid code , the tool bar is not showing at the top of the grid .

It should show like below example.

 

Eyup
Telerik team
 answered on 22 Nov 2024
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?