Telerik Forums
UI for ASP.NET MVC Forum
1 answer
316 views

Hello - I expect what I want to do is not supported. I that it he case, then I'll abandon this cool idea I have and not use the kendo spreadsheet.

I need a view-only mode that just shows the cells where they cannot be edited/modified. I need an admin-only mode where the entire spreadsheet control is functional.

For the view-only mode I tried the following, which does hide most of the stuff I don't want. But it requires more work to adjust heights and handle click events, at least. As it is when I do this various script errors are occurring when I click within the spreadsheet div:

    $(document).ready(function () {
        $('.k-spreadsheet-sheets-bar').hide();
        $('.k-tabstrip-wrapper').hide();
        $('.k-spreadsheet-action-bar').hide();
        $('.k-spreadsheet-scroller').hide();
        $('.k-spreadsheet-column-header').hide();
        $('.k-spreadsheet-row-header').hide();
    });

Marin Bratanov
Telerik team
 answered on 27 Nov 2018
8 answers
1.4K+ views

This is the code :

 

$("#chart").kendoChart({
            title: {
                text: "Distribution of roles per total number of articles(per selected levels)"
            },
            chartArea: {
                width: 800,
                heigth: 800,
                stack: { type: "100%" }
            },
            legend: {
                visible: true
            },
            seriesDefaults: {
                type: "column"

            },
            series: [
                {
                    name: "A",
                    //  order: 1,
                    stack: "Chart",
                    data: chart_Profiling//[76067, 0, 0]
                },
                 {
                     name: "B",
                     //  order: 2,
                     stack: "Chart",
                     data: chart_Compulsory//[14183, 0, 0]
                 },
                  {
                      name: "C",
                      // order: 3,
                      stack: "Chart",
                      data: chart_Complement//[1197, 465606, 6567]
                  },
                   {
                       name: "HWW",
                       visibleInLegend: false,
                       stack: "Chart1",
                       data: chart_Profiling_1//[76067, 0, 0]
                   },

                 {
                     name: "HWW",
                     visibleInLegend: false,
                     stack: "Chart1",
                     data: chart_Compulsory_1 //[14183, 0, 0]
                 },
                   {
                       name: "HWW",
                       visibleInLegend: false,
                       stack: "Chart1",
                       data: chart_Complement_1//[1197, 465606, 6567]
                   },
                   {
                       name: "OHA E",
                       visibleInLegend: false,
                       stack: "Chart2",
                       data: chart_Profiling_All_SomeArticles//[76067, 0, 0]
                   },

                 {
                     name: "OHA E",
                     visibleInLegend: false,
                     stack: "Chart2",
                     data: chart_Compulsory_All_SomeArticles //[14183, 0, 0]
                 },
                    {
                        name: "OHA E",
                        visibleInLegend: false,
                        stack: "Chart2",
                        data: chart_Complement_All_SomeArticles//[1197, 465606, 6567]

                    },


            ],
            seriesColors: ["rgb(214,186,114)", "rgb(197,200,203)", "rgb(170,115,80)"],

            valueAxis: {
                // majorUnit: (max7 / 10),
                //max: (max7 + (max7 / 6)),
                min: 0,
                max: max7,
                labels: {
                    template: "#= kendo.format('{0:N0}', value ) # "
                },
                line: {
                    visible: true
                }
            },
            categoryAxis: {
                categories: [Category1,Category2,Category3,Category4],
                majorGridLines: {
                    visible: true
                },
                labels: {
                    template: labelTemplate,
                    rotation: -45
                }
            },
            tooltip: {
                visible: true,
                template: "#= series.name #: #= value #"
            }
            ,
            pannable: {
                // lock: "y",
                // lock: "x"
            },
            zoomable: {
                mousewheel: {
                    //lock: "y"
                },
                selection: {
                    // lock: "y"
                }
            }
        });

    }

 

I need to show the chart as shown in uploaded image.

Stamo Gochev
Telerik team
 answered on 27 Nov 2018
1 answer
1.3K+ views

There is my table:

public class Sound
{
    [Key]
    [DatabaseGenerated(DatabaseGeneratedOption.None)]
    public Guid GUID { get; set; }
    [Display(Name = "Sound Type")]
    [Required]
    public SoundType SoundType { get; set; }
    [Display(Name = "Bandwidth, kHz")]
    public byte? Bandwidth { get; set; }
    [Display(Name= "Frequency, Hz")]
    public short? Frequency { get; set; }
    [Display(Name = "Duration, ms")]
    public short? Duration { get; set; }
    [Display(Name="Sound File")]
    public byte[] Content { get; set; }
    [Display(Name = "File Name")]
    public string FileName { get; set; }
    public Sound()
    {
        GUID = Guid.NewGuid();
    }
}

 

I just would like to show it in a grid and to be possible to upload files into the Content field and to store their names in the FileName field.

I've been trying to find out some examples of how to perform this, but almost all of them use separated steps to upload files into some directory on the server and to save the path to the file in the table then. I prefer to save the file attributes and its content as one step using Create or Update method of .

