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

Was this package recently removed from nuget ??

https://api.nuget.org/v3b.2013.3.1119' is not found on source 'https://api.nuget.org/v3/index.json'.)

Indeed it does not show up when seraching:

 

Eyup
Telerik team
 answered on 13 Sep 2022
0 answers
287 views
1 answer
131 views

Hi ,I am basically new to Telerik. I am trying to use a layout form in my view. but it is not posting data to the database. I did debugged all of my controllers and models so they are working fine, something is wrong in the view itself and I can't figure out what. Please help!!!!!!!!

This is all of my view (Create): 

@model WeighmoreSouth32Web.Models.Site
@using Kendo.Mvc.UI
@{
    ViewData["Title"] = "Create";
}

<h1>Create a Site</h1>


<div class="demo-section">

    <div id="validation-success"></div>
    
    @(Html.Kendo().Form<WeighmoreSouth32Web.Models.Site>()
        .Name("exampleForm")
        .HtmlAttributes(new { action = ("Create"), method="POST"})
        .Items(itemss =>
        {
            itemss.AddGroup().Layout("grid").Grid(g => g.Cols(3).Gutter(20)).Label("Personal Info").Items(items => { 
                   items.Add()
                        .Field(f => f.Name)
                        .Label(l => l.Text("Name:"));
                    items.Add()
                        .Field(f => f.Code)
                        .Label(l => l.Text("Code:"));
                    items.Add()
                        .Field(f => f.ABN)
                        .Label(l => l.Text("ABN:"))
                        .Hint("Hint: enter numeric/space characters only."); 
                        items.Add().ColSpan(3).Field(f => f.Description)
                        .Label(l => l.Text("Description:"))
                        .Editor(e => e.TextArea().Rows(2));
                        });
            })

    )
    
</div>

<div>
    <a asp-action="Index">Back to List</a>
