Telerik Forums
UI for ASP.NET MVC Forum
1 answer
125 views
Hello, I am currently evaluating the Telerik control Tree View to display the hierarchy data as shown in the attached screen shot.


I have a requirement where we will be building a treeview in our ASP.NET MVC controller code  passing to the view.  

I  create a sample project which I got from the forums and modified it  which I have attached 

I need to display the Kendo Tree View  with all nodes expanded when the application loads How do I do that ?


I see that when I expand the nodes, the node with "Program Structure" expands correctly.
The node with "Program Metrics" does not expand correctly. The expanded icon does not show correctly as shown in program structure.

Aleksandar
Telerik team
 answered on 08 Dec 2020
11 answers
1.0K+ views

Hi,

I am trying to persist my MVC Kendo Grid using getOptions() and setOptions(). I am successfully able to save and get.

Now I am facing problem with Kendo grid columns tooptip and data tooltip while setOptions() loading to my page.

I need to get tooptip on Account Code after loading my user preferences by using setOptions(). Please help me.

Here my code

 @(Html.Kendo()
.Grid<Models.TransactionSummary>()
.Name("TransactionDetailGrid")
.Columns(c =>

     c.Bound(p => p.Account.Code).Width(60);
    c.Bound(p => p.VendorInvoiceNumber).Width(80);

}

function SaveUserPrererences() {
        var grid = $("#" + SearchResultGridId()).data().kendoGrid;
        var resources = kendo.stringify(grid.getOptions());
        $.ajax(
            {
                url: "@Url.Action("SaveUserPreferences", "Review", new { area = "Transaction" })",
                type: 'POST',
                async: false,
                contentType: "application/json; charset:utf",
                dataType: 'json',
                data: JSON.stringify({ gridResources: resources, isActive: isActive }),
                success: function (data) { }

       }

 

 $("#load").click(function (e) {
        var grid = $("#" + SearchResultGridId()).data().kendoGrid;
        e.preventDefault(); 

         $.ajax(
             {
                 url: "@Url.Action("GetUserPreferences", "Review", new { area = "Transaction" })",
                 async: false,
                 type: "POST",
                 dataType: 'json',
                 success: function (data){
                     if (data) {
                         var parsedOptions = JSON.parse(data);
                         parsedOptions.toolbar = [
                             { template: $("#toolbarTemplate").html() }
                         ];
                         parsedOptions.columns[0].headerTemplate = $("#headerTemplate").html();                        
                         grid.setOptions(parsedOptions);                        
                     }
                 }                    

Ianko
Telerik team
 answered on 08 Dec 2020
1 answer
126 views

Hello,
I have a form with different text fields ,dropdown lists and a gridview with some data.
after entering the information in text fields, I have a button that allows me to validate the creation of this new element.
this button must call an action of my controller which is used to generate an excel file where I must call the template of this file from my local files and display the information entered in the fields that correspond in the excel file
I am using npoi library (c #) in back and telerik ui for asp.net mvc 

It would be much appreciated if you can help me on this.
Thanks for replying 

Aleksandar
Telerik team
 answered on 07 Dec 2020
1 answer
123 views

Hi,

Json data is like below.

[{"EmpName":"A","ProjectName":"2020 PS","Hours":135},
{"EmpName":"B","ProjectName":"2020 PS","Hours":25},
{"EmpName":"B","ProjectName":"NIHKNOT","Hours":92},
{"EmpName":"B","ProjectName":"TIME OFF","Hours":47},
{"EmpName":"C","ProjectName":"SYSADMIN","Hours":186},
{"EmpName":"C","ProjectName":"TIME OFF","Hours":32},
{"EmpName":"D","ProjectName":"BHP1MTRP","Hours":198},

{"EmpName":"D","ProjectName":"BHP2MTRP","Hours":19},

{"EmpName":"D","ProjectName":"BHP3MTRP","Hours":98},

{"EmpName":"D","ProjectName":"BHP4MTRP","Hours":8},
{"EmpName":"E","ProjectName":"2020 PS","Hours":124},
{"EmpName":"E","ProjectName":"BHMOSTRT","Hours":12}]. 

i want to display above data in column chart with group by Employeename column.

sandy
Top achievements
Rank 1
Iron
Veteran
 answered on 07 Dec 2020
2 answers
216 views

Hello,

I am having an issue, where I am not able to display the reccurence pattern in my cusom EditorTemplate. 

The pattern is being read fine from my database, and the tasks are being shown correctly in the Scheduler. The recurrence is just not being showed, when I click on a task - see picture 1 (danish). I want to display the recurrence, like shown in the Scheduler demo - see picture 2.

The reccurrence pattern is being read from my database, and is bound via a string property to the Html.Kendo().RecurrenceEditorFor.

 

Hope you can help me.

 

<!-- RECCURENCE -->
    <div class="k-edit-label">
        @(Html.LabelFor(model => model.RecurrenceRule, "Gentagelser"))
    </div>
    <div data-container-for="recurrencerule" class="k-edit-field">
        @(Html.Kendo().RecurrenceEditorFor(model => model.RecurrenceRule)
        .Name("recurrenceEditor")
        .HtmlAttributes(new { data_bind = "value:recurrencerule" })
        )
    </div>
Allan
Top achievements
Rank 1
Veteran
 answered on 07 Dec 2020
4 answers
413 views

Hi.

i have a data source (which contains 2 columns and  it contains around 50 rows only) and applied to kendo multi select and keno column chart.

now i want to apply same data source to kendo grid mvc with aggrigate functions and paging options.

Anton Mironov
Telerik team
 answered on 04 Dec 2020
7 answers
855 views

 Hi,

I have a grid with paging and I need to print all the pages of that grid. 

I have already tried with your previous threads' solution. But they didn't work. In one solution it was suggested to use the solution like below:

<p><span style="line-height: 1.5;">var grid = $("#gridEmployeeMaintenance").data("kendoGrid").dataSource;</span></p><p><span style="line-height: 1.5;">grid.pageSize(grid.total());​</span></p>
var grid = $("#gridEmployeeMaintenance").data("kendoGrid").dataSource;

grid.pageSize(grid.total());​

After printing set the pagesize to previous.

But the above solution didn't work. My current try is like below. It also doesn't work. In the loop "gridElement.clone()[0].outerHTML" always get the contents of first page even the page number is set to 2 or 3. 

<p>var printableContent = ""; </p><p>var pages = getPageTotalNumber($('#gridEmployeeMaintenance'));</p><p>var gridElement = $('#gridEmployeeMaintenance');<br><br>    for (var index = 1; index <= pages; index++) {<br>        gridElement.data("kendoGrid").dataSource.page(index);<br>        printableContent += gridElement.clone()[0].outerHTML;<br>    }</p>
var printableContent = ""; 

var pages = getPageTotalNumber($('#gridEmployeeMaintenance'));

var gridElement = $('#gridEmployeeMaintenance');

    for (var index = 1; index <= pages; index++) {
        gridElement.data("kendoGrid").dataSource.page(index);
        printableContent += gridElement.clone()[0].outerHTML;
    }

 

Please suggest me any suitable solution.

 

Thanks

Alex Hajigeorgieva
Telerik team
 answered on 03 Dec 2020
6 answers
622 views

I found a few threads where Telerik responded that this feature was being implemented, and the threads were from around 2014 I think.  I have not found any threads with examples of how this is done, so not sure if it was ever implemented?  An example of what I'm looking for is attached.

Thanks

 

Eyup
Telerik team
 answered on 02 Dec 2020
1 answer
1.3K+ views

I testing Telerik for our application and it looks very promising right now.

I creating an alarm list based on the Kendo grid generated at server side in .NET Core 3.1. One of the column is called alarm class and we need to select different css for the row depending on this value. Eg alarm class 3 = Fatal = Red background and bold font, alarm class 1 = information = White background and normal font etc.

Is this possible and if so, how to I implement it?

Thank's in advance!

George Gindev
Telerik team
 answered on 30 Nov 2020
2 answers
103 views
I really like the way the default filter buttons work in the Telerik grid.  I want to have a similar experience on other pages of my application.  Is there anything prebuilt to use these filters on a search form or do I need to build everything from scratch using each individual component?
Dave Wolf
Top achievements
Rank 1
Iron
 answered on 30 Nov 2020
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
Barcode
ButtonGroup (Mobile)
Drawer (Mobile)
ImageEditor
RadioGroup
Sparkline
Stepper
TabStrip (Mobile)
GridLayout
Template
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
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?