Telerik Forums
UI for ASP.NET MVC Forum
5 answers
447 views

I would like to be able to auto expand (or just increase) the row height on the Scheduler month view to accommodate days that have multiple events.  Right now it gets cut off and you have to switch to day view to see all the events.  Is there a CSS style tag I can change to adjust this?

Magdalena
Telerik team
 answered on 04 Apr 2016
2 answers
147 views

I'm hoping this is possible as we are allowing end users to optionally set the min and max value axis amounts. I would like the chart itself to set either or both the Min or Max if the decimal? field is null. Right now I'm using the following code snippet:

.ValueAxis(x => x.Numeric()
        .Min(Model.YAxisRangeMin.GetValueOrDefault())
        .Max(Model.YAxisRangeMax.GetValueOrDefault()))

 This works fine if the decimal? fields have values, but if they are null, the defaults are set to 0, which is not good.

Problem is, I really only want to set a Min/Max value if it is not null. Any ideas how to do that within the control? Am I going to have to calculate the max on the server and use that as the default for the YAxisRangeMax if null? Min as 0 is fine.

Thanks!

Daniel
Telerik team
 answered on 04 Apr 2016
12 answers
511 views

I am at a loss on this. <br> I am trying to add a Kendo dropdown user control to a column in my kendo grid.

My View Model:

    public class MainViewModel
        {
            [Display(Name = "Main")]
            [Required]
            public string Main1 { get; set; }
            public string Description { get; set; }
            [UIHint("CustomerList")]
            public CustomerViewModel Customer { get; set; }
        }

    public class CustomerViewModel
    {
        public string CustomerID { get; set; }
        public string CustomerName { get; set; }
    }

My Grid looks like:

    @(Html.Kendo().Grid<Test.Models.MainViewModel>()
            .Name("mainGrid")
            .Columns(col =>
            {
                col.Bound(x => x.Main1);
                col.Bound(x => x.Customer).ClientTemplate("#=Customer.CustomerName#").Width(180);               
                col.Bound(x => x.Contact1);
                col.Command(x => { x.Edit(); x.Destroy(); });
            })
    )

The Customer displays in the grid however when I go to add/edit I do not see that column.  I don't believe that its calling my user control.  <br>I am not sure why.

This user control is in the Views folder.  I also tried moving it into the Views>Shared and the Views>Shared>DisplayTemplate folder.

My user control:

    <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Main.Models.CustomerViewModel>" %>
   
    <%= Html.Kendo().DropDownListFor(m => m)
            .DataValueField("CustomerID")
            .DataTextField("CustomerName")
            .BindTo((System.Collections.IEnumerable)ViewData["customers"])
    %>   

This is almost identical to the Kendo example they provide with the only difference is that they have areas setup in their project and I do not.

Ivan Danchev
Telerik team
 answered on 04 Apr 2016
9 answers
1.0K+ views

This is probably a really ignorant question but I'm trying to make my Popup Editor Template 4 columns wide vs the default 2.  I have looked at this --> custom-popup-editor and this -->Forum Search

 

Ideally I could use Bootstrap to setup that template however I wish but I cannot get the very basic `<div class="row"> <div class="col-md-4">` to work.  I am currently looking at this --> Kendo and Bootstrap Docs to try and make that work.

 

At the end of the day I just need to be able to make my Popup Editor 4 columns wide(i.e. label - editor - label - editor)  Don't care how I get there.

 

This is my Editor Template, _Staff.cshtml, and below that is the Index.cshtml that has the Grid that calls it.

@model MyApp.Models.StaffViewModel
 
    @Html.HiddenFor(m => m.StaffID)
 
    <div class="row">
        <div class="col-lg-2">
            @Html.LabelFor(m => m.GPEmployeeID)
        </div>
        <div class="col-lg-4">
            @Html.EditorFor(m => m.GPEmployeeID)
            @Html.ValidationMessageFor(m => m.GPEmployeeID)
        </div>
 
        <div class="col-lg-2">
            @Html.LabelFor(m => m.FirstName)
        </div>
        <div class="col-lg-4">
            @Html.EditorFor(m => m.FirstName)
            @Html.ValidationMessageFor(m => m.FirstName)
        </div>
    </div>

 

