Telerik Forums
UI for ASP.NET MVC Forum
2 answers
201 views
I have a weird problem that I will try to explain with the attached images.  I have hierarchy grid that works perfectly when I expand to the first sub-grid.  The problem happens when I expand a latter row in the main grid.  The result is the first expanded sub-grid gets the values of the newly expanded sub-grid (which is empty).  The attached pictures show the before and after.  I included a third image which shows that if you expand a row that is above the first expanded row then it works fine.

Here is the stripped down code.  Any help will be greatly appreciated!

BTW, the code formatter would not accept my Razor code with Javascript (using Chrome).  It got confused.  I hope this turns out okay when I hit "Post"...

@using Kendo.Mvc.UI
@model PatientToolsAdminDesk.Models.AdminPractitionerForm
@{
    ViewBag.Title = "Order History";
}

<div class="container">
    <div class="row">
        <div class="col-md-12">
            <div class="panel panel-primary" id="practitioner-panel">
                @Html.HiddenFor(a => a.did)
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-12">
            <div class="panel-body">
            @(Html.Kendo().Grid<PatientToolsAdminDesk.Models.PractitionerOrderHistory>()
                    .Name("order-history-grid")
                    .Columns(columns =>
                        {
                            columns.Bound(e => e.OrderID).Width(85);
                            columns.Bound(e => e.Status).Width(275);
                            columns.Bound(e => e.OrderType).Width(300);
                            columns.Bound(e => e.OrdererName).Width(150);
                            columns.Bound(e => e.Address);
                        })
                    .DataSource(dataSource => dataSource
                        .Ajax()
                        .Read(read => read.Action("HierarchyBinding_Orders", "Admin").Data("additionalData"))
                    )
                    .Sortable()
                    .Pageable()
                    .Scrollable()
                    .HtmlAttributes(new { style = "height:500px;" })
                    .ClientDetailTemplateId("orderdetailtemplate")
                )
            </div>
        </div>
    </div>
</div>

<script id="orderdetailtemplate" type="text/kendo-tmpl">
            @(Html.Kendo().Grid<PatientToolsAdminDesk.Models.PractitionerOrderItems>()
                .Name("order-item-grid")
                .Columns(columns =>
                {
                    columns.Bound(o => o.Quantity).Width(75);
                    columns.Bound(o => o.CreationDateShort).Width(100).Title("Date");
                    columns.Bound(o => o.Name).Width(250);
                    columns.Bound(o => o.GenericName).Width(250);
                    columns.Bound(o => o.Active).Width(50);
                })
                .DataSource(dataSource => dataSource
                    .Ajax()
                    .Read(read => read.Action("HierarchyBinding_OrderItems", "Admin", new { orderID = "#=OrderID#" }))
                )
                .Pageable()
                .Sortable()
                .ToClientTemplate())
</script>

<script>

    $(document).ready(function () {
        $("#searchnew").text("DID: " + $("#did").val());
        $("#searchnew").bind("click", function () {
            $("#searchwindow").data("kendoWindow").center().open();
        });
    });

    function SearchPractitioner(arg) {

        var did = $("#search_did").val();
        var orderid = $("#search_orderid").val();
        if (!((did == "") && (orderid == ""))) {
            var grid = $("#items-grid").getKendoGrid();
            grid.dataSource.data([]);

            $.ajax({
                type: 'GET',
                dataType: "json",
                url: '/admin/GetPractitioner',
                data: { 'did': did, 'orderid': orderid },
                success: onSearchPractitioner
            });
        } else {
            $("#did").val("");
            $("#orderid").val("");

            $("#searchnew").text("DID: " + 'unknown');

            var grid = $("#items-grid").getKendoGrid();
            grid.dataSource.read();

            var grid = $("#order-history-grid").getKendoGrid();
            grid.dataSource.read();
        }
    }

    function onSearchPractitioner(arg) {

        $("#searchwindow").data("kendoWindow").close();

        $("#did").val(arg.did);
        $("#orderid").val(arg.orderid);
        $("#firstname").html(arg.firstname);
        $("#lastname").html(arg.lastname);
        $("#degree").html(arg.degree);

        $("#searchnew").text("DID: " + arg.did);

        var grid = $("#items-grid").getKendoGrid();
        grid.dataSource.read();

        var grid = $("#order-history-grid").getKendoGrid();
        grid.dataSource.read();
    }

    function additionalData() {
        return {
            did: $("#did").val(),
        };
    }
</script>
Nikolay Rusev
Telerik team
 answered on 14 Aug 2014
1 answer
232 views
So this is my first run at using the scheduler.  Got it up and got it populated using the MVC 5 wrapper.  However, when I go to "cancel" out of the details popup -- the event on the calendar disappears.  Any ideas how to prevent this?  Thanks!!
Alexander Popov
Telerik team
 answered on 14 Aug 2014
