Telerik Forums
UI for ASP.NET Core Forum
5 answers
279 views

Hello,

 

I have a problem with the listview widget, that occurs just in IE11.

Please open the demo: http://demos.telerik.com/aspnet-core/listview/keyboard-navigation

Run this command in the console: $('#main').css({ height: 400, overflow: 'auto' }).find('.product-view.k-widget').on('click', function () { alert('clicked'); });

What we do: Set the main area to a small height and set it scrollable. Add click listener to all items and show an alert on click.

If you now click on an item, everything is working as expected. Now scroll down with $('#main').scrollTop(700); and try to click one of the bottom items of the list. In this moment the widget gets the focus and scrolls to its beginning, but the click is not registered. In my application I also have a scrollable container with a listview inside and I need to register item clicks. Our application MUST work in IE11, because our customer is just using IE. It would be great if you analyze the problem and fix it in the future. For now I definately need a workaround asap. Thank you.

Stefan
Telerik team
 answered on 07 Jul 2017
2 answers
226 views

The DateInput server side wrapper does not appear to work with nullable DateTimes. In the below code, if 'TaxDate' is a nullable DateTime when the page is rendered the control will always display 'month/day/year' (as it does when the value is null) even if the value being passed to it isn't null.

I tried setting the .value() property on the control but it does not accept nullable DateTimes.

 

                @(Html.Kendo().DateInput()
                            .Name("TaxDate")
                            .HtmlAttributes(new { style = "width:100%;", @class = "autoSelectText" })

 

From the demo page it looks as if null is a supported state, does the server side wrapper not support it?

 

Thanks,

Brian

 

Brian
Top achievements
Rank 1
 answered on 06 Jul 2017
2 answers
157 views

HI All

I require the code behind in C# equivalent of the following asp.net code , could you help please.

 

<telerik:RadHtmlChart runat="server" ID="LineChart" Width="800" Height="500" Transitions="true">
    <PlotArea>
        <Series>
            <telerik:LineSeries Name="Week 15" MissingValues="Interpolate">
                <Appearance>
                    <FillStyle BackgroundColor="Blue" />
                </Appearance>
                <LabelsAppearance DataFormatString="{0}%" Position="Above" />
                <MarkersAppearance MarkersType="Square" BackgroundColor="Blue" />
                <SeriesItems>
                    <telerik:CategorySeriesItem Y="15" />
                    <telerik:CategorySeriesItem Y="23" />
                    <telerik:CategorySeriesItem />
                    <telerik:CategorySeriesItem Y="71" />
                    <telerik:CategorySeriesItem Y="93" />
                    <telerik:CategorySeriesItem Y="43" />
                    <telerik:CategorySeriesItem Y="23" />
                </SeriesItems>
            </telerik:LineSeries>
            <telerik:LineSeries Name="Week 16" MissingValues="Gap">
                <Appearance>
                    <FillStyle BackgroundColor="Red" />
                </Appearance>
                <LabelsAppearance DataFormatString="{0}%" Position="Above" />
                <MarkersAppearance MarkersType="Square" BackgroundColor="Red" />
                <SeriesItems>
                    <telerik:CategorySeriesItem Y="35" />
                    <telerik:CategorySeriesItem Y="42" />
                    <telerik:CategorySeriesItem Y="18" />
                    <telerik:CategorySeriesItem Y="39" />
                    <telerik:CategorySeriesItem Y="64" />
                    <telerik:CategorySeriesItem Y="10" />
                    <telerik:CategorySeriesItem Y="6" />
                </SeriesItems>
            </telerik:LineSeries>
        </Series>
        <XAxis MajorTickType="Outside" MinorTickType="Outside">
            <Items>
                <telerik:AxisItem LabelText="Monday" />
                <telerik:AxisItem LabelText="Tuesday" />
                <telerik:AxisItem LabelText="Wednesday" />
                <telerik:AxisItem LabelText="Thursday" />
                <telerik:AxisItem LabelText="Friday" />
                <telerik:AxisItem LabelText="Saturday" />
                <telerik:AxisItem LabelText="Sunday" />
            </Items>
            <MajorGridLines Color="#EFEFEF" Width="1" />
            <MinorGridLines Color="#F7F7F7" Width="1" />
            <TitleAppearance Position="Center" RotationAngle="0" Text="Days" />
        </XAxis>
        <YAxis MajorTickSize="1" MajorTickType="Outside" MaxValue="100" MinorTickSize="1"
            MinorTickType="Outside" MinValue="0">
            <LabelsAppearance DataFormatString="{0}%" RotationAngle="0" />
            <MajorGridLines Color="#EFEFEF" Width="1" />
            <MinorGridLines Color="#F7F7F7" Width="1" />
            <TitleAppearance Position="Center" RotationAngle="0" Text="CPU Load" />
        </YAxis>
    </PlotArea>
    <ChartTitle Text="Server CPU Load By Days">
    </ChartTitle>
    <Legend>
        <Appearance Position="Bottom" />
    </Legend>
</telerik:RadHtmlChart>

 

Eyup
Telerik team
 answered on 05 Jul 2017
4 answers
637 views

Hello,

If I use a DropDownListFor with ServerFiltering(true) there is no Initialization value - the DropDownList is always empty?

I use this DropDownListFor in a grid Editor template:

@(Html.Kendo().DropDownListFor(m => m.Mitglied_IDVerpaechter)
                                  .MinLength(1)
                                  .Height(400)
                                  .OptionLabel(" ").OptionLabelTemplate(" ")
                                  .DataTextField("Firmenbezeichnung")
                                  .Filter("contains")
                                  .NoDataTemplate("Keine Datensätze gefunden")
                                  .DataValueField("Mitglied_ID")
                                  .DataSource(dataSource =>
                                  {
                                      dataSource.Read(read => read.Action("Search", "Home", new { Area = "Mitglied" }).Type(HttpVerbs.Post))
                                          .ServerFiltering(true);
                                  })
                                  )

 

How to use ServerFiltering and also have a initialization value?

robert

 

Robert Madrian
Top achievements
Rank 1
Veteran
Iron
 answered on 02 Jul 2017
1 answer
309 views
Hi!

We are developing a Grid, and we require having an Editable ListBox or ListView in a Cell of a GRID.
I have search for this solution and try coding during a week without success.
My project is ASP.NET Core and MVC tech. I have tried with EditorTemplates and ClientDetailTemplateId without lucky.
Please, is this possible? Has the ListBox a SAVING action? and how can achieve this or similar?
The final requirement is having a Editable List of string items in the databound of the ViewModel.

Thanks in advance!
Stefan
Telerik team
 answered on 30 Jun 2017
3 answers
194 views

Hello,

 

I added the option .Navigatable() to my listView and wanted to add a event listener to the navigate function. But inside .Events(e => e...) there is no navigate event.

Georgi
Telerik team
 answered on 27 Jun 2017
3 answers
1.7K+ views

I'm trying to bind a grid to a collection property of a view model. The grid displays the items just fine when the view loads (see attached screenshot) and I'm also able to edit the items. When I save, however, the collection property is empty (has a count of 0). Everything else in my view model posts just fine when I save - the issue is limited to this particular grid and collection property. Here's the relevant view code:

 

@(Html.Kendo().Grid(Model.JobTitleHistory)
                                .Name("JobTitleGrid")
                                .Columns(columns =>
                                {
                                    columns.Bound(jobTitle => jobTitle.JobTitle).Width(120).HeaderHtmlAttributes(new { style = "height: auto; white-space: normal; vertical-align: middle;" });
                                    columns.ForeignKey(jobTitle => jobTitle.PayPeriodEffectiveDateID, (IEnumerable<GCEdge.Models.ViewModels.ComboBoxLookupViewModel>)ViewData["payPeriodEffectiveDateLookup"], "Value", "Name")
                                        .Title("Effective Date")
                                        .Width(120)
                                        .HeaderHtmlAttributes(new { style = "height: auto; white-space: normal; vertical-align: middle;" });
                                    columns.ForeignKey(jobTitle => jobTitle.PayPeriodEndingDateID, (IEnumerable<GCEdge.Models.ViewModels.ComboBoxLookupViewModel>)ViewData["payPeriodEndingDateLookup"], "Value", "Name")
                                        .Title("Ending Date")
                                        .Width(120)
                                        .HeaderHtmlAttributes(new { style = "height: auto; white-space: normal; vertical-align: middle;" });

                                })
                                .Editable(options => options.Enabled((ViewData["ViewPermissionLevel"].ToString() != "ReadOnly" && ViewData["ViewPermissionLevel"].ToString() != "Hidden")).Mode(GridEditMode.InCell))
                                .Pageable(options => options.PreviousNext(true))
                                .Sortable(true)
                                .Scrollable(options => options.Height(200)))

 

I've done some searching elsewhere on your forums and tried the approach demonstrated here with no luck either. I've included that code below as well for reference.

https://github.com/telerik/ui-for-aspnet-mvc-examples/blob/master/grid/submit-grid-with-form/KendoUIMVC5/Views/Home/Index.cshtml

 

@(Html.Kendo().Grid(Model.JobTitleHistory)
                              .Name("JobTitleGrid")
                              .ToolBar(tools => tools.Create().Text("Add"))
                              .Editable(editable => editable.Mode(GridEditMode.InCell).CreateAt(GridInsertRowPosition.Top))
                              .Columns(columns =>
                              {
                                  columns.Bound(jobTitle => jobTitle.JobTitle).ClientTemplate("#= JobTitle #" +
                                    "<input type='hidden' name='JobTitleHistory[#= index(data)#].JobTitle' value='#= JobTitle #' />"
                                  );

                                  columns.Bound(jobTitle => jobTitle.PayPeriodEffectiveDateID).ClientTemplate("#= PayPeriodEffectiveDateID #" +
                                    "<input type='hidden' name='JobTitleHistory[#= index(data)#].PayPeriodEffectiveDateID' value='#= PayPeriodEffectiveDateID #' />"
                                  );
                                  columns.Bound(jobTitle => jobTitle.PayPeriodEndingDateID).ClientTemplate("#= PayPeriodEndingDateID #" +
                                    "<input type='hidden' name='JobTitleHistory[#= index(data)#].PayPeriodEndingDateID' value='#= PayPeriodEndingDateID #' />"
                                  );
                              })
                              .DataSource(dataSource => dataSource.Ajax()
                                       .Model(model =>
                                       {
                                           model.Id(jt => jt.PayPeriodEndingDateID);
                                       })
                                       .ServerOperation(false)
                                  )

<script>                      )

function index(dataItem) {
        var data = $("#JobTitleGrid").data("kendoGrid").dataSource.data();

        return data.indexOf(dataItem);
    }

</script>

Viktor Tachev
Telerik team
 answered on 26 Jun 2017
3 answers
226 views

Hello,

the accessibility support is really important for our projects. The keyboard support of your widgets is overall ok, but the screenreader support is horrible. I tested with Windows 10 + Edge + JAWS Screenreader (v18) (Our customers are bound to the JAWS software).

I.e. spreadsheet: change the active cell with arrows keys -> the screenreaders doesnt read anything.

I.e. multiselect -> focus the input and the screenreader doesnt read the selected items. Also when I open the dropdown and change the selection, it reads nothing.

This are just two examples and Im sure there are similar problems in the other widgets. It would be great if you would make the widgets screenreader-ready in the future.

Can you confirm these problems?

Veselin Tsvetanov
Telerik team
 answered on 26 Jun 2017
4 answers
354 views

I am trying to filter a grid with a custom button on my toolbar by applying a date filter.

The button works and places the correct date in the column filter as shown in picture but does not fire the Filter action.

If I open the Column filter and press filter, then it applies it.

Jquery button action:

$('#GridSampleLog').data().kendoGrid.dataSource.filter({
field: 'DateToDispose', operator: 'lt', value: getDate()
});

 

See attached pictures for after click and after click on Filter.

I am using other filters that work well for integer values.

Using ASP.Net core UI version 2017.2.504

Francis
Top achievements
Rank 1
 answered on 20 Jun 2017
9 answers
629 views

Hello,

I know that it is possible to use "autoFitColumn" to size the columns in a scrollable grid but it is slow for many rows - disable Scrolling is not an Option.

Is there a possibility (Javascript) to resize the columns only for the content of the first few (10) rows, so that it is faster?
(loop through the first rows and resize all coumns...)

 

function gridDataBound(e) {
        var grid = $("#gridEQ").data("kendoGrid");
 
        for (var i = 0; i < grid.columns.length; i++) {
 
            grid.autoFitColumn(i);
        }
    }
Georgi
Telerik team
 answered on 19 Jun 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?