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

I posted this in the JavaScript forum three days ago and have yet to get a response. Maybe someone from Telerik will pay attention if I post it here instead.

I recently created a new project with the latest Kendo code. The project has numerous grids and most of them use filter rows. I do all my grid filtering, sorting, paging, and grouping on the server side using the DataSourceRequest object that the grid passes through the grid's data source read action. I noticed that in the latest version of Kendo, there are four new filter operations: Is Null, Is Not Null, Is Empty, and Is Not Empty. Those seem like good options to have for filtering. The problem is that, in their current form, they're unusable for server side filtering. The filters in the DataSourceRequest object are not providing the critical Member property when using any of the new operations so I have no way of knowing which columns in my database the new filters should be applied to. Can you tell me if you are aware of this issue and, if so, when you will fix it? Also, is there a way to keep those operations (or any of the others for that matter) from showing up in the list of filter operators? Thanks.

Rosen
Telerik team
 answered on 31 Mar 2016
1 answer
206 views

I've been using the demo to set up an Image and File browser for my editor.

The image browser seems to be working fine but the file browser doesn't open, I just get the standard window pop up.

I am have added the custom controller code in the same way, inherited and maintained the naming, and using the default routing for my application.

Any ideas of what could be wrong?

 

VIEW:

@(Html.Kendo().Editor()
.Name("Description")
.ImageBrowser(imageBrowser => imageBrowser
.Image("~/Content/ProjectFiles/" + (Model.RelatedProjectId > 0 ? Model.RelatedProjectId.ToString() + "/" : "") + "{0}")
.Read("Read", "ImageBrowser")
.Create("Create", "ImageBrowser")
.Destroy("Destroy", "ImageBrowser")
.Upload("Upload", "ImageBrowser")
.Thumbnail("Thumbnail", "ImageBrowser"))
.FileBrowser(fileBrowser => fileBrowser
.File("~/Content/ProjectFiles/" + (Model.RelatedProjectId > 0 ? Model.RelatedProjectId.ToString() + "/" : "") + "{0}")
.Read("Read", "FileBrowser")
.Create("Create", "FileBrowser")
.Destroy("Destroy", "FileBrowser")
.Upload("Upload", "FileBrowser"))
)

CONTROLLER

public class FileBrowserController : EditorFileBrowserController
{
private const string ContentFolderRoot = "~/Content/";
private static readonly string[] FoldersToCopy = new[] { "~/Content/shared/" };

etc....

 

 

 

 

Niko
Telerik team
 answered on 30 Mar 2016
1 answer
480 views
Does the numerictextbox support tooltip functionality?  I can't seem to find any documentation on this.
Venelin
Telerik team
 answered on 30 Mar 2016
2 answers
103 views

Is there a way to set the background color of all cells in a column across multiple pages of a grid?  I have a javascript function that sets the background color, however, as soon as I change pages, my highlighting goes away.

 

Thanks,

Matt

Matthew
Top achievements
Rank 1
 answered on 29 Mar 2016
7 answers
736 views

 

I have a grid in which one of the columns is a dropdown. I'd like to enable the Multi Filter checkboxes for this column.

How can I do this?  If I set Multi to true it just displays the usual dropdown filter menu.

 

Liesa
Top achievements
Rank 1
 answered on 29 Mar 2016
3 answers
343 views

I have a MultiSelectFor using ajax read where I return a list of SelectList Items. Some of the SelectList items have their selected property set to true. The MultiSelect does not display those items as being pre-selected.

I have attached a file showing the View and the Controller code. (in VB)

Ivan Danchev
Telerik team
 answered on 29 Mar 2016
1 answer
168 views

There has to be a setup issue somewhere.  I copied and pasted the Kendo dropdown example.

However the dropdown never calls my method in my controller.  It renders on my page(empty).

What am I missing?

  @(Html.Kendo().DropDownList()

                .Name("myMainName")

                .DataTextField("CustomerName")

                .DataValueField("CustomerID")

                .DataSource(s => {

                    s.Read(read =>

                    {

                        read.Action("GetCustomerList", "MyController");

                    })

                })

                .SelectedIndex(0)

 )

 

_Layout

@Scripts.Render("~/bundles/jquery")

@Scripts.Render("~/bundles/kendo")

@Styles.Render("~/bundles/css")

@Styles.Render("~/Content/kendo/css")

 

BundleConfig

