Telerik Forums
UI for ASP.NET MVC Forum
3 answers
153 views

I'm developing a UI where the user can select from n stored procedures and view a chart for the resulting data. I need to develop a way to allow the user to configure a chart (for now I'm starting simple, bar/column/line chart only). I saw a prior post that said to look into scaffolding. I did, but still can't figure an intuitive way for the user to select the various axis and series. I'm hoping someone can point me to a working demo that allows the user to configure their chart elements.

Thanks in advance!

Steve.

Vessy
Telerik team
 answered on 30 Dec 2016
1 answer
191 views
Outer Grid:
@(Html.Kendo().Grid(Model)
                .Name("assetTypeGrid")
                .Columns(columns =>
                {
                    columns.Bound(a => a.Type).ClientTemplate(@"<img src='/Content/Images/Pins/#:data.Type#' style='height: 32px; weight: 32px;' />").Width(100);
                    columns.Bound(a => a.Description).Title("Name").Width(200);
                    columns.Bound(a => a.Tabs).Title("Available Tab(s)").Width(200);
                    columns.Bound(a => a.AssetTypeId).Title("").Filterable(false).Sortable(false)
                        .ClientTemplate(createLink).Width(100);
                })
                .Sortable()
                .Pageable(pageable => pageable
                .ButtonCount(5))
                .Filterable(ftb => ftb.Mode(GridFilterMode.Row))
                .ClientDetailTemplateId("template")
                .DataSource(dataSource => dataSource
                .Ajax()
                .PageSize(20)
                .ServerOperation(false))
                )
Inner Grid:
<script id="template" type="text/kendo-tmpl">
       @(Html.Kendo().Grid<CIMSDashboard.ViewModels.AssetTemplateViewModel>()
       .Name("grid_#=Name#")
       .Columns(columns =>
       {
           columns.Bound(o => o.Types).Width(110);
           columns.Bound(o => o.Name).Width(110);
           columns.Bound(o => o.Description).Width(110);
       })
 
       .DataSource(dataSource => dataSource
           .Ajax()
           .PageSize(10)
           .Read(read => read.Action("GetAssetTemplates", "AccessRetriever", new { templateName = "Pipe" }))
        )
        .Pageable()
        .Sortable()
        .ToClientTemplate()
       )
   </script>
Script:
<script type="text/javascript">
        $(document).ready(function () {
 
            function dataBound() {
                this.expandRow(this.tbody.find("tr.k-master-row").first());
            }
 
        });
 
    </script>
Read Function:
public static List<AssetTemplateViewModel> GetAssetTemplates(string templateName)
        {
            using (MiniProfiler.Current.Step("Getting Asset template Details"))
            {
                var result = new List<AssetTemplateViewModel>();
                using (var context = ProfiledContext())
                {
                    var query = from ta in context.tblTemplate_Assets
                            join at in context.tblAssetTypes on ta.AssetType equals at.Name
                            join atl in context.tblLink_AssetTypeToTemplate_Assets on ta.keyTempAssetID equals atl.fk_Template_AssetID
                            where atl.fk_AssetType == templateName
                                select new AssetTemplateViewModel()
                                {
                                    Types = at.Logo,
                                    Name = ta.Name,
                                    Description = ta.Description
                                };
 
                    if (query.Any())
                    {
                        foreach (var q in query)
                        {
                            result.Add(q);
                        }
                    }
                }
 
                return result;
            }
        }

 

The above read function is not being called.. am I missing something?? the layout of inner grid is coming perfectly, its all about data is not being displayed.. it is not reaching my break point in AccessRetriver at all...   I've attached pictures of my output.. pls help me. Thank you in advance.

Viktor Tachev
Telerik team
 answered on 30 Dec 2016
2 answers
339 views

The recent update might have changed the behavior of the Grid Filter and their seems a slight bug in hovering of the Kendo Grid Filter TextBox with the Chrome.

 

Our Kendo Grid Deployed with MVC helpers throughout applications is now facing a slight bug in Chrome when we try to filter the grid column, the filter hides immediately as soon as we hover over to Textbox of Filter when default operator is not changed. If the operator is changed than the popup of the filer stays without any problem. The user has to use the Tab key enter the info in to the TextBox.

 

This Problem is not happening in Firefox but only Chrome.

 

The KendoMVC.dll version is 2016.3.914.545

Chrome version is Version 55.0.2883.87 m (64-bit)

 

Any Solution to this problem will be greatly appreciated.

 

Dev
Top achievements
Rank 1
 answered on 29 Dec 2016
1 answer
609 views

Hi all.

What is the easiest way to create a dojo from a MVC5 page, using the MVC wrappers?

The Telerik support asked for it to reproduce my scenario. I tried but failed at it and created a stripped down copy of my solution to give the support team a working example.

Thanks for any good ideas

Bernd

Konstantin Dikov
Telerik team
 answered on 28 Dec 2016
1 answer
191 views

Hi,

Does the ASP.NET MVC scheduler support paging in Agenda View? I want to show no more than 10 events per page. How to implement it?

Thanks.

CK

Ivan Zhekov
Telerik team
 answered on 26 Dec 2016
2 answers
83 views

I have created a few HtmlHelper extension methods that we use is different projects at my company, but they've usually been single level type of method calls, with a variable list of parameters.  But how does Kendo create the HTML Helpers such as those found in the Telerik MVC collection, with nested method calls?

For example, I've easily create a razor helper that parses a session variable for Claim data, and return the appropriate claim value based on the type.  Such as 

