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

Hi,

 

My jobs are loading properly in the scheduler. And creating a job by double clicking on the scheduler and save from the popup is OK. But the problem is when I open the the newly created job and click Cancel button, nothing happens. I checked on the browser console. Error is "Uncaught TypeError: Cannot read property 'uid' of undefined"

 

In my case, "Job 101", "Job 10​2", "Job 10​3", "Job 104" are loading from back end. Suppose, I have just created a new job titled "Job 105" and when I open the job again by double clicking and click on Cancel button, error occurs, "Uncaught TypeError: Cannot read property 'uid' of undefined"

 

What am I doing wrong here?

 

@(Html.Kendo().Scheduler<TaskViewModel>()
    .Name("schedulerVertical")
    .Date(new DateTime(2015, 5, 27))
    .StartTime(new DateTime(2015, 5, 27, 7, 00, 00))
    .Height(600)
    .Views(views =>
    {
        views.DayView();
        views.WeekView();
        views.MonthView();
        views.TimelineView(t => t.Selected(true));
    })
    .Timezone("Etc/UTC")
    .Group(group => group.Resources("Techs").Orientation(SchedulerGroupOrientation.Vertical))
    .Resources(resource =>
    {
        resource.Add(m => m.TechID)
            .Title("Techs")
            .Name("Techs")
            .DataTextField("TechName")
            .DataValueField("TechID")
            .DataSource(d => d.Read("Techs", "Scheduler"));
    })
    .DataSource(d => d
        .Model(m =>
        {
            m.Id(r => r.TaskID);
            m.Field(r => r.TechID);
        })
        .Read("Vertical_Read", "Scheduler")
    )
)

 

public ActionResult Techs()
{
    List<Tech> techs = new List<Tech>
    {
        new Tech
        {
            TechName = "Jack",
            TechID = 1,
            Color = "#6eb3fa"
        },
        new Tech
        {
            TechName = "Lochlan",
            TechID = 2,
            Color = "#f58a8a"
        },
        new Tech
        {
            TechName = "Arefin",
            TechID = 3,
            Color = "#0583fa"
        },
        new Tech
        {
            TechName = "Faisal",
            TechID = 4,
            Color = "#9635a0"
        }
    };
 
    return Json(techs, JsonRequestBehavior.AllowGet);
}

 

public ActionResult Vertical_Read([DataSourceRequest] DataSourceRequest request)
{
    List<TaskViewModel> tasks = new List<TaskViewModel>
    {
        new TaskViewModel {
            TaskID = 1,
            TechID = 2,
            Title = "Job 101",
            Start = new DateTime(2015, 5, 27, 20, 00, 00),
            End = new DateTime(2015, 5, 27, 20, 30, 00),
            Description = "Description 101",
            IsAllDay = false
        },
        new TaskViewModel {
            TaskID = 2,
            TechID = 1,
            Title = "Job 102",
            Start = new DateTime(2015, 5, 27, 21, 00, 00),
            End = new DateTime(2015, 5, 27, 21, 30, 00),
            Description = "Description 102",
            IsAllDay = false
        },
        new TaskViewModel {
            TaskID = 3,
            TechID = 3,
            Title = "Job 103",
            Start = new DateTime(2015, 5, 27, 20, 00, 00),
            End = new DateTime(2015, 5, 27, 20, 30, 00),
            Description = "Description 103",
            IsAllDay = false
        },
        new TaskViewModel {
            TaskID = 4,
            TechID = 4,
            Title = "Job 104",
            Start = new DateTime(2015, 5, 25, 1, 00, 00),
            End = new DateTime(2015, 5, 25, 1, 30, 00),
            Description = "Description 104",
            IsAllDay = true
        }
    };
 
    return Json(tasks.ToDataSourceResult(request));
}
 

 

Thanks in advance.

Vladimir Iliev
Telerik team
 answered on 26 Aug 2015
3 answers
769 views

Hi,

Can't figure out how to format a DateTimePicker dynamically in a grid.

Sample:

@(Html.Kendo().Grid<TheViewModel>()
    .Name("aGrid")
    .ToolBar(toolbar => toolbar.Create())
    .Columns(c =>
            {
                c.Bound(e => e.ID);
                c.Bound(e => e.Decimal).Format("{0:n5}");
                c.Bound(e => e.Stamp);
                c.Command(command => { command.Edit(); });
            })
 
    .Selectable(p => p.Mode(GridSelectionMode.Single))
    .Editable(editable => editable.Mode(GridEditMode.InLine))
    .DataSource(dataSource => dataSource
        .Ajax()
        .ServerOperation(true)
        .Model(model => model.Id(e => e.ID))
        .Create(create => create.Action("create", "Home"))
        .Read(read => read.Action("read", "Home"))
        .Update(update => update.Action("update", "Home"))
       )
)
 What I would like to do is something similar to this:

c.Bound(e => e.Stamp).Format("{0:#=kendo.culture().calendar.patterns.d#}");

 

Thanks

Rosen
Telerik team
 answered on 26 Aug 2015
3 answers
809 views

HI

 

Is there have a learning video forTelerik Reporting + MVC 5 (MVC 5, not MVC 4) like this :

