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

HI,

I am using Telerik Spreadsheet in my web page.  I have given column headers and enabled filtering and sorting. I filtered a column by its value and applied it for two or more times with different values. Then I tried to undo it using ctrl + z.  But then the data got disappeared like it has filtered with no value. When I opened the filter box, I noticed that all the values are unchecked. So I tried to check all the values and apply, but nothing is happening.

I also noticed the filter option getting removed from the header when I click the clear button and then undoing ctrl + z.

I have verified the same behavior in the Telerik demo. I have attached the screenshots of the demo in which I checked.

Is there any workaround or any overriding possible?

Ivan Danchev
Telerik team
 answered on 24 Jun 2021
0 answers
68 views

The column headers are not horizontally scrolling with the data and I need to fix it so it does. This is what I have to capture data from a .NET data table:

 

@if (Model != null)
{
 
    @(Html.Kendo().Grid(Model)
                .Name("Grid")
                .Columns(columns =>
                {
                    foreach (System.Data.DataColumn column in Model.Columns)
                    {
                        var c = columns.Bound(column.ColumnName);
                        if(column.ColumnName.Equals("Quarter"))
                        {
                            c.Width(100);
                        }
                        else
                        {
                            c.Width(100);
                        }
                    }
                })
                .Pageable()
                .Sortable()
                .Filterable()
                .Scrollable()
                //.Groupable()
                .DataSource(dataSource => dataSource
                    .Ajax()
                 .Model(model =>
                 {
                     //var id = Model.PrimaryKey[0].ColumnName;
                     foreach (System.Data.DataColumn column in Model.Columns)
                     {
                         var field = model.Field(column.ColumnName, column.DataType);
                         field.Editable(false);


                     }
                 })
                 //.Read(read => read.Action("Read", "QuickQuery"))
                 )
        )
Michael
Top achievements
Rank 1
 asked on 23 Jun 2021
1 answer
378 views

Hi there,

I am using Kendo UI for ASP.NET MVC.

I am interested in using the Drawer as a side menu, but I can't seem to find a way to have it expanded by default when the page loads.  Is this possible?

 

Petar
Telerik team
 answered on 23 Jun 2021
1 answer
377 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
1 answer
550 views

Hi

I am trying to create a vertical grouping based on the data from our db.

The usecase is to show a continuous event spanning whatever start and end time, for each Room (the duplicate is a db issue so nevermind that). So i dont want the time rows, and would like to remove them permanently. 

I attached some screenshot of what i want it to look like (ish), also done with telerik schedule, but in WPF. 

And an image of what my attempt looks like in mvc.

Heres my mvc razor code:

@model IList<WebStaffScreen.Models.TaskViewModel>
@using Kendo.Mvc.UI

@(Html.Kendo().Scheduler<WebStaffScreen.Models.TaskViewModel>()
	.Name("booking_scheduler")
	.DateHeaderTemplate("<span class='k-link k-nav-day'>#= kendo.toString(date, 'dd-MM-yyyy') #</span>")
	.Date(DateTime.Now)
	.StartTime(DateTime.Now)
	.CurrentTimeMarker(false)
	.AllDaySlot(true)
	.Views(v => {
		v.WeekView(x => x.Selected(true));
		v.TimelineView();
	})
	.Timezone("Etc/UTC")
	.Group(g => g.Resources("Rooms").Orientation(SchedulerGroupOrientation.Vertical))
	.Resources(r => r.Add(m => m.RoomID)
		.Title("Room")
		.Name("Rooms")
		.DataTextField("RoomName")
		.DataValueField("RoomID")
		.DataColorField("AppointmentColor")
		.BindTo(Model)
		.DataSource(d => { d.Custom().Transport(t => t.Read(x => x.Action("GetRoomsInResidence", "Booking"))).Schema(s => s.Model(m => { m.Id("RoomID"); m.Field("RoomName", typeof(string)); })); })
	)
	.DataSource(d => d
		.Model(m => {
			m.Id(f => f.TaskID);
			m.Field(f => f.Title).Editable(false);
			m.Field(f => f.Start).Editable(false);
			m.Field(f => f.End).Editable(false);
		})
		.Read("Read", "Booking")
		.Create("Create", "Booking")
		.Update("Update", "Booking")
		.Destroy("Destroy", "Booking")
	)
)

The data finally comes out and it creates the rows (except for the colors), and adds them to the correct resource group's all day row.. But all the rows with time needs to go away, because its simply not needed for this particular scheduler view.

Can you please help?

Attila
Top achievements
Rank 1
Iron
Iron
 answered on 22 Jun 2021
1 answer
180 views

Schedule works correctly in Opera and Edge browsers, but behaves inappropriately in Google Chrome.

Follow images of behavior.


var tipo = ViewData["Tipo"];
		@(Html.Kendo().Scheduler<AgendamentoWeb.Models.Scheduler.MeetingViewModel>()
		.Name("scheduler")
		.MajorTimeHeaderTemplate("<span>#=kendo.toString()#</span>")
		.DateHeaderTemplate("<span>#=kendo.toString(date, 'dd - MMM')#</span>")
		.MajorTick(1440)
		.Height(600)
		.Selectable(true) //ADD 15/05/2019
		.EventTemplateId("event-template")
		.Editable(false)
		.Views(views =>
		{
			views.TimelineView(t => 
			{
				t.Title("Dia");
				t.ColumnWidth(50);
				t.EventHeight(10);
			});
			views.TimelineWeekView(t =>
			{
				t.Title("Semana");
				t.ColumnWidth(50);
				t.EventHeight(10);

			});
			views.TimelineMonthView(timeline =>
			{
				timeline.ColumnWidth(70);
				timeline.Title("Mês");
				timeline.EventHeight(10);
				timeline.Selected(true); //ADD 15/05/2019
			});
			views.CustomView("kendo.ui.SchedulerTimelineYearView", mv =>
			{
				mv.Title("Ano");
				//mv.Selected(true); //ADD 15/05/2019
			});
		})
		.Timezone("Etc/UTC")
		.Group(group => group.Resources("Attendees").Orientation(SchedulerGroupOrientation.Vertical))
		.Resources(resource =>
		{
			resource.Add(m => m.Attendees)
				.Title("Attendees")
				.Name("Attendees")
				.DataTextField("Nome")
				.DataValueField("PessoaID")
				.DataColorField("CorAtividadeAtiva")
				.Multiple(true)
				.DataSource(s => s.Read(read => { read.Action("ListaPessoasAgendamento", "Scheduler", new { Tipo = tipo }); }));
		})
		.DataSource(d => d.Model(m =>
		{
			m.Field(f => f.RoomID);
			m.RecurrenceId(f => f.RecurrenceID);
		})
		.Read("Timeline_Read", "Scheduler")
		))

 

 

Anton Mironov
Telerik team
 answered on 18 Jun 2021
1 answer
191 views

Hi,

i'm trying to use server pagination (as done for grids) with TreeList component. As i saw on component documentation, the pagination is only done for client side but this, for performance problems,  is not good for us..

Is there a way to make it work for this component as done for Grid (like on this https://demos.telerik.com/aspnet-mvc/grid/serverbinding?Grid-sort=&Grid-page=4&Grid-pageSize=10&Grid-group=&Grid-filter=)

 

Many thanks

Stefano

Ivan Danchev
Telerik team
 answered on 18 Jun 2021
1 answer
657 views

Hey,

i've got kendo grid with filter row, i'm trying to hook-up all filter inputs to custom kendoAutoComplete(...) components.

Every column definition:

...
columns.Bound(x => x.ColumnName).Filterable(x => x.Cell(y => y.Template("onFilterAutocomplete")));
...

Template function definition:

function onFilterAutocomplete(e)
{
 var columnName = $(e.element).closest('span[data-field]').data('field');

 e.element.kendoAutoComplete({
	dataSource: {
            transport: {
                read: {
                    url: '@urlFilterAutocomplete',
                    type: 'POST',
                    data: {
                        field: columnName,
                        text: /* ... how to get currently entered text here dynamically? ... */
                    }
                }
            }
        }
    });
}

Controller:

[HttpPost]
public async Task<JsonResult> FilterAutocompleteAsync(string field, string text) => Json(/*... db ...*/);
All i'm able to send to the controller now is parameter "field". How do i send value entered to one of many autocompletes when i don't know the specific autocomplete instance?
Z
Top achievements
Rank 1
Iron
 answered on 17 Jun 2021
1 answer
247 views
I need to fill a word document with information from the database, and then show it in the editor
Anton Mironov
Telerik team
 answered on 17 Jun 2021
1 answer
136 views

Hi guys,

Is it possible to show different value between 2 bars (series) on top of them?

like red text in the picture 

 

I explored https://demos.telerik.com/aspnet-mvc/bar-charts but I have no luck.

I'm using ASP.Net.

Please give me some advice.

Thank you,

S.

 

Eyup
Telerik team
 answered on 16 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?