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

Hi there,

I am attempting to get the Treeview template to work, similar to the demo for the MVC treeview:

<script id="treeview-template" type="text/kendo-ui-template">
    #: item.text #
    # if (!item.items) { #
    <a class='delete-link' href='\#'></a>
    # } #
</script>
 
<div class="row">
    <div class="form-group col-md-12">
        @(Html.Kendo().TreeView()
            .Name("treeview")
            .TemplateId("treeview-template")
            .DataTextField("Name")
            .DragAndDrop(true)
            .DataSource(dataSource => dataSource
                .Read(read => read
                    .Action("Parties", "TreeView")
                )
            )
            .Events(events => events
                .Drop("onDrop")
            )
        )
    </div>
</div>

However, the item.text expression always evaluates as undefined - not sure what I am doing wrong? If I remove this, the item.items expression on the next line is correctly evaluated.

Thanks,

 Paul

Paul
Top achievements
Rank 1
 answered on 13 Apr 2015
3 answers
402 views

So I originally defined a TabStrip and manually loaded the content using LoadContentFrom with an Action which returned a PartialView of content defined in another .cshtml. It worked fine.

Now I want to do something similar, but have the items of the TabStrip bound to a collection. The TabStrip is binding the text of the item just fine, but the Action to get the content is never being called. How do I define it so that it does, similar to LoadContentFrom?

If my old implementation is:

@(Html.Kendo().TabStrip()
    .Name("tabStrip")
    .Items(items => {
        items.Add().Text("Test").LoadContentFrom("MyAction","MyController", new { id = 0 });

     })

)

How do I translate that to:

@(Html.Kendo().TabStrip()
    .Name("tabStrip")
    .BindTo(Model, (item, category) =>
    {
        item.Text = category.TestText; // works
        item.Action("MyActions", "MyController", new { id = 0 }); // Doesn't seem to do anything
    })
)

Atanas Korchev
Telerik team
 answered on 13 Apr 2015
1 answer
161 views

 

I have restricted horizontal space on a page, but have multiple values to display in a graph. I thought a single-column, stacked column chart would fit the bill. I'm interested in showing proportion of values.

 I have a simple model:

  •  UserName
  • Items

Using the AJAX mechanism shown here http://demos.telerik.com/aspnet-mvc/bar-charts/remote-data-binding I can get the chart to display using the following code:

