Telerik Forums
UI for ASP.NET MVC Forum
1 answer
135 views
Hello,

We are putting together a proof-of-concept with KendoUI and ASP.NET MVC before purchasing. The specific issue I am running into is with embedding a multi-select picklist inside of a grid column. I have searched the forum and haven't found any examples of any controls embedded within another, and would greatly appreciate any examples or pointers that would speed up solving this issue.

Thanks for any responses
Petur Subev
Telerik team
 answered on 15 Mar 2013
1 answer
261 views
Hello,

We are putting together a proof-of-concept with KendoUI and ASP.NET MVC before purchasing. The specific issue I am running into is with embedding a multi-select picklist inside of a grid column. I have searched the forum and haven't found any examples of any controls embedded within another, and would greatly appreciate any examples or pointers that would speed up solving this issue.

Thanks for any responses
Georgi Krustev
Telerik team
 answered on 14 Mar 2013
3 answers
242 views
Hi,

I am new to kendo ui mvc. I have one issue. I want to customize the whole edit template in pop up.

Is it possible to open a whole cshtml view in grid edit popup? like we do to open user control (.ascx) in popup.

I want this because I want multi-column edit form with 6 or more data-bound drop-down boxes.
Vidhin
Top achievements
Rank 1
 answered on 14 Mar 2013
5 answers
321 views
Hi,
is it possible to authenticate a kendo ui for asp.net mvc app? i mean the same way we use [Authorize] for plain asp.net mvc 4.

Thanks in advance and i look forward to your kind responses
Atanas Korchev
Telerik team
 answered on 14 Mar 2013
3 answers
548 views
Hi,
I am new to Kendo and started working with the trial version. I have a scenario where in a Grid User should have the ability to drag value from one cell in grid to another cell and also drag one cell value from one grid to another. I have tried searching but cudn't finad any such demo. I have used this demo http://jsfiddle.net/JBeQn/ 
I tried changing the source but it is not working. Currently when i drag and drop in the grid in demo value of two columns are dragged i just need that only one value , say only value of text column should be dragged. 
I surely think I can get lots of input on this here.
Thanks
Alexander Valchev
Telerik team
 answered on 13 Mar 2013
2 answers
527 views
hi, I'm working around KendoUI Wrappers for ASP.NET MVC 4 .

Now, I'm having some problems with my Cascading DropdownList when I reload Parent data.

for example:
1. I have a dropdown list like this: Level 1 > Level 2 (Level 2 cascades from Level 1).
If i reload data from Level 1.
=> Level 2 will reload data from server too.
but:  if (Level 2 Old Values == Level 2 New Values) => Level 2 doesn't reset to default value anymore.

2. The second issue that:  When i have a Dropdown List with more than 3 levels.
Ex : Level 1 > Level 2 > Level 3 > Level 4>Level n.

I reload data from Level 1 
=> It resets Level 2 , Level 3 to default Values .
=> but it can't reset Level 4 and level n...

So, how can i resolve these problems :-s ...
and This is my code:
<div class="table-row">
    <div class="table-col-left">
        @(Html.Kendo().DropDownList()
            .Name("rims-addr-level1")
            .OptionLabel("-- Chọn ÐVHC Cấp 1 --")
            .DataTextField("TenDonViHanhChinh")
            .DataValueField("IdDonViHanhChinh")
            .BindTo(ViewBag.DVHCLevel1)
            .Value(obj_DefaultData.IdDVHCLevel1)
        )
    </div><!--END div.table-col-left -->
    <div class="table-col-right">
        <script type="text/javascript">
             
            function RimsAddrLevel1Item() {
                return {
                    IdDVHC: $("#rims-addr-level1").val()
                };
            }
        </script>
        @(Html.Kendo().DropDownList()
            .Name("rims-addr-level1-item")
            .OptionLabel("Select ...")
            .DataTextField("TenTinhThanh1")
            .DataValueField("IdTinhThanh")
            .DataSource(source => {
            source.Read(read =>
            {
                read.Action("FindAllTinhThanhByIdDVHC", "Base").Data("RimsAddrLevel1Item").Type(HttpVerbs.Post);
            })
            .ServerFiltering(true);
            })
            .Enable(false)
            .AutoBind(false)
            .CascadeFrom("rims-addr-level1")
            .Value(obj_DefaultData.IdL01TinhThanh)
        )
    </div><!--END div.table-col-right -->
