Telerik Forums
UI for ASP.NET MVC Forum
1 answer
141 views
Hi, From one of the example in kendo documentation, when i am trying the same i am unable to bind the data to the scheduler ui, it shows no error but only 500 internal server error. here is my code, I am using mvc 3 razor with EF.

public class Projection : ISchedulerEvent
    {
        public string Title { get; set; }
        public DateTime Start { get; set; }
        public DateTime End { get; set; }
        public string Description { get; set; }
        public bool IsAllDay { get; set; }
        public string Recurrence { get; set; }
        public string RecurrenceRule { get; set; }
        public string RecurrenceException { get; set; }

        public string EndTimezone { get; set; }
        public string StartTimezone { get; set; }
    }

[HttpGet]
        public ActionResult Read()
        {
            List<Projection> cinemaSchedule = new List<Projection> {
                new Projection {
                    Title = "Fast and furious 6",
                    Start = new DateTime(2014,3,31,17,00,00),
                    End= new DateTime(2014,3,31,18,30,00)
                },
                new Projection {
                    Title= "The Internship",
                    Start= new DateTime(2014,3,31,14,00,00),
                    End= new DateTime(2014,3,31,15,30,00)
                },
                new Projection {
                    Title = "The Perks of Being a Wallflower",
                    Start =  new DateTime(2014,3,31,16,00,00),
                    End =  new DateTime(2014,3,31,17,30,00)
                }};
            return Json(cinemaSchedule, JsonRequestBehavior.AllowGet);
        }

@(Html.Kendo().Scheduler<Uco.Models.Projection>()
    .Name("scheduler")
    .Date(new DateTime(2014, 3, 31))
    .StartTime(new DateTime(2014, 3, 31, 7, 00, 00))
    .Height(600)
    .Views(views =>
    {
        views.DayView();
        views.WeekView(weekView => weekView.Selected(true));
        views.MonthView();
    })
    .Timezone("Etc/UTC")
    .BindTo(Model)
)

Can any one help with where i am wrong. I am new to telerik. Thanks in advance




Georgi Krustev
Telerik team
 answered on 02 Apr 2014
1 answer
97 views
Hi i am new to telerik, i am very much confused how to use telerik scheduler controll in my MVC 3 project. I am using Razor for developing my project. Can any one please give any reference of step by step procedure for integrating scheduler in my project.
Thanks in advance..
Atanas Korchev
Telerik team
 answered on 02 Apr 2014
1 answer
167 views
Although the UI for ASP.NET MVC Grid ships with a set EditorTemplates out of the box, there does not appear to be an EditorTemplate for guids.

There are EditorTemplates for integer, number, currency, etc but not for guid.

Any reason why there is not any official Telerik EditorTemplate for guids?

So what's Telerik's recommended best practice?  Create our own EditorTemplate?  Convert back/forth between guids and strings in our ViewModels?
Atanas Korchev
Telerik team
 answered on 02 Apr 2014
3 answers
336 views
Hi,

I am having problems getting the GeoJSON map example working. I have used the same code and there are no errors and the navigation icons on top left are displayed but I can't see any map. The map control works perfectly for Bing so I know that is working.

I assume the issue is related to JSON file I am using. Can I please get a download of the GeoJSON file "~/Content/dataviz/map/countries-users.geo.json" used the example? or a download of the example GeoJSON project.

I am using IE10 latest KendoUI and VS2012.

Thanks

Rob
T. Tsonev
Telerik team
 answered on 01 Apr 2014
10 answers
1.1K+ views
Can the upload control be used in an ajax form within a partial view?  If so can I have an example?  I can make the upload work on a html form but in the ajax form the controller method that is being posted to receives a NULL for the HttpPostedFileBase file parameter.
Stephen
Top achievements
Rank 1
 answered on 01 Apr 2014
3 answers
142 views
This feels like it should be a simple question, but I can't find the answer anywhere.

If a user clicks the remove button (x) on the only file in an upload list, the file is removed from the list and the 'upload' button is hidden. How can I simulate this?

I'm overriding the 'onselect' event and checking for existing files in a directory. If the user selects 'no, I don't want to replace the existing file', I'm removing the item from the upload list successfully, but if it's the only file in the list, I'm left with the button and a border around the empty list.

Thanks in advance.
Dimiter Madjarov
Telerik team
 answered on 01 Apr 2014