@(Html.Kendo().Grid<MyApp.Models.StaffViewModel>()
      .Name("grid")
      .Columns(columns =>
      {
          columns.Bound(c => c.GPEmployeeID);
          columns.Bound(c => c.UserID);
          columns.Bound(c => c.LastName);
          columns.Bound(c => c.FirstName);
          columns.ForeignKey(c => c.PrimaryCountyID,(System.Collections.IEnumerable)ViewData["Counties"],"CountyID","CountyName");
          columns.Bound(c => c.WorkPhone);
          columns.Bound(c => c.WorkEmail);
          columns.ForeignKey(c => c.OfficeID,(System.Collections.IEnumerable)ViewData["Offices"],"OfficeID","OfficeName");
          columns.ForeignKey(c => c.StaffTypeID,(System.Collections.IEnumerable)ViewData["StaffTypes"],"StaffTypeID","StaffType");
          columns.Command(command => { command.Edit(); command.Destroy(); }).Width(110);
      })
      .ToolBar(toolbar => {
          toolbar.Create();
      })
      .ColumnMenu()
      .Editable(editable => editable.Mode(GridEditMode.PopUp).TemplateName("_Staff"))
      .Pageable()
      .Groupable()
      .Sortable(sortable => {
          sortable.SortMode(GridSortMode.SingleColumn);
      })
      .Filterable(ftb => ftb.Mode(GridFilterMode.Menu))
      .Scrollable(scrollable => scrollable.Enabled(false))
      .DataSource(dataSource => dataSource
          .Ajax()
          .Model(model =>
          {
              model.Id(p => p.StaffID);
              model.Field(p => p.StaffID).Editable(false);
          })
          .Read(read => read.Action("tblStaffExtendeds_Read", "TStaff"))
          .Create(create => create.Action("tblStaffExtendeds_Create", "TStaff"))
          .Update(update => update.Action("tblStaffExtendeds_Update", "TStaff"))
          .Destroy(destroy => destroy.Action("tblStaffExtendeds_Destroy", "TStaff"))
           
      )
)

Dimiter Madjarov
Telerik team
 answered on 04 Apr 2016
2 answers
93 views

I have a grid similiar that. But I don't want to close pop-up window; after clicking Update Button, i want to save record and clear all (or some) fields and continue to create (other) new record. So user can re-insert new record rapidly (multiple insert in the same window).

Finally user click the "cancel" (or close) button and popup will be closed. How can I do that.

Radoslav
Telerik team
 answered on 04 Apr 2016
2 answers
262 views

Hi, sorry if this is documented somewhere but I didn't find it.  Is it possible to do client side paging with the listview so the entire dataset is stored on the client-side? 

 

Reason I ask is I have one item per page and always in "Edit" mode.  When I change pages any changes are lost, unless I save it to DB automatically when paging, which I want to avoid.  I'd like to be able to have the entire dataset on the client-side and changes saved client-side only.  Is there an out of the box way to do this? 

Kjell
Top achievements
Rank 1
 answered on 02 Apr 2016
3 answers
233 views

In javascript, based on user selection, I want to dynamically change grid datasource, reading data from controller. sample codes below

        var data = $('#MarketDrivers').data('kendoTreeView').dataItem(e.node);
        //chart2.setDataSource(ds2);

        var gd = $("#grid").data("kendoGrid");
        var ds3 = new kendo.data.DataSource({
            transport: {
                read: {
                    type: "POST",
                    url: "/Blotter/getIDView",
                    data: { factorID_: data.id },
                    dataType: "jsonp"
                }
            }
        });
        gd.setDataSource(ds3);

 

This controller action will be triggered, but the grid will show "No items to display".  My controller action is like below...

 

        public ActionResult getIDView([DataSourceRequest] DataSourceRequest request, int? factorID_)
        { 
            List<PersonView> li = new List<PersonView>();
            //some code here...
            return Json(li.ToDataSourceResult(request));
        }

Anyone knows what's wrong here? Thanks

 

 

Dimiter Madjarov
Telerik team
 answered on 01 Apr 2016
4 answers
267 views

Hi!

In the Timeline Demo, it shows 2 rooms and 3 attendees. When the data is plotted, it shows the color of the rooms assigned in the Resource. Is it possible to display the color that is associated with the attendees instead?

 

Chuck

Chuck
Top achievements
Rank 1
 answered on 01 Apr 2016
2 answers
117 views

I am using custom binding and have followed this documentation http://docs.telerik.com/kendo-ui/aspnet-mvc/helpers/grid/custom-binding

I read the data from a database, I am wondering if there is a way NOT to do this every time the user goes to a new page, changes the sorting, filtering, page size etc?

 

Regards, Jill-Connie Lorentsen

Rosen
Telerik team
 answered on 01 Apr 2016
3 answers
155 views

We are using the GridRouteValues() to save the user's preferred page size for grids.

When the Export to Excel function is used with the All Pages option set to True, it sets the PageSize in the RouteValues to the total rows to be exported.  This causes our saved user's page size to be set to that value.  We don't want to save that PageSize when it's for the Export to Excel, but I can't see a way to distinguish that call to the controller from the others.

Any ideas?

Dimiter Madjarov
Telerik team
 answered on 01 Apr 2016
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
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?