Telerik Forums
UI for ASP.NET MVC Forum
2 answers
198 views

I have two applications which both manage hierarchies using treeviews, allowing dragging and dropping of items into a hierarchy tree.

Sample1.jpg shows the working application, whilst Sample2.jpg shows the problem one.

They both work, but on one, the treeview correctly displays the lines to indicate where an item will be dropped, whilst in the other, the line is not shown apart from a tiny dot.  I've compared the two applications, and switched out the bootstrap themes and styles, and cannot identify the issue. In the DOM explorer, the treeview styles look the same.

The malfunctioning application is using version 2019.1.220 of the framework.

Any help to fix this issue would be appreciated.

Thanks

AP
Top achievements
Rank 1
Iron
Iron
Veteran
 answered on 20 Jun 2019
6 answers
894 views

Hai. So, I have view and I loaded column chart on this view like partial view(chart diagram). And I have a little problem, I can't to send data from controller. I need to load data after sorting data. I send service id and after that, loading chart with data only for this service.
Load main view => send data in controller with service id => in contoller do query for database => load data in partial chart view => display partial view chart data in main view

//Partial view
@Html.Partial("~/Views/Graphs/TableStatementsChart.cshtml", new ViewDataDictionary { { "Id", Model.servicesModel.Id } })
 
//contoller
public ActionResult TableStatementsChart(int Id)
        {
            ViewBag.IdService = Id;
 
            return View("~/Views/Graphs/TableStatementsChart.cshtml");
        }
 
        [HttpPost]
        public ActionResult TableStatements_Read(int Id)
        {
            int localId = Id;
 
            return Json(db.TableStatements.Select(tableStatements => new
            {
                fkIdServices = tableStatements.fkIdServices,
                Month = tableStatements.Month,
                Count = tableStatements.Count,
                DoneCount = tableStatements.DoneCount,
                TopicalCount = tableStatements.TopicalCount
            }).Where(x=>x.fkIdServices == Id));
        }
//Chart diagram
@{
    Layout = "~/Views/Shared/_LayoutKendoUIChart.cshtml";
}
 
@(Html.Kendo().Chart<NarkomApp.Models.TableStatements>()
      .Name("chart")
      .Title("Заявки")
      .Legend(legend => legend.Position(ChartLegendPosition.Bottom))
      .Tooltip(tooltip => tooltip.Visible(true))
      .DataSource(ds => ds.Read(read => read.Action("TableStatements_Read", "TableStatementsChart")))     
      .Series(series =>
      {
          series.Column(a => a.Count).Name("Общее").Color("red");
          series.Column(a => a.DoneCount).Name("Выполненные").Color("blue");
          series.Column(a => a.TopicalCount).Name("Актуальные").Color("green");
      })
      .CategoryAxis(axis => axis
      .Categories(model => model.Month).Labels(labels => labels.Rotation(-90)))
)

 

Meypar
Top achievements
Rank 1
 answered on 19 Jun 2019
3 answers
247 views

I installed the telerik extensions and used it to create a new "Telerik MVC" project.  Compiling warns about dll conflicts and if you run the base project it errors with a similar error.

Should I assume Telerik is not quite stable with studio 2019?

Vesko
Telerik team
 answered on 18 Jun 2019
1 answer
1.1K+ views

HI all  I'm Kind of new to Grids  

i want to build an grid  which looks kind of this 

Grid Title | Column Title  | Column Title | 

row  Title | Value             | Value            |

row  Title | Value             | Value            |

row  Title | Value             | Value            |

 

The "title" fields should not get a static content so they should not be retrieved from the database,

the "value" fields should be "dynamic" and get their content from a database. 

Now my question : how do I create these "static" fields? 

Marin Bratanov
Telerik team
 answered on 14 Jun 2019
1 answer
713 views

So we recently updated our version of kendo to 2015.2.805.

The error ("Uncaught TypeError: Cannot read property 'value' of undefined") is caused by line 3 of the following JavaScript ("multiselect" on line 1 is undefined):

1.var multiselect = $("#Statuses").data("kendoMultiSelect");
2.var selectedData = [];
3.var items = multiselect.value();

 

Initialization code:

1.<label>Statuses</label>
2.@(Html.Kendo().MultiSelect()
3.    .Name("Statuses")
4.    .Placeholder("Select statuses...")
5.    .BindTo(Model.AllStates)
6.    .ItemTemplate("<span class=\"workflow-state #:getStateClass(data.Value)#\">#:data.Text#</span>")
7.    .TagTemplate("<span class=\"workflow-state #:getStateClass(data.Value)#\">#:data.Text#</span>")
8.    .Value(Model.SelectedStatuses))

When testing this code on a previous version of the application, the feature works. However, since that version we have updated kendo, as well as the references to kendo (in _Layout.cshtml).

