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

Hi,

I am currently calling e.preventDefault(); on the click of the Update button in the Add/Edit popup of the grid.

This prevents the closing and saving and thus allows me to perform an AJAX call to the server for additional validation. However, I don't know how I can execute the default action of the Update button after my verification was successful.

Any hints?

Danail Vasilev
Telerik team
 answered on 11 May 2016
2 answers
370 views

Hello

In a grid the filter icon is overlapping the column header, so that the title is not fully shown. Please see the screenshots attached.

My current workaround is to add multiple " " to the end of each title, but I think there must be a better solution. Setting the column width manually doesn't work either, the setting has no effect.

Am I doing something wrong?

Thank you for your answer!

Viktor Tachev
Telerik team
 answered on 11 May 2016
1 answer
165 views

http://demos.telerik.com/aspnet-mvc/scatter-charts/scatter-line

In the below code, they are binding multiple data sets to generate multiple scatter line series.

In a similar fashion how would I be able to generate multiple scatter line series by binding data in MVC

<p>.Series(series => {
            series.ScatterLine(new int[][] {
                    new [] {10, 10}, new [] {15, 20}, new [] {20, 25},
                    new [] {32, 40}, new [] {43, 50}, new [] {55, 60},
                    new [] {60, 70}, new [] {70, 80}, new [] {90, 100}
                })
                .Name("0.8C");
             
            series.ScatterLine(new int[][] {
                    new [] {10, 40}, new [] {17, 50}, new [] {18, 70},
                    new [] {35, 90}, new [] {47, 95}, new [] {60, 100}
                })
                .Name("1.6C");
 
            series.ScatterLine(new int[][] {
                    new [] {10, 70}, new [] {13, 90}, new [] {25, 100}
                })
                .Name("3.1C");
        })</p>

Stamo Gochev
Telerik team
 answered on 11 May 2016
3 answers
160 views
Hello,

I am trying to set the default view of the scheduler to show the Business Hours by default

My scheduler is built with Razor. I found a section in the documentation which says you can do showWorkHours : true, this is in the javascript version.
I also found an example somewhere that says you should be able to do something like : 

.Views(views =>
                                                {
                                                    views.DayView();
                                                    views.WeekView(weekView => weekView.Selected(true)).ShowWorkHours();
                                                    views.MonthView();
                                                    views.AgendaView();
                                                })

However this doesn't work, it tells me ShowWorkHours is not defined.
So, what am I missing ?

I am using version 2013.2.918


Rosen
Telerik team
 answered on 11 May 2016
3 answers
900 views

Hi,

i'm currently sat here into the third hour of Telerik updating to Q2 MVC, VS2015 remaining unresponsive.  I've been looking at the files that are being updated and the vast majority appear to be localization/cultures files. I notice that on my production webserver there are also a large number of localization files.

My application is a EN-GB app and will always be so and will never have any need for localization.  Is there a way to remove all this unnecessary functionality and the time it takes to do an update (I realise this is largely due to VS being somewhat slow in this regard)?

Yana
Telerik team
 answered on 09 May 2016
1 answer
162 views

In my grid I have a details template that has input fields bound to a model.

I want to enable the inline-edit mode of a grid ONLY when a user has a details list open and starts typing in an input filed. I tried the below method, but in order to enable the mode i need to call grid.editRow(grid.select()) twice, which makes no sense. Also, after the second editRow is called, i lose focus on the textbox i was typing in:

// Detect input keyin event
        $('body').on('input', '.k-detail-cell .form-control:enabled', function () {
            var grid = $(this)
                        .parents('.k-grid')
                        .data("kendoGrid");

            // enable inline editing once typing has begun
            if ($(".k-grid-edit-row").length <= 0) {
                //grid.editRow(grid.select());
                //grid.editRow(grid.select());
            }
        });

Kostadin
Telerik team
 answered on 09 May 2016
1 answer
234 views

 

How do I cause the MVC Grid to support insert only and no other operation. This is my code

 

