Telerik Forums
UI for ASP.NET MVC Forum
5 answers
622 views
Hi all!

I'm using the feature described here http://demos.kendoui.com/web/treeview/api.html to filter treeview items by text. 

I already have all nodes loaded (they are not all expanded), but when I apply the filter using the code above, it does not work.

treeview.dataSource.filter({
field: "text",
operator: "contains",
value: filterText
});

Example 

  • Item aa
  • Item bb
    • Item xx
    • Item yy

if search text is "xx", no items are displayed. Instead I would like to have the following result:

  • Item bb
    • Item xx
But if your search text is "aa", "bb" or some string similar to root item texts ... the nodes are displayed

Does anyone knows how to make the filter applying for all nodes?

BTW! I'm using MVC and the last build of Kendo

Thanks!
Alex Gyoshev
Telerik team
 answered on 17 Nov 2015
2 answers
80 views

I'm not sure if this us something that a Keno control could handle but I thought I'd best ask anyway.  On part of my form the user can add multiple entires before submission.  I need to know if it's possible to handle this behaviour with Kendo controls?  I've attached a couple of images to show you what I mean.

The user can add as many items as they want.

Many thanks

 

Allan

Kiril Nikolov
Telerik team
 answered on 17 Nov 2015
1 answer
359 views

Hi,

With filterable->mode set to row, is it possible to filter a date between two dates? I ​found this thread http://www.telerik.com/forums/how-to-define-a-kendo-grid-column-filter-between-two-dates, and currently have ​it applied ​to grid menu filter, but not sure how to make it work when the filterable mode is row.

 

Thanks,

Lisa

 

Vladimir Iliev
Telerik team
 answered on 17 Nov 2015
3 answers
400 views

I am in need of some help, I'm building a web application that uses the KendoUI, specifically the grid to display data.  I've used the entity framework under a "database first" scenario, this means that the models are created for me for all the tables in my database.  I'm displaying this data in the Kendo grid but I can't edit or delete any of the entries (inline with ajax).  If you delete an item it returns when you regresh the screen and the update button does nothing.  I suspect this is because we have no functions to handle these events.

Is there anyway I can utilise the already created scaffolded controller to do this as it already as an edit and delete function in it.

 Any help would be appreciated.

Kiril Nikolov
Telerik team
 answered on 17 Nov 2015
1 answer
72 views
I'm having some issues with the Grid paging in Kendo MVC. Everything on the grid is accessible except the paging options in the bottom left corner. I should be able to use ALT + Page Up or ALT + Page Down, but these do not work. Any idea what may be causing this issue?
Plamen
Telerik team
 answered on 17 Nov 2015
8 answers
120 views

Hi,

I have 2 Kendo Grids in which 2nd grid is read based on the selection of row of 1st grid. The code is:

1st grid

        <% Html.Kendo().Grid<EvaluationsQuestionsEvaluationVersionGridViewModel>(Model.VersionsGridModel)
            .Name("Versions")
           .DataSource(dataSource => dataSource
                    .Ajax()
                    .Model(model => model.Id(a => a.EvaluationVersionId))
                    .ServerOperation(true)
                    .Create(create => create.Action("InsertEvaluationVersion", "Evaluations"))
                    .Read(read => read.Action("LoadEvaluationsQuestionsEvaluationVersionGridAjax", "Evaluations"))
                    .Update(update => update.Action("UpdateEvaluationVersion", "Evaluations").Data("onUpdateEvaluationVersion"))
                )
            .Events(e => e.Change("onVersionGridRowSelect")
                          .Edit("onEditEvaluationsVersion")
                          .Save("onSaveEvaluationsVersion")
                    )​

.....

2nd grid

        <% Html.Kendo().Grid<EvaluationsQuestionsEvaluationPillarsGridViewModel>()
            .Name("Pillars")
            .DataSource(dataSource => dataSource
                  .Ajax()
                  .Model(model => model.Id(a => a.EvaluationMasterPillarId))
                  .ServerOperation(true)
                  .Read(read => read.Action("LoadEvaluationsQuestionsEvaluationPillarsGridAjax", "Evaluations")
                                    .Data("onLoadEvaluationsQuestionsEvaluationPillarsGridData"))
             )​

......

        function onVersionGridRowSelect(e) {
            var grid = $("#Versions").data("kendoGrid");
            var currentRow = grid.dataItem(grid.select());
            var evaluationVersionId = currentRow.EvaluationVersionId;

            $('#evaluationVersionId').val(evaluationVersionId);
            $("#Pillars").data("kendoDropDownList").dataSource.read();
        }

        function onLoadEvaluationsQuestionsEvaluationPillarsGridData(e) {
            var evaluationVersionId = $('#evaluationVersionId').val();  // "evaluationVersionId" is set beforehand
            var showDeletedCheckbox = $('#Checkbox1').val();

            return { evaluationVersionId: evaluationVersionId, showDeleted: showDeletedCheckbox }
        }

But 2nd grid can not be read because Data function "onLoadEvaluationsQuestionsEvaluationPillarsGridData" is not called. So what is the problem in code?​ Thanks.

york
Top achievements
Rank 1
 answered on 16 Nov 2015
4 answers
1.4K+ views
Hi,
If I have grouped my kendogrid by multiple columns, Can I hide the header for the first column and display only the second header? Right now, after grouping by two columns, we have two headers. I can get the details of the first groupby and display in the headertemplate of the second grouping.. So, want to do away with the header created by the first grouping.
As shown in the screenshot, I want to retain the header encircled in GREEN and do away with the one in red. I would still want the grouping but just don't want the header.
Will
Top achievements
Rank 1
 answered on 16 Nov 2015
