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

Hi

I am building a scheduler edit dialog partialview, and in it i have 2 radio buttons. One of them has the .checked(true) parameter and yet its not checked, and when i check one of them with the mouse, the "The Type field is required" validation error tooltip shows up, and will not... f... go away without using the browser's console to add display:none; to it. (not a solution).

Searching for "remove validation tooltip" gives me nothing, and i have limited time to perfect this project.

My ISchedulerEvent model has an Enum called Type, and the creation of the radio button is done like this:

@(Html.Kendo().RadioButtonFor(x => x.Type).Name("caed_eventType_medical").Value(1).Label("Faglig").Checked(true).HtmlAttributes(new { onchange = "caed_RadioButtonChangeEvent(1);", @class = "caed_radioBtn", name = "caed_eventType_radio", data_bind = "value:type" }))

@(Html.Kendo().RadioButtonFor(x => x.Type).Name("caed_eventType_private").Value(2).Label("Privat").Checked(false).HtmlAttributes(new { onchange = "caed_RadioButtonChangeEvent(2);", @class = "caed_radioBtn", name = "caed_eventType_radio", data_bind = "value:type" }))


can someone please help?

Anton Mironov
Telerik team
 answered on 22 Jun 2021
2 answers
18 views

I use Telerik Kendo.UI for ASP.NET MVC.

Here is my view to render the radio button.

<div class="col-xs-2"></div>
 
Here is the css that I include,
<div class="col-xs-8">
    <div class="row text-center">
        <div class="col-xs-12">
            <h1>KENDO UI FORM</h1>
        </div>
    </div>
    <div class="row">
        <div class="col-xs-12">
            <form class="k-form">
                <fieldset>
                    <div class="form-field">
                        @(Html.Kendo().RadioButton().Name("engine1").Checked(true).HtmlAttributes(new { @name = "engine" }).Label("1.4 Petrol, 92kW"))
                    </div>
                    <div class="form-field">
                        @(Html.Kendo().RadioButton().Name("engine2").HtmlAttributes(new { @name = "engine" }).Label("1.8 Petrol, 118kW"))
                    </div>
                </fieldset>
            </form>
        </div>
    </div>
</div>
<div class="col-xs-2"></div>

 

Here is the css that I include,

1.<link rel="stylesheet" href="@Url.Content("~/content/kendo/2019.3.1023/kendo.bootstrap.min.css")" />
2.<link rel="stylesheet" href="@Url.Content("~/content/kendo/2019.3.1023/kendo.common-bootstrap.min.css")" />
3.<link rel="stylesheet" href="@Url.Content("~/css/telerik-default-theme.css")"

 

I attached the result in the attachment.

 

 

Is there any additional css to make this works?

Thank you.

Tsvetomir
Telerik team
 answered on 09 Sep 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
Iron
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
Iron
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?