1 answer
607 views
Hello. We're having an issue with our datepickers, where only Sunday and Monday of the week are visible. I've attached a screenshot of the issue, and you can see how no other days of the week are visible. This persists whether you move to another month or not.

This issue is affecting all of our datepickers. We have several that are used in Grid Column Filters for date types (which generate automatically), as well as others that we have placed manually. Here is an example piece of our code declaring a datepicker:

<input kendo-date-picker id="statFromDate" ng-model="fromDate"/>

We don't have any CSS styles that i can see that affect the datepickers, their containers, or make changes to the k-calendar class.

Is there some sort of configuration option that we might have set up correctly? 

Thank you for your help!
Kiril Nikolov
Telerik team
 answered on 14 Aug 2014
0 answers
131 views
Hi,

I have a grid which is bound to a list of viewmodels. When creating a record I want to upload an image as well. Following is my VM.

public class ClientModel : IClientModel
    {
        [ScaffoldColumn(false)]
        public int ClientID { get; set; }
 
        [Required]
        [DisplayName("Client Name")]
        public string Name { get; set; }
 
        [UIHint("_ClientHeaderImage")]
        public string HeaderImage { get; set; }
                 
        public bool IsActive { get; set; }
 
        private string _status;
                 
        public string Status
        {
            get
            {
                _status = IsActive ? "Enabled" : "Disabled";
                return _status;
            }
            set { _status = value; }
        }
 
    }

For the HeaderImage  property I need an upload control. So I have defined an editor template for it.

@(Html.Kendo().Upload()
    .Name("HeaderImage")
)

When I go in to Create record the upload control displays fine. The problem is

1. How can I grab the uploaded files from the Action Method?
2. How to restrict the files to .png and jpg for Kendo().Upload()


Thanks!!
Chuong
Top achievements
Rank 1
 asked on 14 Aug 2014
1 answer
190 views
Hi,

I'm using a treeview with the checkbox to allow the user the choices of the sections to put in a report.  The problem is that if the user check of the child all the parents should also be included. So what I need is a way to check all the parentfor the user when he select a child and unckeck all childs when a parent un uncheck. Any idea on how I can achieve this?
Daniel
Telerik team
 answered on 13 Aug 2014
3 answers
251 views
does the treeview findByText method support wildcards?
For example:
searchText = "Qrtly0422"
item = treeview.findByText(searchText)
dataItem = treeview.dataItem(item)
nodeText = dataItem.text

I can find the exact node, no problem, but if I try searchText = "422" it fails to find a result but doesn't throw any errors

I noticed the datasource filter can take an operator ie:  treeview.dataSource.filter({ field: "text", operator: "contains", value: nodeText })

so I tried to pass that structure to the findByText method but item will equal 0 and then the rest of the code fails with null errors.
item = treeview.findByText({ field: "text", operator: "contains", value: searchText })

Thanks.
Alexander Popov
Telerik team
 answered on 13 Aug 2014
3 answers
344 views
Hi,

How can I change shadow background area to specific DIV while displaying modal kendo window?

Thank you.

Shabtai
Dimo
Telerik team
 answered on 13 Aug 2014
3 answers
201 views
What "using" directive must  required to use Mousedoubleclick
on a RadPivotGrid? 

I keep getting the following error:
Error 17 The type or namespace name 'MouseEventArgs' could not be found (are you missing a using directive or an assembly reference?) \\jt3netapp1-2\users\Keith.Love\Visual Studio 2010\Projects\Telerik_WebApplication1\Telerik_WebApplication1\BigSheet2014Telerik.aspx.cs 748 68 Telerik_WebApplication1

and I have the following directives in my code:
using System;
using System.Globalization;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using Telerik.Web.UI;
using Telerik.Web.UI.PivotGrid;
using System.Text;
Angel Petrov
Telerik team
 answered on 13 Aug 2014
5 answers
205 views
Just installed Q2. Tried to upgrade a site. Get this error "Please go back and select at least one project in order to continue the upgrade."

Worked fine before. MVC 5.2
Starting to getting tired on all upgrade errors with new releases.
Momchil
Telerik team
 answered on 12 Aug 2014
3 answers
227 views
I am interested in the functionality of the Gantt control, but I don't want to display the timeline view. I only want the treelist view.

Is there a way to hide the timeline view? I know there are a bunch of view options (day, week, month, etc), but I don't see one for "none", so I don't know if this is possible or not.

If not, is that because there is a different control that offers the same functionality that I should be using?

Thanks!
Jason

Bozhidar
Telerik team
 answered on 12 Aug 2014
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
MultiColumnComboBox
Dialog
DropDownTree
Checkbox
Slider
Switch
Notification
Accessibility
ListView (Mobile)
Pager
ColorPicker
DateRangePicker
Wizard
Security
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
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?