@(Html.Kendo().Grid<SomeViewModel>()
          .Name("SomeGrid")
                  .ToolBar(toolbar =>
                      {
                          toolbar.Create();
                          toolbar.Save();
                      })     
          .Columns(columns =>
          {
              columns.Bound(p => p.Name).ClientTemplate(@"<input type='radio' name='SomeName'> #= Name # </input>");
              columns.Bound(p => p.DateCreated);
              columns.Command(command => { command.Edit(); });
          })
                  .Editable(editable => editable.Mode(GridEditMode.InCell))
          .Events(e => e.DataBound("onDataBound"))
          .Selectable(selectable => selectable.Enabled(true).Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
          .Scrollable()
          .Filterable()
          .HtmlAttributes(new { style = "height:200px;" })
          .DataSource(dataSource => dataSource
              .Ajax()
                      .Batch(true)
              .Events(events => events.Error("onError"))
              .Model(model =>
              {
                  model.Id(s => s.unique);
                  model.Field(s => s.DateCreated).Editable(false);
              })
              .Read(read => read.Action("GetSolutions", "Solutions"))               
              .Create(create => create.Action("SomeAction", "SomeController"))
              .Update(create => create.Action("SomeAction", "SomeController"))
               
               
              ))

 

 

Also, it looks like I have to implement the .Update method above even though I don't want to support updates. If I don't do that I get error "The update data binding setting is required by edit command".

 

Ideally, it would have been nice to keep the update completely disassociated with inserting but looks like that's not the case and may be there has to be some hack to cause edit not to happen. Can someone please let me know this hack ?

Marin
Telerik team
 answered on 09 May 2016
1 answer
182 views

Hello 

I have such case that some rows in Grid have details rows.

Main Row and Detail Row one common column "OrderNumber"

Question:

 

How to make man grid be able to include detail grid in filtering by ordering number?

Konstantin Dikov
Telerik team
 answered on 09 May 2016
3 answers
1.4K+ views

 

I am using Kendo UI Grid

@(Html.Kendo().Grid<SomeViewModel>()
 .Name("SomeGrid")
 .Columns(columns =>
 {
        columns.Bound(p => p.Id);
 })
 .Events(e => e.DataBound("onDataBound"))
 .Selectable(selectable => selectable.Enabled(true).Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
    .Scrollable()
 .Filterable()
    .DataSource(dataSource => dataSource
 .Ajax()
 .Read(...)
 )
 )

When the row is selected the color changes to orange. How do I remove the css style performing this color change. In other words when row is selected I don't want any color changing.

 

 

 

Daniel
Telerik team
 answered on 09 May 2016
1 answer
273 views

I have a chart with two series, both grouped by an identical category field. When I display the tooltip I want to be able to hide items that have a value of zero. How would I do this?

Here is my code for the chart, and I attached a screenshot of it:

@(Html.Kendo().Chart<JobChartVm>()
 .Name("durationChart")
 .Theme("Bootstrap")
 .Title("Execution Time & Error Counts By Job (Last 7 Days)")
 .Legend(legend => legend
 .Position(ChartLegendPosition.Top)
 .Labels(labels => labels.Padding(0, 20, 0, 0))
 .Padding(5, 5, 5, 20)
 .Background("#f5f5f5")
 .Border(1, "#ddd", ChartDashType.Solid)
 )
 .DataSource(dataSource => dataSource
 .Read(read => read.Action("GetJobChartData", "Admin"))
 .Group(group => group.Add(model => model.Entity.JobName))
 .Sort(sort => sort.Add(model => model.Entity.TimeStamp).Ascending())
 )
 .SeriesDefaults(seriesDefaults =>
 seriesDefaults.Line().Style(ChartLineStyle.Smooth)
 )
 // in order not to duplicate the legend we need to specify 1 unique color per group
 .SeriesColors("#428bca", "#5bc0de", "#5cb85c", "#f2b661", "#e67d4a", "#da3b36", "#967adc")
 .Series(series =>
 {
 series
 .Line(model => model.Entity.Duration, categoryExpression: model => model.Entity.TimeStamp)
 .Aggregate(ChartSeriesAggregate.Avg)
 .Notes(notes => notes.Label(label => label.Position(ChartNoteLabelPosition.Outside)).Position(ChartNotePosition.Bottom))
 .Name("#= group.value #")
 .Tooltip(tooltip => tooltip
 .Visible(true)
 .Format("{0:N0}s")
 );
 series
 .Column(model => model.Failures, categoryExpression: model => model.Entity.TimeStamp)
 .Aggregate(ChartSeriesAggregate.Sum)
 .VisibleInLegend(false)
 .Gap(0.2)
 .Spacing(0.1)
 .Name("#= group.value #")
 .Tooltip(tooltip => tooltip
 .Visible(true)
 .Format("{0:N0} errors")
 );
 })
 .CategoryAxis(axis => axis
 .Date()
 .Labels(labels => labels.Rotation(-90))
 .BaseUnit(ChartAxisBaseUnit.Fit)
 .Crosshair(c => c.Visible(true))
 )
 .ValueAxis(axis => axis
 .Logarithmic()
 .MinorGridLines(minorGridLines => minorGridLines.Visible(true))
 .Labels(labels => labels.Format("{0:N0}"))
 .Title("Execution Time (sec) / Error Count")
 .Min(0.9)
 .AxisCrossingValue(0.9)
 )
 .Tooltip(tooltip => tooltip
 .Visible(true)
 .Shared(true)
 )
 .Events(events => events
 .DataBound("function(e){ kendo.ui.progress($('#durationChart'), false); }")
 )
 .Pannable(pannable => pannable
 .Lock(ChartAxisLock.Y)
 )
 .Zoomable(zoomable => zoomable
 .Mousewheel(mousewheel => mousewheel.Lock(ChartAxisLock.Y))
 .Selection(selection => selection.Lock(ChartAxisLock.Y))
 ))

Stamo Gochev
Telerik team
 answered on 09 May 2016
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
Rating
ScrollView
ButtonGroup
CheckBoxGroup
NavBar
ProgressBar
QRCode
RadioButton
Scroller
Timeline
TreeMap
TaskBoard
OrgChart
Captcha
ActionSheet
Signature
AppBar
BottomNavigation
Card
FloatingActionButton
Licensing
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
DateTimePicker
TimePicker
StockChart
RadialGauge
ContextMenu
ArcGauge
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?