Using Telerik Reporting in ASP.NET MVC 4 projects
https://www.youtube.com/watch?v=U2ZC9W9FYS0fs

 

The content of this old video is not works for MVC 5 (View Engine options for ASPX/Razor was removed).

 

Best regards

 

Chris

 

 

Chris
Top achievements
Rank 1
 answered on 26 Aug 2015
0 answers
132 views

I need to provide a Button like 'Add new record'  on Grid. On Click of that Button I need to display a Popup with displays rows from database in Grid. On selection of any row from Popup Grid I need to ​add that row to the Main Grid.

 

Please suggest me.

Mahendra
Top achievements
Rank 1
 asked on 26 Aug 2015
4 answers
1.9K+ views

is it possible to call a Jquery/Javascript function from an update ​section of a grid ?

 i want to perform some actions before calling the controller method, My code looks like below. Please help me

        dataSource: new kendo.data.DataSource({
            transport: {
                read:  {
                    url: crudServiceBaseUrl + "/Products",
                    dataType: "jsonp"
                },
                update: {
                    url: crudServiceBaseUrl + "/Products/Update",                                     // instead of URL i want to  call a custom Javascript function here
                    dataType: "jsonp"
                },

            },​

Naga
Top achievements
Rank 1
 answered on 25 Aug 2015
2 answers
115 views

Hello, I'm currently evaluating the controls for a project.  I'm currently able to display the grid and filter using regular filtering on the table.  I want to create a custom area in the page, using a collapsible panel where I add some textboxes and dropdown controls.  I want to use that panel to filter the grid. I haven't been successful yet. I understand that this can be done with js.  Are there any samples for a use like this?

 

Thanks for any help.

Atanas Georgiev
Telerik team
 answered on 25 Aug 2015
3 answers
185 views
I'm trying out Telerik for the first time but want to know what the plans are for MVC 6 and Visual Studio 2015.
Sebastian
Telerik team
 answered on 25 Aug 2015
4 answers
109 views

Hello,

 I have a problem in my grid, when i export to a excel file if i have filtered with a string that have spaces i lost the pagesize and i don't see data. The excel file is created but is empty. Only pass when i put in the filter a string with spaces.

 

Any idea?

Dimiter Madjarov
Telerik team
 answered on 25 Aug 2015
1 answer
278 views

I am trying to use the grid with a colorpicker to set a colorcode property on my model and even so the column is bound, I can never see the updated code when the model is sent to the controller.  I am using the standard in line editing function of the grid. (which manages to update teh model for simple properties.

CSHTML

@(Html.Kendo().Grid<Tetral.Services.Entities.AllocationPortfolioEntity>()
        .Name("grid")
        .Columns(columns =>
        {
            columns.Bound(p => p.ColourCode).Title("Colour").Width("84px").ClientTemplate("<span style='display: inline-block; width: 100%; height: 100%; background-color: #= ColourCode #'>&nbsp;</span>");
            columns.Command(m =>
            {
                m.Edit();
                m.Destroy();
            }).Width(260);    

        })
        .HtmlAttributes(new { style = "height:850px;width:100%" })
        .BindTo(@Model)
        .Scrollable(scr => scr.Enabled(true))
        .DataSource(dataSource => dataSource
            .Ajax()
            .Model(m => m.Id(p => p.Id))
            .Create(update => update.Action("AllocationPortfolioInsert", "DataManagement"))
            .Update(update => update.Action("AllocationPortfolioUpdate", "DataManagement"))
            .Destroy(update => update.Action("AllocationPortfolioDelete", "DataManagement"))
        )   

 

TEMPLATE

@model string
@(Html.Kendo().ColorPickerFor(m => m)
    //.Palette(ColorPickerPalette.Basic)
    .Name("ColourPicker")
    .Events(e => e.Change("colourPickerChange"))
)

 

MODEL

    private string colourCode;
        [UIHint("ColourPicker")]
        public string ColourCode
        {
            get { return colourCode; }
            set { this.colourCode = newValue;}
        }

Karl
Top achievements
Rank 1
 answered on 25 Aug 2015
1 answer
997 views

The control manages to bind and show the value from my model, but when I submit the form, the model in my controller does not show the updated value from the editor.

 

I have tried using a normal @Html.EditorFor() and this works as expected. (ie I see the updated value)

 

 @model GeneralDisclosureEntity

@using (Html.BeginForm("GeneralDisclosureTextUpdate", "DataManagement", FormMethod.Post, new { enctype = "multipart/form-data" }))
{    

    <div hidden="hidden">
        @Html.EditorForModel()
    </div>
    
            
    @(Html.Kendo().EditorFor(m => m.HTML)
          .Name("Content")
          .HtmlAttributes(new { style = "width:100%;height:440px" })
          .Encode(false)
          .Tools(t => t.Clear()
              .Bold()
              .Italic()
              .Underline()
              .Strikethrough()
              .JustifyLeft()
              .JustifyCenter()
              .JustifyRight()
              .JustifyFull()
              .InsertUnorderedList()
              .InsertOrderedList()
              .Indent()
              .Outdent())
    )

    <br />

  <button id="btnSubmit3" type="submit" style="float:right")>Save Text</button>
    
}

Alexander Popov
Telerik team
 answered on 25 Aug 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
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
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?