</div>
<!--END div.table-row TinhThanh---------------------------------- -->
<div class="table-row">
    <div class="table-col-left">
        <script type="text/javascript">
            function RimsAddrLevel2() {
                return {
                    IdDVHC: $("#rims-addr-level1").val()
                };
            }
        </script>
        @(Html.Kendo().DropDownList()
            .Name("rims-addr-level2")
            .OptionLabel("-- Chọn ÐVHC Cấp 2 --")
            .DataTextField("TenDonViHanhChinh")
            .DataValueField("IdDonViHanhChinh")
            .DataSource(source => {
            source.Read(read =>
            {
                read.Action("FindAllChildDVHCByIdDvhc", "Base").Data("RimsAddrLevel2").Type(HttpVerbs.Post);
            })
            .ServerFiltering(true);
            })
            .Enable(false)
            .AutoBind(false)
            .CascadeFrom("rims-addr-level1-item")
            .Value(obj_DefaultData.IdDVHCLevel2)
        )
    </div>
    <!--END div.table-col-left -->
    <div class="table-col-right">
        <script type="text/javascript">
            function RimsAddrLevel2Item() {
                return {
                    IdDVHC: $("#rims-addr-level2").val(),
                    IdTinhThanh: $("#rims-addr-level1-item").val()
                };
            }
        </script>
        @(Html.Kendo().DropDownList()
            .Name("rims-addr-level2-item")
            .OptionLabel("Select ...")
            .DataTextField("TenQuanHuyen1")
            .DataValueField("IdQuanHuyen")
            .DataSource(source => {
                source.Read(read =>
                {
                    read.Action("FindAllQuanByIDTinhThanh", "Base").Data("RimsAddrLevel2Item").Type(HttpVerbs.Post);
                })
            .ServerFiltering(true);
            })
            .Enable(false)
            .AutoBind(false)
            .CascadeFrom("rims-addr-level2")
            .Value(obj_DefaultData.IdL02QuanHuyen)
        )
    </div>
    <!--END div.table-col-right -->
</div>
<!--END div.table-row QuanHuyen---------------------------------- -->
<div class="table-row">
    <div class="table-col-left">
        <script type="text/javascript">
            function RimsAddrLevel3() {
                return {
                    IdDVHC: $("#rims-addr-level2").val()
                };
            }
        </script>
        @(Html.Kendo().DropDownList()
            .Name("rims-addr-level3")
            .OptionLabel("-- Ch?n ÐVHC C?p 3 --")
            .DataTextField("TenDonViHanhChinh")
            .DataValueField("IdDonViHanhChinh")
            .DataSource(source => {
                source.Read(read =>
                {
                    read.Action("FindAllChildDVHCByIdDvhc", "Base").Data("RimsAddrLevel3").Type(HttpVerbs.Post);
                })
                .ServerFiltering(true);
            })
            .Enable(false)
            .AutoBind(false)
            .CascadeFrom("rims-addr-level2-item")
            .Value(obj_DefaultData.IdDVHCLevel3)
        )
    </div>
    <!--END div.table-col-left -->
    <div class="table-col-right">
        <script type="text/javascript">
            function RimsAddrLevel3Item() {
                return {
                    IdDVHC: $("#rims-addr-level3").val(),
                    IdQuan: $("#rims-addr-level2-item").val()
                };
            }
        </script>
        @(Html.Kendo().DropDownList()
            .Name("rims-addr-level3-item")
            .OptionLabel("Select ...")
            .DataTextField("TenPhuongXa1")
            .DataValueField("IdPhuongXa")
            .DataSource(source => {
                source.Read(read =>
                {
                    read.Action("FindAllPhuongXaByIDQuan", "Base").Data("RimsAddrLevel3Item").Type(HttpVerbs.Post);
                })
            .ServerFiltering(true);
            })
            .Enable(false)
            .AutoBind(false)
            .CascadeFrom("rims-addr-level3")
            .Value(obj_DefaultData.IdL03PhuongXa)
        )
    </div>
    <!--END div.table-col-right -->