3 answers
287 views
I tried this solution (http://www.telerik.com/support/code-library/submit-form-containing-grid-along-with-other-input-elements), for posting a grid inside an html forum and work correctly.
But if I have a grid with checkboxes I don't understend how I can the true or false value.

I've tried this solution, but doesn't work.

columns.Bound(p => p.Inside).ClientTemplate(
"<input type='checkbox' #= (Inside=== true) ? checked : '' # />" +
"<input type='hidden' name='CAB[#= indexCAB(data)#].Inside' value='#= Inside#' />");

Someone can help me.

Thanks
Daniel
Telerik team
 answered on 01 Apr 2014
1 answer
279 views
Hi,

I have the following kendo grid in my page:

@(Html.Kendo().Grid<Di.Service.Tracking.Models.DomainObjects.DTrackingFileEvent>()
 .Name("fileAuditing")
 .Columns(columns =>
{
columns.Bound(c => c.IsError);
columns.Bound(c => c.EventDateTime).Title(@Di.Nls.Label.Event_Date_Time);
columns.Bound(c => c.Details).Title(@Di.Nls.Label.Details);
columns.Bound(c => c.Description).Title(@Di.Nls.Label.Description);
columns.Bound(c => c.Result).Title(@Di.Nls.Label.Result);
})
.ClientRowTemplate(
"<tr bgcolor=#:IsError ? 'Pink' : 'White'# data-uid='#: uid #'>" +
  "<td>" +
  "# if(IsError == true) {# " +
"<img src='/Images/FileState/Error.gif' />" +
"#} else {# " +
"<img src='/Images/FileState/Ok.gif' />" +
"#}#" +
  "</td>" +
  "<td>#: EventDateTime #</td>" +
  "<td>#: Details #</td>" +
  "<td>#: Description #</td>" +
  "<td>#: Result #</td>" +
"</tr>"
)
.DataSource(dataSource => dataSource
.Ajax()
.Model(model => model.Id(p => p.ID))
.Read(read => read.Action("FileAuditingDetails", "FileDetails", new { iFileID = iFileID }))
.Events(e=>e.RequestEnd("onRequestEnd"))
)
)

<script>
function onRequestEnd(e) {
  //do something with event date time
}
</script>

My goal is to format the "Event date time" column so it provides a value based on the user time zone info. In order to do that I wanted to handle the "requestEnd" event, but when I do that I cannot see any data on the grid.

Removing the following line .Events(e=>e.RequestEnd("onRequestEnd")) load all the data correctly.

Any ideas how to achieve my goal?
Alexander Popov
Telerik team
 answered on 01 Apr 2014
1 answer
176 views
Hi there,

I am just getting to grips with WebApi and how to use them with the MVC wrappers. But I am at a loss on how to ensure that the authentication is working correctly as part of the project.

My scenario is I have front end website (www.myfrontendwebsite.com) which is running on one server and then I have the service website with all my Business logic running on a webapi back end website (www.mywebapiwebsite.com) this may/ may not be running on a separate website.

I am forcing my users to log in to ensure that they can access only the parts of the sites they should have.

Obviously with the web api project this needs to be protected as well so I need the user to be authenticated.

Now I am  trying to do something like this with a combobox:


Html.Kendo().ComboBox()
.Name("DateSetup")
.Suggest(true)
.Filter(FilterType.Contains)
.DataSource(data =>
{
data.Read(read => read.Url("http://localhost:59236/api/GenericReport/GetDateFilterTypes"));
})
.Placeholder("Select date setup")


so I know I need to add some additional information to the header that is being provided but how can I do that from the read.Url method? Do I do this via adding .Data afterwards or is there another way of do it.

I have already enabled CORS to work as this works when I an using allow annoynomous.

Thanks in advance.


                      .HtmlAttributes(new { style = "min-width:100%;" })

Daniel
Telerik team
 answered on 01 Apr 2014
5 answers
375 views
I have a kendo grid which uses server binding. I need to implement batch update in the same. How can i proceed for this.
Below is the example of grid I am using.

@(Html.Kendo().Grid(Model) // Bind the grid to the Model property of the view
.Name("Grid")
.Columns(columns =>
{
columns.Bound(p=> p.addressId).Hidden(true);
columns.Bound(p=> p.Name).Title("Name");
columns.Bound(p=> p.Phone);
)
.Pageable() //Enable paging
.ToolBar(commands => commands.Create())
//Editable(editable => editable.Mode(GridEditMode.Inline))
.DataSource(dataSource => dataSource
.Server()
//.Batch(true)
// Configure CRUD -->
.Model(model => model.Id(p => p.ContactId))
.Create(create => create.Action("Create", "Home"))
.Read(read => read.Action("Index", "Home"))
.Update(update => update.Action("Update", "Home"))
.Destroy(destroy => destroy.Action("Destroy", "Home"))
// <-- Configure CRUD
)
.DetailTemplate(...)
)

Now i want to have a button, on click of which the data in the grid could be updated. What is the best way to proceed with this.
Batch(true) is not working with Server()?
Petur Subev
Telerik team
 answered on 31 Mar 2014
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
MultiColumnComboBox
Dialog
DropDownTree
Checkbox
Slider
Switch
Notification
Accessibility
ListView (Mobile)
Pager
ColorPicker
DateRangePicker
Wizard
Security
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
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?