Is it possible to do it this way? Are there some examples?

Thank you.

Marin Bratanov
Telerik team
 answered on 26 Nov 2018
2 answers
127 views

https://demos.telerik.com/aspnet-mvc/scheduler/resources-grouping-vertical

When you have multiple attendees (Alex, Bob) and change the meetings time or date, only the first attendee gets saved.

 

Dimitar
Telerik team
 answered on 23 Nov 2018
2 answers
157 views

Hi there,

I have a Master-Detail Grid setup. Inside the Detail template I use a Tabstrip with 5 items.

Inside each of the Tabstrip items I want to show some detail information about the selected (expanded) Master row. Here's my problem: the detail record contains about 30 columns, 27 of them must be readonly while the rest must be editable (hence the choice for yet another Grid). The default grid layout is horizontal, so I get one very wide horizontal row. Because of my screen real estate I want to show all these details in a table-like manner like 3 columns, 9 rows, last row for all the editable items.

Can you give me some advice and sample code how to handle this?

Best,

Peter

Viktor Tachev
Telerik team
 answered on 23 Nov 2018
2 answers
148 views

i want to check condition before save   but still not work what im wrong ?

how to solve it

<p>save: Function(e) {</p><p>var currenVar = e.model.id;</p><p>var data;;</p><p>https.get($scope.service URL + currenVar.success(function (result){</p><p>data= result;</p><p>for (item in data){</p><p>if(data[item].id == currenVar  {</p><p>alert('Cannot use this');</p><p>e.preventdefault();</p><p>}</p><p>}</p>
Tsvetina
Telerik team
 answered on 22 Nov 2018
1 answer
4.1K+ views
I was going great with the web project, until i found this issue, if i use the dropdownlist outside of the grid, it will display just fine, even if i assign it to the toolbar template, but when i assign it to grid's pop-up editor, it doesn't display the dropdownlist for me to create a new data, it just displays the blank text, can someone explain to me how to use dropdownlist in editor, i tried the custom editor but it doesn't help.
Georgi
Telerik team
 answered on 21 Nov 2018
6 answers
376 views

Hi,

I have a scatter line chart that is supposed to show incidents that occur simultaneously. I am almost there, but have some issues I haven't been able to solve:

1) The color of the lines and markers should all be the same. As it is the color seems to be random.

2) Same goes for the tooltip, as you can see some color combinations makes for very poor visibility. I have tried to set .Color("white") on the tooltip, but it has no effect.

3) Is it possible to set the size of the chart depending on the amount of data? If there are many simultaneous incidents the chart needs to be higher.

4) I would like to have labels instead of tooltips, labels that looks like the toopltips I get when hovering over a line, but they should always be visible for all lines.Is this possible?

Best regards,

Henrik

Henrik
Top achievements
Rank 1
 answered on 20 Nov 2018
1 answer
131 views
Hi, i’m trying to connect an OLAP cube in Azure Analisys Services to the pivot grid, but there is no dll for HTTP connection, how can i do this?

Thank you
Konstantin Dikov
Telerik team
 answered on 20 Nov 2018
5 answers
1.9K+ views
Hi,

I have the grid below and I have added a dropdown list in one of the cells. What I want to do is for each item in the dropdown list I want to set a color.

I.e. item 1 has a blue background, item 2 has a green background etc.

Also I want the selected items background color to also be the same as the item they have selected.

Any Ideas on what I can do to achieve the above?

Below is the grid I am working with:

@using System.Collections.Generic;

@model IEnumerable<TelerikChecklist.Models.ProductViewModel>
    
@(Html.Kendo().Grid(Model)
    .Name("gridDropDown")
    .Columns(columns =>
    {
        columns.Bound(p => p.ProductName);
        columns.ForeignKey(p => p.CategoryID, (System.Collections.IEnumerable)ViewData["categories"], "CategoryID", "CategoryName")
            .Title("Category").Width(150);
    })
    .Editable(editable => editable.Mode(GridEditMode.InCell))
    .Pageable()
    .Scrollable()
    .HtmlAttributes(new { style = "height:250px;" })
    .DataSource(dataSource => dataSource
        .Ajax()
        .Batch(true)
        .PageSize(20)
        .ServerOperation(false)
        .Events(events => events.Error("errorHandler"))
        .Model(model =>
        {
            model.Id(p => p.ProductID);
            model.Field(p => p.ProductID).Editable(false);
            model.Field(p => p.CategoryID).DefaultValue(1);
        })

        .Read(read => read.Action("ForeignKeyColumn_Read", "Home"))
        .Update(update => update.Action("ForeignKeyColumn_Update", "Home")).Events(e => e.Change("Category"))
        .Create(create => create.Action("ForeignKeyColumn_Create", "Home"))
        .Destroy(destroy => destroy.Action("ForeignKeyColumn_Destroy", "Home"))

    )
    )

Dimitar
Telerik team
 answered on 19 Nov 2018
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
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?