Could this maybe be a reference issue?

Regardless of whether we add or remove kendo.web.min.js, the problem persists.

We are referencing the following files, all of these files return an OK result:

1./kendo/2015.2.805/kendo.all.min.js
2./kendo/2015.2.805/kendo.aspnetmvc.min.js
3./kendo/2015.2.805/cultures/kendo.culture.en-GB.min.js
4./kendo/2015.2.805/kendo.web.min.js
Veselin Tsvetanov
Telerik team
 answered on 14 Jun 2019
6 answers
665 views

Would someone be able to offer any suggestions on how to display TreeView with certain node paths already expanded based on a "expandFolder" boolean attribute that is returned in the Remote_Data_Binding controller?

I'm using code similar to the below example with an additional "expandFolder" boolean attribute on the database.
https://demos.telerik.com/aspnet-mvc/treeview/remote-data-binding

 

Additionally, when a user clicks a node, the tree needs to fully expand any child nodes whose "expandFolder" is true.

I saw some posts about an "expand: true" setting topic but couldn't figure out how to use that approach with the LoadOnDemand treeview pulling from remote data binding.  I also saw some uses with expandPath.  However, I was hoping there's a way to use the existing node data without having to re-traverse the entire tree since I already set the expandFolder in the Controller?

Thanks in advance for any help,

Gil

 

 

 

Dimitar
Telerik team
 answered on 14 Jun 2019
2 answers
267 views
Hi

I am using the Render event on a chart to add a subtitle with the code is based on the Kendo example "Display the Chart Title on Multiple Lines and Use Different Fonts". The problem i am having is that my subtitle is not centered and I assumed that because the chart title is centered by default then the subtitle would be as well. If you look at the dojo for the above mentioned example the subtitle is centered, however if you change the text of the second line to that shown below, you will see that is is no longer centerred. How can I ensure that my sub title is always centered. 

Thanks

<script>
    $("#chart").kendoChart({
        title: {
            text: "Total account value (USD):\ntextplaceholder\nClick a bar to drill down",
            position: "bottom"
        },
        series: [{
            data: [1, 2, 3]
        }],
        render: function(e) {
            var tph = e.sender.element.find("text:contains(textplaceholder)");
            tph.hide();
            var secondLine = e.sender.element.find("text:contains(Click)");
            $(secondLine).css({
                "font-size": "10px"
            });
        }
    });
</script>

Derek
Top achievements
Rank 1
 answered on 13 Jun 2019
1 answer
97 views

Having a simple issue with binding data to a dropdown.  Trying to follow from the demo code.  The code for RemoteDataSource_GetFirms never gets called.  Missing some basic concept I think.

Here is the controller:

public class ImpersonationController : Controller
    {
        public ActionResult Impersonation()
        {
            return View();
        }
            // GET: Impersonation
        public ActionResult RemoteDataSource()    //RemoteDataSource()
        {
            return View();
        }
        public JsonResult RemoteDataSource_GetFirms(string text)
        {
            var fo = new FirmObject();
            var firms = fo.GetFirms();
             
            if (!string.IsNullOrEmpty(text))
            {
                firms = firms.Where(p => p.SourceDataset.Contains(text));
            }
 
            return Json(firms, JsonRequestBehavior.AllowGet);
        }
    }

 

View:

@{
    Layout = null;
}
 
<!DOCTYPE html>
 
<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Impersonate</title>
</head>
<body>
    <div class="demo-section k-content">
        <h4>Select a Firm</h4>
        @(Html.Kendo().DropDownList()
              .Name("ddFirms")
              .DataTextField("SourceDataset")
              .DataValueField("FirmID")
              .DataSource(source =>
                      {
                  source.Read(read =>
                  {
                      read.Action("RemoteDataSource_GetFirms", "Impersonation");
                  });
              })
              .HtmlAttributes(new { style = "width: 100%" })
        )
    </div>
</body>
</html>

 

Robert
Top achievements
Rank 1
 answered on 12 Jun 2019
1 answer
132 views

Starting out with the tool, was looking at the tutorials.  Tried to use the ".Deferred" property on the grid as described in the tutorial, but and the records do not show when I use this features-as suggested.  Reviewing the Kendo examples, I don't really see the use of ".Differed."  Is this an outdated property. 

Georgi
Telerik team
 answered on 12 Jun 2019
7 answers
754 views
Hi,

The horizontal scrollbar in the grid goes missing when I filter a column which is not shown initially. Once the scrollbar is not shown anymore, there is no way for me to reset the filter.

Has this issue been raised by someone? When are you planning to fix this? Thanks.
Viktor Tachev
Telerik team
 answered on 11 Jun 2019
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?