@(Html.Kendo().Chart<RequestLoadingSummaryAggregate>()
    .Name("resourceLoadingChart")
    .Title("Resources")
    .Legend(legend=>legend.Visible(false))
    .DataSource(dataSource=>dataSource.Read(read=>read.Action("RequestLoadingSummary","Home")))
    .Series(series =>
    {
        series.Column(model => model.Items).Name("Resource");
    })
    .CategoryAxis(axis=>axis
        .Categories(model=>model.UserName)
        .Labels(labels=>labels.Rotation(-90))
        .MajorGridLines(lines=>lines.Visible(false))
        
    .ValueAxis(axis=>axis.Numeric()
        .Labels(labels=>labels.Format("{0:N0}"))
        .MajorUnit(100)
        .Line(line=>line.Visible(false))
        )
    .Tooltip(tooltip=>tooltip
        .Visible(true)
        .Format("{0:N0}")
        )
        .ChartArea(chartArea=>
        chartArea.Height(400))
      )

But I cannot get it to work as a Stacked Column using the additional defaults:

 

.SeriesDefaults(seriesDefaults =>
    seriesDefaults.Column().Stack(ChartStackType.Normal)
)

How can I project the model from the AJAX result into a form that the chart can understand such that the values occupy a single column with multiple values?

Thanks

 

Nathan

Iliana Dyankova
Telerik team
 answered on 10 Apr 2015
1 answer
165 views
Can you cancel a row selection from within the onSelect event?
Dimiter Madjarov
Telerik team
 answered on 10 Apr 2015
20 answers
450 views
I just tried upgrading my VS2013 solution to v2014.3.1316 of the MVC UI. It's failed three times now. My solution has two MVC enabled projects using the 2014.3.1223 internal update (which I had to manually install for probably the same reason) in it and I tried to update both at the same time. I got the following error:

An error occurred while running the wizard.Error executing custom action Telerik.KendoUI.Mvc.VSX.Actions.MultiProjectCopyResourcesAction: System.Runtime.InteropServices.COMException (0x8007007C): Error deleting file 'kendo.messages.ru-RU.min.js'. The system call level is not correct.   at EnvDTE.ProjectItem.Delete()
   at Telerik.VSX.ProjectConfiguration.ProjectFileManager.DeleteContents(String projectRelativePath, String excludePattern)
   at Telerik.KendoUI.Mvc.VSX.Actions.CopyResourcesAction.ModifyScripts(String mainAssemblyFolder, String versionedFolder)
   at Telerik.KendoUI.Mvc.VSX.Actions.CopyResourcesAction.ModifyResources()
   at Telerik.KendoUI.Mvc.VSX.Actions.CopyResourcesAction.Execute(WizardContext wizardContext, IPropertyDataDictionary arguments, IProjectWrap project)
   at Telerik.VSX.Actions.ProjectActionBase.Telerik.VSX.Actions.IProjectAction.Execute(IWizardContext wizardContext, IPropertyDataDictionary arguments, IProjectWrap projectWrap)
   at Telerik.VSX.Actions.MultiProjectActionBase`1.Execute(WizardContext wizardContext, IPropertyDataDictionary arguments)
   at Telerik.VSX.WizardEngine.Actions.ActionBase.Telerik.WizardFramework.IAction.Execute(IWizardContext wizardContext, IPropertyDataDictionary arguments)
   at Telerik.VSX.WizardEngine.ActionManager.ExecActions()

What gives?
Will
Top achievements
Rank 1
 answered on 09 Apr 2015
3 answers
327 views
I am working on a Client-Side paging grid (ServerOperation(false)) where I need to manually update the page size when a new row has been added using the grid's dataSource.insert() method. The reason for this is because I want to have the new record visible as well as any other existing records on the grid on the same page.

I am updating the page size using the following code when a new record is added:

var grid = $("#myGrid").data("kendoGrid");
var currentPageSize = grid.dataSource.pageSize();
grid.dataSource.pageSize(++currentPageSize);
grid.refresh();

Unfortunately, the above code does not work for Client-Side paging but it works on Server-side paging.

Any assistance would be very welcome.
Daniel
Telerik team
 answered on 09 Apr 2015
3 answers
186 views
Hi,

I can see that the Grid component can produce PDF (and Excel) exports, which is ideal.

But, how can I invoke the functionality from outside of the native Grid toolbar?

In the example below, I want to invoke the PDF export of the Grid using the Toolbar component (though it could be any external stimulus)


01.@(Html.Kendo().ToolBar()
02.        .Name("ToolBar")
03.        .Items(items =>
04.        {
05.            items.Add().Type(CommandType.SplitButton).Text("Export").ImageUrl(Url.Content("~/Content/web/toolbar/save.png")).MenuButtons(menuButtons =>
06.            {
07.                menuButtons.Add().Text("Export to Excel").ImageUrl(Url.Content("~/Content/web/toolbar/save.png"));
08.                menuButtons.Add().Text("Export to PDF").ImageUrl(Url.Content("~/Content/web/toolbar/upload.png"));
09.            });     
10.        })
11.    )  
12.    @(Html.Kendo().Grid<RequestWorkflowWithWatcherViewModel>()
13.          .Name("grid")
14.          .Columns(columns =>
15.          {
16.// columns stuff
17.          })
18.          .ToolBar(tools =>
19.              tools.Pdf())
20.          .Pdf(pdf => pdf
21.                .AllPages()
22.                .FileName("Kendo UI Grid Export.pdf")
23.                .ProxyURL(Url.Action("EnquiryExportToPdf", "Home"))
24.            )        
25. 
26.          ))

Ultimately I want to do the same with Excel.

Any ideas would be welcome.

Many thanks

Nathan
Kiril Nikolov
Telerik team
 answered on 09 Apr 2015
1 answer
140 views

Hi,      

i am working with kendo scheduler  and it gives me an error at scheduler event binding except for change event all other events generate me the same error. I created a new sample project with latest kendo version but still struggling with the same issue please refer the attach project and images for more information.

Vladimir Iliev
Telerik team
 answered on 09 Apr 2015
5 answers
201 views
As it is my first post on telerik forum i would like to say HI ;) 

And my question:

Is it possible to select resources for scheduler event in new window ? i have to create event that have participants as persons and companies and there is to many persons and companies in database to select them from dropdownlist.

Now i would like to have button for "Add Person" and "Add Company" or just "Add participants" and then generate a view where i could search and select in chceckboxes and then return these persons/companies back into controller.


Is it possible at all ? 

Could you make me a list of steps that allow me to achieve it ? (I am new in telerik)

Vladimir Iliev
Telerik team
 answered on 09 Apr 2015
1 answer
1.0K+ views
Hello
I'm programming in ASP MVC and I'm with the following problem:

I put the DateTimePicker on the page and when I test my LOCALHOST I do not have any problem, but when I publish the page on the server does not leave me icons DateTimePicker, leaving the inspector elements GoogleChrome the following error "Failed to load resource: the server responded with a status of 401 (Unauthorized) "
search the internet some solution and can not find,

I attached the image so you can see the problem and can help me find a solution.

Thanks
Alexander Popov
Telerik team
 answered on 09 Apr 2015
Narrow your results
Selected tags
Tags
Grid
General Discussions
Scheduler
DropDownList
Chart
Editor
TreeView
DatePicker
Upload
ComboBox
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
ListView (Mobile)
Pager
Accessibility
ColorPicker
DateRangePicker
Wizard
Security
Styling
Chat
MediaPlayer
TileLayout
DateInput
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
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?