</div>
<!--END div.table-row PhuongXa---------------------------------- -->
<div class="table-row">
    <div class="table-col-left">
        <script type="text/javascript">
            function RimsAddrLevel4() {
                return {
                    IdDVHC: $("#rims-addr-level3").val()
                };
            }
        </script>
        @(Html.Kendo().DropDownList()
            .Name("rims-addr-level4")
            .OptionLabel("-- Ch?n ÐVHC C?p 4 --")
            .DataTextField("TenDonViHanhChinh")
            .DataValueField("IdDonViHanhChinh")
            .DataSource(source => {
                source.Read(read =>
                {
                    read.Action("FindAllChildDVHCByIdDvhc", "Base").Data("RimsAddrLevel4").Type(HttpVerbs.Post);
                })
                .ServerFiltering(true);
            })
            .Enable(false)
            .AutoBind(false)
            .CascadeFrom("rims-addr-level3-item")
            .Value(obj_DefaultData.IdDVHCLevel4)
        )
    </div>
    <!--END div.table-col-left -->
    <div class="table-col-right">
        <script type="text/javascript">
            function RimsAddrLevel4Item() {
                return {
                    IdDVHC: $("#rims-addr-level4").val(),
                    IdPhuongXa: $("#rims-addr-level3-item").val()
                };
            }
        </script>
        @(Html.Kendo().DropDownList()
            .Name("rims-addr-level4-item")
            .OptionLabel("Select ...")
            .DataTextField("TenDuongKhu1")
            .DataValueField("IdDuongKhu")
            .DataSource(source => {
                source.Read(read =>
                {
                    read.Action("FindAllDuongKhuByIdPhuongXa", "Base").Data("RimsAddrLevel4Item").Type(HttpVerbs.Post);
                })
            .ServerFiltering(true);
            })
            .Enable(false)
            .AutoBind(false)
            .CascadeFrom("rims-addr-level4")
            .Value(obj_DefaultData.IdL04DuongKhu)
        )
    </div>
    <!--END div.table-col-right -->
</div>
<!--END div.table-row DuongKhu---------------------------------- -->

Georgi Krustev
Telerik team
 answered on 13 Mar 2013
4 answers
325 views
The detail records that are found and returned by the function HierarchyBinding_RegulatoryReference are not being shown. I have verified that the StudyID is being correctly sent in and that the LINQ returns records but they are not shown. It shows that there are 0 detail records.

Here is the view:

    @(Html.Kendo().Grid<StudyViewModel>()
        .Name("StudyGrid")
        .Columns(columns =>
            {
                columns.Bound(item => item.StudyID);
                columns.Bound(item => item.StudyName);
                columns.Bound(item => item.StudyDirectorName);
                columns.ForeignKey(p => p.NatureOfStudy, (IEnumerable<LRRI.QAM.ViewModels.NatureOfStudyWithIDViewModel>)ViewData["NatureOfStudyList"], "NatureOfStudyID", "NatureOfStudy");
                columns.ForeignKey(p => p.Status, (IEnumerable<LRRI.QAM.ViewModels.StudyStatusWithIDViewModel>)ViewData["StudyStatusList"], "StudyStatusID", "StudyStatus");
                columns.ForeignKey(p => p.Active, (IEnumerable)ViewData["ActiveList"], "ActiveID", "Active"); 
            })
            .ClientDetailTemplateId("studyRegulatoryReferenceTemplate")
            .DataSource(ds => ds
                .Ajax()
                .Model(model =>
                {
                    model.Id(m => m.StudyID);
                })
                .Sort(sort =>
                {
                    // Sort by Name in descending order
                    sort.Add(m => m.StudyName).Ascending();
                })
                .Read(read => read.Action("StudyDataSource", "Study"))
            )
        .Pageable()
        .Sortable()
        .Filterable()
          )
    <script id="studyRegulatoryReferenceTemplate" type="text/kendo-tmpl">
        @(Html.Kendo().Grid<LRRI.QAM.Models.StudyRegulatoryReference>()
                .Name("RegRef_#=StudyID#")
                .Columns(columns =>
                {
                    columns.Bound(o => o.RegulatoryReferenceID);
                    columns.Bound(o => o.RegulatoryReference);
                })
                .DataSource(dataSource => dataSource
                    .Ajax()
                    .Read(read => read.Action("HierarchyBinding_RegulatoryReference", "Study", new { studyID = "#=StudyID#" }))
                )
                .Sortable()
                .ToClientTemplate()
        )  
    </script>

