Telerik Forums
UI for ASP.NET MVC Forum
10 answers
1.1K+ views
I'm having an issue with the ForeignKey drop down not showing the selected value when I pick the first one in the list.

To reproduce, go to the Foreign Key Column example(http://demos.kendoui.com/web/grid/foreignkeycolumn.html), add a new row, put a value in for the product name, select "Beverages" for the category, then click on the Unit Price cell.  Observe that the category cell now is blank instead of showing the selected "Beverages" value.

Any help would be much appreciated.
Thanks,
--Evan
Viktor Tachev
Telerik team
 answered on 24 Jun 2019
2 answers
219 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
924 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
270 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.2K+ 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
758 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
679 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
280 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
104 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
146 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
Narrow your results
Selected tags
Tags
Grid
General Discussions
Scheduler
DropDownList
Chart
Editor
TreeView
DatePicker
Upload
ComboBox
MultiSelect
Window
ListView
TabStrip
Menu
Installer and VS Extensions
Spreadsheet
AutoComplete
TreeList
Gantt
PanelBar
NumericTextBox
Filter
ToolTip
Map
Diagram
Button
PivotGrid
Form
ListBox
Splitter
Application
FileManager
Sortable
Calendar
View
MaskedTextBox
PDFViewer
TextBox
Toolbar
MultiColumnComboBox
Dialog
DropDownTree
Checkbox
Slider
Switch
Notification
ListView (Mobile)
Pager
Accessibility
ColorPicker
DateRangePicker
Wizard
Security
Styling
Chat
MediaPlayer
TileLayout
DateInput
Drawer
SplitView
Barcode
ButtonGroup (Mobile)
Drawer (Mobile)
ImageEditor
RadioGroup
Sparkline
Stepper
TabStrip (Mobile)
GridLayout
Template
Badge
LinearGauge
ModalView
ResponsivePanel
TextArea
Breadcrumb
ExpansionPanel
Rating
ScrollView
ButtonGroup
CheckBoxGroup
Licensing
NavBar
ProgressBar
QRCode
RadioButton
Scroller
Timeline
TreeMap
TaskBoard
OrgChart
Captcha
ActionSheet
Signature
DateTimePicker
AppBar
BottomNavigation
Card
FloatingActionButton
Localization
MultiViewCalendar
PopOver (Mobile)
Ripple
ScrollView (Mobile)
Switch (Mobile)
PivotGridV2
FlatColorPicker
ColorPalette
DropDownButton
AIPrompt
PropertyGrid
ActionSheet (Mobile)
BulletGraph
Button (Mobile)
Collapsible
Loader
CircularGauge
SkeletonContainer
Popover
HeatMap
Avatar
ColorGradient
CircularProgressBar
SplitButton
StackLayout
TimeDurationPicker
Chip
ChipList
DockManager
ToggleButton
Sankey
OTPInput
ChartWizard
SpeechToTextButton
InlineAIPrompt
TimePicker
StockChart
RadialGauge
ContextMenu
ArcGauge
AICodingAssistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?