</div>

    @section Scripts {
    @{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}


Eyup
Telerik team
 answered on 09 Sep 2022
1 answer
140 views

Hi,

I am trying to work with datepickerfor, and coming across a strange behavior. Every time I try to select a month year or date, the page scrolls to the top and I have to come to the bottom of the page again to select the date. 

Here is the code snippet for reference (it is a partial view).
Can anyone help, on how to get rid of this behavior.

 

@model ARGUS.Domain.ViewModel.VM_QualityCheckAdminUI
    <div class="card" id="QCDetails">
        <div class="card-header sub-detail"><b>Quality Check Answer Details</b></div>
        <div class="card-body" id="QCDetailsBody">
            <div class="alert alert-danger alert-dismissible d-none msgErr">
                <button type="button" class="btn-close" data-bs-dismiss="alert" id="closeBtnError"></button>
                <p id="errorMessage">
                    <ul id="ErrorList">

                    </ul>
                </p>
            </div>
            <table id="Category Details" width="100%" style="border-color:white">
<Set of other code snippets, other table rows>
                <tr>
                    <td>
                        <b>Effective Start Date:<span><i class="bi bi-asterisk" style="color:red;font-size:9px"></i></span></b>
                    </td>
                    <td>
                        @*@Html.Kendo().DatePicker().Name("datepicker").Format("dd-mm-yyyy").HtmlAttributes(new { style = "width: 220px", @class = "dateEntryDisabled" });*@
                        @Html.Kendo().DatePickerFor(m => m.EffectiveStartDate).Format("dd-MMM-yyyy").Value(Model.EffectiveStartDate.ToString("dd-MMM-yyyy")).HtmlAttributes(new { style = "width: 220px", @class = "dateEntryDisabled" })
                    </td>
                </tr>
                <tr>
                    <td>
                        <b>Effective End Date:</b>
                    </td>
                    <td>
                        @Html.Kendo().DatePickerFor(m => m.EffectiveEndDate).Format("dd-MMM-yyyy").Value(Model.EffectiveEndDate == null ? "" : Model.EffectiveEndDate.Value.ToString("dd-MMM-yyyy")).HtmlAttributes(new { style = "width: 220px", @class="dateEntryDisabled" })
                    </td>
                </tr>
            </table>
        </div>
            
</div>

<style>
    .txtdisabled {
        background-color: #F0F0F0 !important;
        color:grey !important;
    }
</style>
importing scripts at the end
Eyup
Telerik team
 answered on 09 Sep 2022
1 answer
140 views

Hi,

When I add .OpenOnClick(true) to my menu and I click on the menu to display the submenu, the page reloads automatically.

Do I need to add another instruction to prevent the page reloading? What's the problem?

 

Thank's in advance.

 

Ignacio

Eyup
Telerik team
 answered on 09 Sep 2022
1 answer
2.2K+ views

Hi, 

I have a problem with kendo. Yesterday I've installed Kendo.MVC library from NuGet pagckages, do all the configurations established in the web regarding Kendo and Razor, and it just don seem to work.

 

Web.Config configuration:

<system.web.webPages.razor>
    <host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    <pages pageBaseType="System.Web.Mvc.WebViewPage">
      <namespaces>
        <add namespace="System.Web.Mvc" />
        <add namespace="System.Web.Mvc.Ajax" />
        <add namespace="System.Web.Mvc.Html" />
        <add namespace="System.Web.Optimization"/>
        <add namespace="System.Web.Routing" />
        <add namespace="Kendo.Mvc.UI" />
        <add namespace="FNASystem" />
      </namespaces>
    </pages>
  </system.web.webPages.razor>

 

In the index.cshtml file:

@(Html.Kendo().Menu()
                  .SecurityTrimming(false)
)

 

All the documentation that I found said that this should work, but the Kendo() function appears underline in red and with an error message that said "HtmlHelper<dynamic> does not contains a definition for 'Kendo' are you missing a using directive or a reference?", so, I do this In the index.cshtml file:

@using Kendo.Mvc.UI

@(Html.Kendo().Menu()
                  .SecurityTrimming(false)
)

But the @using Kendo.Mvc.UI part said "the using directive is not necesary, it previously appears in this namespace."

So, can yo help me with this issue?

Best regards

 

Ivan Danchev
Telerik team
 updated answer on 09 Sep 2022
0 answers
116 views

I replaced these JS references. If I use the 2022 version, if the submission fails, the page will always be loaded and can't be clicked. If I use the 2021.1.224 JS page, it won't always be loaded and can be used normally!

zhe
Top achievements
Rank 1
Iron
Iron
 asked on 08 Sep 2022
1 answer
90 views

I am working on tabstrip and have created 3 of them.

One tabstrip has a .Selected(True) to be open when page is loaded initially.

But, the issue is, when I click on other tabs it does not respond in the 1st attempt (content is displayed below the content of 1st tab).

But, on 2nd attempt the tabs are working, although the focus is still consistent on the 1st tab, and it's not changing as we navigate to other tabs.

What might be happening here?

As you can see here, focus is on both Paris and Moscow, but actually it should only be on Moscow.

Yanislav
Telerik team
 answered on 07 Sep 2022
20 answers
3.6K+ views
I do not find a way to pass Id of a model(the selected record Id in grid) to custom command, how to do that?

.ToolBar(toolbar =>  {      toolbar.Create();      toolbar.Custom().Text("Clickme").Action("myAction", "myController");  })
Cristian
Top achievements
Rank 1
Iron
 answered on 06 Sep 2022
1 answer
108 views

I have a grid that has a field that applies an array of numbers
While reading, I present his values like this:
[2,5,900]
While editing it doesn't show me anything
how do I do it
Would appreciate help
Thanks

read:

edit:

Ivan Danchev
Telerik team
 answered on 06 Sep 2022
Narrow your results
Selected tags
Tags
+133 more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?