Telerik Forums
UI for ASP.NET MVC Forum
6 answers
964 views
Hi,
my company purchased Kendo UI for ASP.NET MVC, and i'm trying to use this ToDataSourceResult() extension method in order to make the paging on server for the grid just like the example on the site ,but i cannot find the kendo.UI.extensions namespace,or at least i installed the kendo extensions for VS and no such namespace,only Kendo.MVC.dll ,also i downloaded the telerik extensions for asp.net mvc,but there is no such method in \Extensions directory. What should i have to do in order to use this method?

thanks in advanced.
Petur Subev
Telerik team
 answered on 29 Jul 2013
1 answer
330 views
I have a list view that has a change event.  When an item in my list view is selected how can I get the "key" that i set for the item instead of the text displayed?

<script type="text/x-kendo-tmpl" id="ItemTemplate">
  <div style="margin:5px;">
    #:ItemNo# - #:Description#<br />
  </div>
</script>
<%: Html.Kendo().ListView<ItemList>()
.Name("Items")<br>  .TagName("div"
 .DataSource(ds =>
     ds.Read(read => read.Action("ItemListRead", "Home"))
       .Model(m => m.Id(i => i.ItemKey)))
 .ClientTemplateId("ProjectItemTemplate")
 .Selectable(s => s.Mode(ListViewSelectionMode.Single))
 .Events(events => events.Change("onChange"))
%>

<script type="text/javascript">
   function onProjectItemChange(e) {
      var selected = $.map(this.select(), function (item) {
         return $(item).text();
      });
   }
</script>


Dimiter Madjarov
Telerik team
 answered on 29 Jul 2013
1 answer
166 views
I have a scheduler control on a page. 

Html.Kendo().Scheduler<TaskViewModel>()
    .Name("MyScheduler")
    .Date(DateTime.Now)
    .Height(600)
    .Views(views =>
    {
        views.DayView();
        views.WeekView(weekView => weekView.Selected(true));
    })
    .DataSource(dataSource =>
        dataSource.Model(m =>
        {
            m.Id(o => o.Id);
        })
        .ServerOperation(true)
        .Read(read => read.Action("ReadSchedules", "Scheduler"))
    )
    .Editable(false)
Nothing fancy,  For the purpose of testing out the control, i'm using the TaskViewModel from the example project. At my company we have people in India who will create recurring schedules on this calendar. When I save the schedule's date/time, i'm storing it as a UTC value (just like your example project). The problem occurs when a user here in the  U.S. (Central Standard Time) views a recurring (weekly with specified days) schedule. India would create a 9:30 AM IST, recurring every Tuesday & Thursday and the duration is for 2 hours. When an Indian user reads the data back, the scheduler displays it just fine. When a user in the U.S. (CST) views it, we should expect to see a recurring meeting at 11:00 PM CST on Monday and Wednesday. Instead, the meeting is showing up at 11:00 PM CST on Tuesday and Thursday. Not only is it showing up on the wrong day, but the event shows up on the scheduler as if the duration of the meeting as zero.

I also noticed something else, when I save the schedule, I am able to save the StartTimezone and EndTimezone to the database, however, these fields are not members of the ISchedulerEvent interface. The scheduler control seems to lose these values when it is repopulated with data. How is the client control supposed to know how to properly convert from one timezone to another without that information? 


Georgi Krustev
Telerik team
 answered on 26 Jul 2013
1 answer
158 views
Downloaded the Sample projects for getting started with ASP.NET MVC, JSP and PHP Kendo UI Wrappers.
The \wrappers-getting-started-master\aspnetmvc\aspnetmvc-episode4\aspnetmvc-episode4\ site grid has visual anomalies when clicking on the Edit button (row edit). See attached files for before and after clicking the Edit button.
Environment: All OS and other updates are up-to-date as of 07/24/13.

Thx, Ivan
Vladimir Iliev
Telerik team
 answered on 26 Jul 2013
1 answer
111 views
I am having all kinds of issues with the MVC Grid control.

When I try and page to the next page in the grid I get the raw data instead of the HTML page with the grid displayed..See attachment.

Second, I cannot, for the life of me, get the filtering nor the grouping function to work. When I click the filter icon, nothing happens.

I haven't even got to ALL of the CRUD functionality. This is so frustrating.

I am using the newest release of the Kendo UI toolset and Entity Framework 5. I have created the model from the EDMX.

Please help!
Vladimir Iliev
Telerik team
 answered on 26 Jul 2013
2 answers
156 views
As the subject suggests I'm attempting to alter body width to match the width of the grid in cases where the grid ends up bigger than the body.  I'm attempting to do that by wiring up the databound event of the grid and then setting the width of the body.  However, the grid's width is returning smaller than it actually is so the body is still left behind. 

For example, I have a min-width set on the body element in css.  In this case it's 1100px.  The grid is reporting its width as smaller than that min-width (1088), yet the grid goes well past that width on the screen.  Here is the javascript I am trying to use to accomplish this.  Any suggestions?

$(function () {
        var grid = $(gridNameForEditors).data("kendoGrid");
        grid.bind("dataBound", function () {
            var grid2 = $(gridNameForEditors);
            alert(grid2.width());
            document.body.style.width = grid2.width() + "px";
        });
    })
Dimo
Telerik team
 answered on 26 Jul 2013
2 answers
273 views
Having the following code (stripped down version):
@using (Html.BeginForm(@"Store", @"Admin", FormMethod.Post))
{
    @(Html.Kendo().Grid((IEnumerable<MyModel>) ViewBag.MyItems)
         .Name(@"grid")
         .Columns(columns =>
         {
             columns.Bound(pg => pg.Id).Visible(false);
             columns.Bound(pg => pg.Name).Template(
                      c => Html.ActionLink(c.Name, @"Details", new {id = c.Id}));
             columns.Command(
                      commands => commands.Destroy().Text("Delete")).Title("Delete");
         })
         .Pageable()
         .Sortable()
         .DataSource(
              dataSource => dataSource
               .Server()
               .Model(model => model.Id(p => p.Id))
               .Destroy(d => d.Action(@"Item_Destroy", @"Admin")))
         )
}
I do experience the following (wrong) behavior:
  1. User clicks the "Delete" button.
  2. The "Store" action of the "BeginForm" is being called, instead of the "Item_Destroy" action.
My question:

What have I done wrong in my view?

Uwe
Top achievements
Rank 1
 answered on 26 Jul 2013
12 answers
241 views
See screenshot.

It was working before the update (which I have since rolled back).

The grid itself doesn't even have filter enabled, why is it passing undefined at all, which is what Kendo is hanging up on I'm guessing....
Sebastian
Telerik team
 answered on 26 Jul 2013
1 answer
197 views
Hi,
I have a DropDownList that is initially binded on the server side with BindTo method (I am using DropDownListFor).
On the client (JS code) I need to clear its items and then repoppulate the control with other items.
What is the best practice to accomplish this?

Thanks,
Lauri
Petur Subev
Telerik team
 answered on 26 Jul 2013
1 answer
187 views
I have a kendo grid that that uses a ClientDetailTemplate to display a second sub-grid.  The sub-grid has a variety of commands that are in the toolbar, including a Kendo Upload control.  

The problem is that the Kendo control is surrounded in a div, so it breaks the single line appearance of my toolbar.  Is there any way to change the Upload control so that it can be used inline with other controls?

Thanks,
~Logan
Dimiter Madjarov
Telerik team
 answered on 26 Jul 2013
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
Security
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
SegmentedControl
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?