4 answers
89 views

Hello to all.

I'd like to validate a field, for example the standard Title field in an Calendar Event.

The validation works well in the BASIC example:

http://demos.telerik.com/aspnet-mvc/scheduler/index

I added the [Required] attribute on the Model.

Anyway in my code, the generated HTML code doesn't have the "required" attribute end not any validation is performed.

Someone can help me please?

 

Vladimir Iliev
Telerik team
 answered on 16 Nov 2015
3 answers
417 views

I have a chart which has too many values to fit comfortably on the screen all at once.

 I have made it pannable and zoomable as per the demo example.  This works, but the chart initially still opens with all the columns squashed onto the screen.

How can I set a fixed zoom level (which the user can't change) to enable panning of the chart?

Also, will a scrollbar or other visual indicator that a chart can be panned be added soon? Currently it's not very user friendly, and requires an application to find a way to tell users how to scroll the chart. Alternatively, can panning be activated by JavaScript, so some left / right buttons can be added?

The chart code is:-

@(Html.Kendo().Chart<Dashboard.Models.BarChartDataItem>(Model)
            .Name((string)ViewBag.ChartName)
             .Title((string)ViewBag.ChartTitle)
             .Theme("bootstrap")
            //.RenderAs(RenderingMode.Canvas)              
 
            .Legend(legend => legend
                .Position(ChartLegendPosition.Top)
                .Visible(false)
            )
     
            .Series(series =>
            {
                series.Column(model => model.BarValue).Name("Actual").Labels(l=>l.Template("#=dataItem.ExtraValue#").Visible(true));
            })
            .ChartArea(area => area
                .Height(350)
                .Background("transparent")
                )
            .CategoryAxis(axis => axis
 
 
                .Categories(model => model.AxisValue)
                .Labels(labels => labels.Rotation(-90))
                .MajorGridLines(lines => lines.Visible(false))
                 .Title((string)ViewBag.Xaxis)
 
            )
            .Pannable(p=>p.Lock(ChartAxisLock.Y))
             .Zoomable(zoomable => zoomable
            .Mousewheel(mousewheel => mousewheel.Lock(ChartAxisLock.Y))
            .Selection(selection => selection.Lock(ChartAxisLock.Y))
        )
 
            .ValueAxis(axis => axis.Numeric()
                .Labels(labels => labels.Format("{0:N2}"))
                .Title((string)ViewBag.Yaxis)
 
 
                .Line(line => line.Visible(false))
            )
            .Events(e=>e.SeriesClick("seriesClick"))
 
            .Tooltip(tooltip => tooltip
                .Visible(true)
 
                .Format("{0:N2}")
            )
 
)

Thanks

 

Daniel
Telerik team
 answered on 16 Nov 2015
5 answers
795 views

Hi.

 

I would like to open multiple popup windows from ActionLinks within a grid.

The column template for the single-column grid is such...

        string Template =
            "<tr>" +
                "<td>" +
                    "<div class='ResultListing'>" +
                        "<div class='Technical'>" +
                            Ajax.ActionLink("#:CompanyName#, #:MfgModelNumber#", "GetDetails", "Services", new { ComponentID = "#:ComponentID#" },

                                       new AjaxOptions() { HttpMethod = "POST" }, new { @class = "ResultsTitle" }) + "<br />" +

                            "<span>MPN: #:MfgPartNumber#</span><br/>" +
                            "<span>Key: #:ConfigurationKey#</span><br/>" +
                        "</div>" +
                        "<div class='Space'>" +
                        "</div>" +
                        "<div class='Technical'>" +
                            "<span>Description: #:DesignDescription#, #:CategoryDescription# </span><br/>" +
                            "<span>Elastomers: #:(Elastomers == '0') ? 'N/A' : Elastomers#; Materials: #:(Materials == '0') ? 'N/A' : Materials#</span><br/>" +
                            "<span>Sizes: #:(Sizes == '0') ? 'N/A' : Sizes#; </span><br/>" +
                            "<span>Configuration: #:Configurations# </span><br/>" +
                            "<span>Leyla ID: #:ComponentID# (#:ComponentStatus#)</span>" +
                        "</div>" +
                        "<div id='PictureDiv' class='ControlAndLabel AlignCenter'>" +
                            "# if (URL.length > 0) { #" +
                                "<img src='#:URL#' class='ComponentImg'/><br/>" +
                                "<span>#:ImageDescription#</span>" +
                            "# } else { #" +
                                "&nbsp;" +
                            "# } #" +
                        "</div>" +
                    "</div>" +
                "</td>" +
            "</tr>"
            ;

​The Ajax.ActionLink should be able to open a new popupwindow based on the ID contained in the grid for that row.  The controller will return a partial view to the popup window...

 

        [HttpPost]
        public PartialViewResult ​GetDetails(int ComponentID)
        {

            PartialViewResult Result = PartialView("_ComponentDetailView", ComponentID);

            return (Result);
        }

The popup windows are not modal, so that multiple ​popups can be opened at the same time.  The user can click multiple links from the grid, popping up multiple detail windows at the same time.

 

The detail popups should fetch data from a database only when activated.

I am rather new to MVC and to the Kendo tools.  At this point, I am not even sure this is the best way to do it.  I am hoping a new Kendo Window can be instantiated ​by clicking the Action link in the grid and populated by somehow passing in the id of the object whose details the user wants to see.

Any help would be appreciated.

Daniel
Telerik team
 answered on 16 Nov 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
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
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?