Telerik Forums
UI for ASP.NET MVC Forum
1 answer
114 views
It appears that the DEMO version for MVC, only has binary's for MVC 3.

Does the full production version ship with MVC 4 support?

I get this error:

Could not load file or assembly 'System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

My Project is MVC 4.
Atanas Korchev
Telerik team
 answered on 15 Mar 2013
2 answers
433 views
Hi,
I'm trying to use custom validation and figured out that it works not in the same way as standard one.

When I use required validation the value is validated and it is impossible to change active cell.
In case of custom validation it is possible to change current active cell. And the validation message become hidden.

For me it is important to have custom validation with the same behavior as required.

I've added example http://jsfiddle.net/ax37h/4/.
I've added required validation for the first field and add 'specialDate' validation. So both validate but the way of validation is different.

I use HtmlHelper for kendo grid creation, so I need to add validation after initialization.

Validator as below:
$('#grid').kendoValidator({
    rules: {
        specialDate: function (input) {
                    input.attr("data-specialDate-msg", "The date should be 2013-01-02");
                    return input.val() == '2013-01-02';
                }
            },
        messages: {specialDate: "The date should be 2013-01-02"}
});

Thank you.
Joakim Karlsson
Top achievements
Rank 1
 answered on 15 Mar 2013
1 answer
143 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
269 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
256 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
327 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
562 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
542 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
338 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
293 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
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
Security
ColorPicker
DateRangePicker
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
LLM Kit
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?