Here is the controller:

        public ActionResult StudyDataSource([DataSourceRequest] DataSourceRequest request)
        {

            var listValues = (from l in _context.Studies
                              orderby l.StudyName
                              select new QAM.ViewModels.StudyViewModel()
                              {
                                  StudyID = l.StudyID,
                                  StudyName = l.StudyName,
                                  ProtocolNumber = l.Protocol.ProtocolNumber,
                                  StudyDirectorFirst = l.StudyDirectorFirst,
                                  StudyDirectorLast= l.StudyDirectorLast,
                                  StudyDirectorName = l.StudyDirectorFirst + " " + l.StudyDirectorLast,
                                  NatureOfStudy = l.NatureOfStudy,
                                  RouteOfAdmin = l.RouteOfAdmin,
                                  Status = l.Status,
                                  StudyType = l.StudyType,
                                  GLP = (((Boolean?)l.GLP ?? false) ? 1 : 0),
                                  Active = (((Boolean?)l.Active ?? false) ? 1 : 0)
                              });
            return Json(listValues.ToDataSourceResult(request), JsonRequestBehavior.AllowGet);
        }
        public ActionResult HierarchyBinding_RegulatoryReference(int studyID, [DataSourceRequest] DataSourceRequest request)
        {
            var listValues =
                _context.StudyRegulatoryReferences.Where(l => (l.StudyID == studyID))
                        .OrderBy(l => l.RegulatoryReference);
            return Json(listValues.ToDataSourceResult(request));
        }

Adam
Top achievements
Rank 1
 answered on 13 Mar 2013
2 answers
276 views
I have this line of code
.ClientRowTemplate("#=kendo.toString(DtSundayOpenTime, \"hhmm\")#")
However I keep getting an invalid Template error. How can I format this to display only the time (12 or 24hr). Thanks
Dimiter Madjarov
Telerik team
 answered on 13 Mar 2013
1 answer
316 views

Hi here,

I'm building a web application with ASP.NET MVC4 and everything runs quite well so far. No I wanted to integrate Kendo UI to my _Layout.cshtml file in order to use some widgets. So I followed these steps (here) to include the neccessary scripts and styles, but when I run the project, it throws a JavaScript exception:

Unbehandelte Ausnahme in Zeile 17, Spalte 14133 in http://localhost:54430/Scripts/KendoUI/js/kendo.all.min.js
0x800a138f - Laufzeitfehler in JavaScript: Die Eigenschaft "msie" eines undefinierten oder Nullverweises kann nicht abgerufen werden.

When I comment out the reference to kendo.all.min.js everything works flawlessly. What can I do? I'm having a hard time telling my Boss that it actually was a good idea to spend more than thousand bucks on a bunch of tools that do not work. Please help me wih that!

Regards,
Rob

Here's my code:

(PS: I also tried adding a reference to kendo.aspnetmvc.min.js (one time before Kendo.all.min.js, another time behind it), but it didn't help.)

<!DOCTYPE html>
<html lang="de">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
 
    <title>@ViewBag.Title - © 2012 PINTSCH ABEN B.V.</title>
 
    <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
 
    @Styles.Render("~/Content/css")
    @Styles.Render("~/Content/themes/base/css")
    <link href="/Scripts/KendoUI/styles/kendo.common.min.css" type="text/css" rel="stylesheet" />
    <link href="/Scripts/KendoUI/styles/kendo.default.min.css" type="text/css" rel="stylesheet" />
    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/modernizr")
</head>
<body>
    <header>
        <div class="content-wrapper">
            <div class="float-left">
                <section id="logins">
                    @Html.Partial("_LoginPartial")
                </section>
                <nav>
                    <ul id="menu">
                        <li>@Html.ActionLink("Startseite", "Index", "Home")</li>
                        <li>@Html.ActionLink("Info", "About", "Home")</li>
                        <li>@Html.ActionLink("Kontakt", "Contact", "Home")</li>
                    </ul>
                </nav>
            </div>
 
            <div class="float-right">
                <img src="~/Images/logo.jpg" />
                @*<p class="site-title">@Html.ActionLink("Ihr Logo hier einfügen", "Index", "Home")</p>*@
            </div>
 
        </div>
    </header>
    <div id="body">
 
        @RenderSection("featured", required: false)
        <section class="content-wrapper main-content clear-fix">
            @RenderBody()
        </section>
    </div>
    <footer>
        <div class="content-wrapper">
            <div class="float-left">
                <p>© @DateTime.Now.Year - PINTSCH ABEN WH-SYSTEMS</p>
            </div>
        </div>
    </footer>
    <script src="~/Scripts/KendoUI/js/kendo.all.min.js"></script>
    @RenderSection("scripts", required: false)
</body>
</html>
Dimo
Telerik team
 answered on 13 Mar 2013
1 answer
127 views
Error 5 'System.Web.Mvc.HtmlHelper<System.Collections.Generic.List<SOH.Common.Model.Patient>>' does not contain a definition for 'Kendo' and no extension method 'Kendo' accepting a first argument of type 'System.Web.Mvc.HtmlHelper<System.Collections.Generic.List<SOH.Common.Model.Patient>>' could be found (are you missing a using directive or an assembly reference?) c:\VSProjects\SOH.Orthodontics\SOH.Orthodontics.Web.UI\Views\Patient\PatientResult.cshtml 5 8 SOH.Orthodontics.Web.UI

Really struggling with this error.  Please help!  Html.Kendo() in the razor view just is not recognised!  Argh!!

Added a reference to the dll and also added namespace to BOTH web.config files.  Sections below from both files.

  <system.web.webPages.razor>
    <host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    <pages pageBaseType="System.Web.Mvc.WebViewPage">
      <namespaces>
        <add namespace="System.Web.Mvc" />
        <add namespace="System.Web.Mvc.Ajax" />
        <add namespace="System.Web.Mvc.Html" />
        <add namespace="System.Web.Routing" />
        <add namespace="Kendo.Mvc.UI" />
      </namespaces>
    </pages>
  </system.web.webPages.razor>


    <pages>
      <namespaces>
        <add namespace="System.Web.Helpers" />
        <add namespace="System.Web.Mvc" />
        <add namespace="System.Web.Mvc.Ajax" />
        <add namespace="System.Web.Mvc.Html" />
        <add namespace="System.Web.Routing" />
        <add namespace="System.Web.WebPages" />
        <add namespace="Kendo.Mvc.UI" />
      </namespaces>
    </pages>
Andrew Currie
Top achievements
Rank 1
 answered on 13 Mar 2013
Narrow your results
Selected tags
Tags
Grid
General Discussions
Scheduler
DropDownList
Chart
Editor
TreeView
DatePicker
ComboBox
Upload
MultiSelect
ListView
Window
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
Dialog
MultiColumnComboBox
DropDownTree
Checkbox
Slider
Switch
Notification
Accessibility
ListView (Mobile)
Pager
ColorPicker
DateRangePicker
Security
Wizard
Styling
Chat
DateInput
MediaPlayer
TileLayout
Drawer
SplitView
Template
Barcode
ButtonGroup (Mobile)
Drawer (Mobile)
ImageEditor
RadioGroup
Sparkline
Stepper
TabStrip (Mobile)
GridLayout
Badge
LinearGauge
ModalView
ResponsivePanel
TextArea
Breadcrumb
ExpansionPanel
Licensing
Rating
ScrollView
ButtonGroup
CheckBoxGroup
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
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?