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

Anyone know why when I change my grid's page it only seems to really change the page after my function completes? e.g. 

var g = $("#MyGrid").data("kendoGrid");
g.dataSource.page(2);

 

If I try to find a record on this new page by doing something like this: 

var dataItem = g.dataSource.get(MyRecordID);

DataItem is unknown

But if I wait until the function finishes it does change the grid's page.

If I set a breakpoint I can see the grid's datasource page is set to 2, but the data still has the old page one loaded...

Preslav
Telerik team
 answered on 13 Apr 2018
1 answer
138 views

Hello,

 I started to use dropdownlist Kendo but your documentation is confusing and I cannot find an info that I am looking for.

 I created 

@(Html.Kendo().DropDownListFor(d => d.AppraisalType)
                    .Name("optional")
                    .OptionLabel("Select Appraisal Type")
                    .HtmlAttributes(new { @class = "form-control", id = "typeAppraisal" })
                    .BindTo(new List<string>() {
        "60 Days Appraisal",
        "6 Months Appraisal",
        "Yearly Appraisal"
    })

When I submit the form it is not in database, saved as null. How I can save it?

And another thing how to set up dropdownlist as required field? 

Thank you!


Nencho
Telerik team
 answered on 13 Apr 2018
8 answers
611 views

Using the min and max values for the picker will prevent you from being able to select the dates/times via the UI, but you can still manually enter values outside of the min and max. I believe this is expected behavior, but there doesn't seem to e a way to inform the user that they just entered a datetime that is not in valid range. The onChange event does not fire, which makes sense, so there's no way for me to hook in and tell the user they just entered an invalid date.

 

My question: How can I disable dates in the UI AND still do min/max validation for the user so they know they netred a date/time out of the range and prevent a a form submission?

Viktor Tachev
Telerik team
 answered on 11 Apr 2018
1 answer
246 views

I need to call LoadSettings (via razor) as per a previous post; In short I need to call LoadSettings, but I also need to be able to set columns to be multi-select fitlerable.

 

How can I call LoadSettings and then do additional settings that are not yet implemented via LoadSettings? Can I overload LoadSettings in some way? Is the implementation of LoadSettings available? Is it likely to be re-implemented in the future?

 

 

 

Preslav
Telerik team
 answered on 11 Apr 2018
8 answers
154 views

Hi,

Is it possible to use 1 PivotGrid and have pre-defined columns, rows and measures etc, that change based on an onclick event?

For instance i would have two buttons, "View 1" and "View 2", when one of these buttons are clicked the PivotGrid would re-drawn using defined cols, rows etc?

Thanks,
Lee.

Lee
Top achievements
Rank 1
Veteran
 answered on 11 Apr 2018
2 answers
178 views

Im using the Kendo UI Editor and I'd like to be able to capture the print event - not the Print Execute command but the actual printing of the document (see attached image).

I realize that there is a onafterprint event (not supported by all browsers) - is this the only way to capture the printing of the Editor content?

Ruairi
Top achievements
Rank 1
 answered on 11 Apr 2018
5 answers
157 views

Hi Guys,

In my application I have a grid within a grid using ClientDetailTemplateId

in my subgrid I want to have 5 tabs, but in one specific instance I would like to have 6.
I created a script to remove the 6th tab with JavaScript, but this doesn't work in IE. and also it's not nice.

 

What I actually want is something like this.

if (#=MyId# == "9212")
                     {
                                 items.Add().Text("Title").Content(

where only if MyId = 9212 the item should be added,

but whatever I try I can't get it to work.

is there someone who can help me?

Thank you in advance.


Stefan
Telerik team
 answered on 11 Apr 2018
2 answers
531 views

I am really fresh to kendo and MVC.

This is my Index.cshtml file. I am trying to send new startDate and endDate to my controller . but looks like I am doing something wrong. 

I am trying to figure out how to post the change from datetimepicker towards my controller. 

 

@using Kendo.Mvc.UI
@{
    ViewBag.Title = "New Measurement Period";
}


<h1> New Measurement Period</h1>
<div>
    <label for="start">Start Date:</label>
    @(Html.Kendo().DateTimePicker()
                             .Name("startDate")
                             .Value(DateTime.Now)
                             .HtmlAttributes(new { style = "width: 100%", title = "datetimepicker" })
                             .DateInput()
    )
    <label for="end">End Date:</label>
    @(Html.Kendo().DateTimePicker()
                                .Name("endDate")
                                .Value(DateTime.Now)
                                .HtmlAttributes(new { style = "width: 100%", title = "datetimepicker" })
                                .DateInput()

    )
    @(Html.Kendo().Button()
                               .Name("primaryTextButton")
                               .HtmlAttributes(new { type = "button"})
                                                          .Content("Submit"))


   
     <script>
                $(document).ready(function () {
                    // create DateTimePicker from input HTML element
                    $("#datetimepicker").kendoDateTimePicker({
                        value: new Date(),
                        dateInput: true
                    });
                });

    </script>
</div>

 

Stefan
Telerik team
 answered on 11 Apr 2018
6 answers
232 views

Hi,

I have 8 (bootstrap) Tabs along with 8 PivotGrids (all with different names/ids, endpoints).

While some of them load correctly some, load the data, but then apply "display:none;" to the columns and rows (see attached).

I don't get any console errors, so not sure why this is happening, other than it doesn't like have 8 on one page?

I tried looking at the RequestEnd callback to maybe remove the "display:none;:" from the tables, but the data that's passed doesn't contain which PivotGrid it's for.

So i'm stuck any recommendations apart form "don't have 8 on one page :P"

Preslav
Telerik team
 answered on 10 Apr 2018
3 answers
561 views
Hi,I have a problem with data binding using a custom template for the editor for the Scheduler component.When double clicking an item in the scheduler my dialog is displayed, for for some reason, I am only able to databind against the properties of the ISchedulerEvent interface and not all the other properties of my ViewModel.ViewModel

Example:
public class MyViewModel : ISchedulerEvent
    {   
        buplic int MyId { get; set;}  
        public bool MyBool{ get; set;}
        public string MyString { get; set; }
        #region ISchedulerEvent
        public string Title { get; set; }
        public string Description { get; set; }
        public bool IsAllDay { get; set; }
        public DateTime Start {get;set;}
        public DateTime End { get; set; }
        public string StartTimezone { get; set; }
        public string EndTimezone { get; set; }
        public string RecurrenceRule { get; set; }
        public string RecurrenceException { get; set; }
        #endregion
}
-----------
View Example:
@(Html.Kendo().Scheduler<MyViewModel>()
      .Name("MyScheduler")
      .Date(DateTime.Today)
      .StartTime(DateTime.Today)
      .EndTime(DateTime.Today.AddYears(1))
      .Views(views =>
      {
          views.DayView();
          views.WeekView(weekView => weekView.Selected(true));
          views.MonthView();
      })
      .DataSource(d =>
      {
          d.Read(read => read.Url("/MyController/MyRead"));
          d.Update(update => update.Url("/MyController/MyUpdate"));
          d.Create(create => create.Url("/MyController/MyCreate"));
          d.Destroy(destroy => destroy.Url("/MyController/MyDelete"));
          d.Model(model =>
          {
              model.Id(f => f.MyId);
          });
      })
      .BindTo(new [] {
                    new ServiceWindowViewModel{
                        MyId = 1,
      MyBool = true,
      MyString = "Yay this is my string",
      
      Title = "title not used",
                        Description = "description not used",
                        End = DateTime.Now.AddHours(2),
                        EndTimezone = null,
                        IsAllDay = false,
                        RecurrenceException = null,
                        RecurrenceRule = null,
                        Start = DateTime.Now,
                        StartTimezone = null
                    }
                })     
      .Editable(editable => {
          editable.Confirmation(true);
          editable.Create(true);
          editable.Destroy(true);
          editable.Resize(true);
          editable.Update(true);
          editable.TemplateId("editor");
        })
    )<script id="editor" type="text/x-kendo-template">
<div class="k-edit-label"><label for="title">Title</label></div>
<div class="k-edit-field" data-container-for="title"><input type="text" class="k-input k-textbox" name="title" data-bind="value: title"></div>
<BR>   
<div class="k-edit-label"><label for="mystring">My String</label></div>
<div class="k-edit-field" data-container-for="mystring"><input type="text" class="k-input k-textbox" name="mystring" data-bind="value: mystring"></div>
</script>
-----------
Now My String editor box is displayed correctly... but the data is not displayed from the property of the view model... what am I doing wrong?Is there some other way to configure a custom edit popup for the Scheduler item? E.g. the editor for the grid seem to work better and is able to display all properties of my ViewModel correctly.Thanks,
Michael
Veselin Tsvetanov
Telerik team
 answered on 10 Apr 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
DropDownButton
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
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
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?