    {

        public static void RegisterBundles(BundleCollection bundles)

        {

           

            bundles.Add(new ScriptBundle("~/bundles/jquery").Include("~/Scripts/jquery-{version}.js"));

           

 

            bundles.Add(new StyleBundle("~/bundles/css").Include("~/Content/*.css"));

 

            bundles.Add(new ScriptBundle("~/bundles/kendo").Include(

                "~/Scripts/kendo/kendo.all.min.js",

                // "~/Scripts/kendo/kendo.timezones.min.js", // uncomment if using the Scheduler

                "~/Scripts/kendo/kendo.aspnetmvc.min.js"));

 

            bundles.Add(new StyleBundle("~/Content/kendo/css").Include(

                "~/Content/kendo/kendo.common-bootstrap.min.css",

                "~/Content/kendo/kendo.bootstrap.min.css"));

 

            

 

            bundles.IgnoreList.Clear();

        }

Viktor Tachev
Telerik team
 answered on 29 Mar 2016
7 answers
1.5K+ views

Here is the code I am using to create the TreeView...

01.@(Html.Kendo().TreeView()
02.        .Name("CategoryTree")
03.        .TemplateId("TreeViewTemplate")
04.        .HtmlAttributes(new { })
05.        .DataTextField("Description")
06.        .AutoScroll(false)
07.        .LoadOnDemand(true)
08.        .Events(e => e.Select("_CategoryChooserView_OnCategorySelected"))
09.        .Events(e => e.Expand("_CategoryChooserView_OnCategoryExpand"))
10.        .Events(e => e.Collapse("_CategoryChooserView_OnCategoryCollapsed"))
11.        .Animation(true)
12.        //.DataSpriteCssClassField("DataSpriteCSSClass")
13.        .DataSource(d => d
14.            .Model(m => m
15.                .Id("CategoryCode")
16.                .HasChildren("HasChildren")
17.            )
18.            .Read(read => read.Action("ListSubCategories", "Services"))
19.            .Events(e => e.RequestEnd("_CategoryChooserView_OnCategoryRequestEnd"))
20.            .Events(e => e.RequestStart("_CategoryChooserView_OnCategoryRequestStart"))
21.    ))


After the Treeview is instantiated, I want to call a JavaScript function like this one to expand and select a particular node.  The node is not necessarily a top level node - it could be quite a ways down in the hierarchy.

01.function _CategoryChooserView_SelectNode(CategoryCode)
02.{
03. 
04.    if (CategoryCode.length > 0)
05.    {
06.        var TreeView = $("#CategoryTree").data("kendoTreeView");
07.        var DataItem = TreeView.dataSource.get(CategoryCode);
08. 
09.        if (DataItem)
10.        {
11.            var Node = treeview.findByUid(DataItem.uid);
12.            treeview.select(Node);
13. 
14.            ScrollElementToScrollableParent(Node);
15.        }
16.    }
17.}

The problem is that DataItem (line 7) comes back undefined every time, no matter what I feed "get()" method.  It seems to me that with a client side Treeview that fetches its data from a remote source upon expansion of a node, this can never be possible.

How can I programmatically expand and work my way down to the node I want selected?  I somehow need to expand each node down to the target node.  Is it even possible?

I pulled some of this from an example located here: http://www.telerik.com/forums/programatically-select-a-tree-node
Daniel
Telerik team
 answered on 28 Mar 2016
1 answer
71 views

Hello,

I'm having trouble getting the scheduler to display correctly when using JQuery 2.2.0. The times table is showing beside the days of the week instead of under it.

 

I've created a simple example here:

http://jsbin.com/lemadiqaju/1/edit?html,output

 

Any suggestions on how to get the scheduler working correctly?

Thank you.

Vladimir Iliev
Telerik team
 answered on 28 Mar 2016
3 answers
475 views
I have two drop downs in my Kendo grid, one for categories and one for sub-categories.  The sub-categories drop down needs to change based on the value of the category drop down.  This if fairly common scenario, but a bear to implement for someone who is new to Kendo.  For anyone attempting to do so, I strongly recommend searching the forum for 'KendoGridWithInCellCascadingDropDownLists' and studying it closely.  

I now have everything working properly and thought I would share a bit of what I learned from the experience.

a. While in InCell editing mode you cannot do something like this in your filter function:

    function filterSubCategories()
    {
        return { catId: $("#CategoryId").data("kendoDropDownList").value() };
    }

Instead, you must use the following to get the "CategoryId":

    function filterSubCategories()
    {
        var grid    = $("#equip-grid").data("kendoGrid");
        var editRow = grid.tbody.find("tr:has(.k-edit-cell)");
        var model   = grid.dataItem(editRow);

        return { catId: model.CategoryId };
    }

To me this is less than intuitive, NOT very developer friendly and somewhat of a hack!

b. In Inline edit mode, the filter function is called when the user selects an item from the CATEGORY drop down.  In InCell edit mode, the filter function is called when the user first clicks the SUB-CATEGORY drop down button.

This behavior in item b. is the reason for my post.  WHY this inconsistency, why not call the filter function when the user changes the CATEGORY drop down?

From a useabilty stand-point, I need to clear the SUB-CATEGORY drop down and set it to the OptionLabel value, whenever the CATEGORY drop down changes.  

Any thoughts on how to accomplish this?


Vladimir Iliev
Telerik team
 answered on 28 Mar 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?