@{
    ViewBag.Title = "Vensure.Dashboard.App";
 
    string FullName = Html.GetClaimValue("fullname");
    bool isAdmin = Html.GetClaimValue("app-roles").Contains("admin");
}

 

But the Kendo components typically have multiple methods extending the initial method.  Such as:

@(Html.Kendo().DropDownList()
        .Name("availableClients")
        .DataTextField("ClientName")
        .DataValueField("ClientId")
        .DataSource(ds => ds.Read("GetClientList", "Mapping"))
        .Template("<span class=\"k-state-default\">#: data.ClientId # - #: data.ClientName #</span>")
        .ValueTemplate("<span class=\"selected-value\">#:data.ClientId# - #:data.ClientName#</span>")
        .HtmlAttributes(new { style = "width: 100%" })
        .Events(e => e.Change("clientChange"))
        .OptionLabel(" -- Select Client --")
        .Height(400)
    )

 

I'm just curious as to what the HtmlHelper extension code looks like to support the .Method().OtherMethod().YetAnotherMethod() nested syntax...

Kiril Nikolov
Telerik team
 answered on 26 Dec 2016
13 answers
835 views

Using this as a template: http://docs.telerik.com/kendo-ui/controls/data-management/grid/how-to/Editing/add-row-when-tabbed-out-of-last-row

I have made it so I can tab into the next row. But I noticed that it will always select the first required column based on data annotation, instead of the first column. Is this by design, or is there a way to set it to so that it goes to the first column always?

Marin
Telerik team
 answered on 23 Dec 2016
12 answers
617 views

I have a grid with a pop-up edit form, with a cascading dropdown list. It works fine except that when choosing to add a new record, the form opens and the dropdown list shows the validation error message before the user has done anything.

 

I've attached a screenshot. The definition of the dropdown lists is:-

  <p>
        <span class="fieldlabel">
            System:
        </span>
        @(Html.Kendo().DropDownListFor(m => m.system)
.Name("system")
.OptionLabel("Select a system")
.DataValueField("Code")
.DataTextField("Description")
.DataSource(src => src.Read(rd => rd.Action("GetSystems", "Home")))
 
        )
 
        @Html.ValidationMessageFor(model => model.system)
 
</p>
 
    <p>
        <span class="fieldlabel">
            Priority:
        </span>
        @(Html.Kendo().DropDownListFor(m => m.Priority)
.Name("Priority")
.OptionLabel("Select a priority")
.DataValueField("Code")
.DataTextField("Description")
.DataSource(src => src.Read(rd => rd.Action("GetPriorities", "Home")))
 
        )
 
        @Html.ValidationMessageFor(model => model.Priority)
 
    </p>
 
 
    <p>
        <span class="fieldlabel">
            Sub Category:
        </span>
        @(Html.Kendo().DropDownListFor(m => m.SubCategoryCode)
.Name("SubCategoryCode")
.OptionLabel("Select a sub category")
.DataValueField("Code")
.DataTextField("Description")
.DataSource(src => src.Read(rd => rd.Action("GetSubCategoriesbySystem", "Home").Data("filterSystems")).ServerFiltering(true))
 .Enable(false)
.AutoBind(false)
.CascadeFrom("system")
 
        )
 
        @Html.ValidationMessageFor(model => model.SubCategoryCode)
 
    </p>

How can I stop this?

 

Thanks

Ivan Danchev
Telerik team
 answered on 23 Dec 2016
1 answer
215 views
Whenever we right click on kendo spreadsheet, context menu with following options cut, copy, paste and merge appear. I want  to add more options like disable in this context menu. Please let me know how is it possible right now. I did not find any example for achieving this.
Dimitar
Telerik team
 answered on 23 Dec 2016
6 answers
559 views
Hi Guys,

I have added  toolbar.Create() and toolbar.custom() button on grid and redirected to open popup window from custom button,then  it opens popup window for 1 second and gives the error as attached. My code is below.

 .DataSource(dataSource => dataSource
            .Read(read => read.Action("_ServiceRegimeSequenceList", "ServiceRegimeSequenceList"))
            .Update(update => update.Action("_ServiceRegimeSequenceEdit", "ServiceRegimeSequenceList"))
            .Create(create => create.Action("_ServiceRegimeSequenceCreate", "ServiceRegimeSequenceList"))
            .Destroy(destroy => destroy.Action("_ServiceRegimeSequenceDelete", "ServiceRegimeSequenceList"))
        )
 .ToolBar(toolbar =>
                 {
                     toolbar.Create().HtmlAttributes(new { @id = "AddbuttonID", @style = "color: black;" });
                     toolbar.Custom().Name("Create kit").HtmlAttributes(new { @id = "CreatekitID" });
                   
                 })

@(Html.Kendo().Window()
        .Name("window")
        .Width(830)
        .Height(315)
        .Draggable()
        .Resizable()
        .Modal(true)
        .Title("Create Kit")
        .Actions(actions => actions.Refresh().Maximize().Close())
            .Content(@<text>
        <div id="workshopKitModalWindow">
        </div>
        </text>)
    )
<script type="text/javascript">
$(document).ready(function () {
        $("#CreatekitID").click(function (e) {
            $("#workshopKitModalWindow").load('@Url.Action("","")');
            $("#window").data("kendoWindow").center().open();
        });

    });
</script>
Viktor Tachev
Telerik team
 answered on 23 Dec 2016
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
+? more
Top users last month
Simon
Top achievements
Rank 2
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
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?