Telerik Forums
UI for ASP.NET MVC Forum
13 answers
275 views
I have upgraded to Q2 2014 and the install appears to work successfully. When I open my solution in visual studio and try and upgrade my project I get the following error show in attachment 1 when doing from the Telerik Menu option. And when right clicking on the project in the solution explorer there is no longer a telerik menu option to upgrade the kendo in the project.

A fix for would be greatly appreciated.
Momchil
Telerik team
 answered on 05 Sep 2014
7 answers
808 views
Is there a way to configure a combobox and a datasource using MVVM to have an initial value, but if the user starts typing in the box to go to the server and fetch all the remaining items from an MVC controller action that returns a JSON result?

I've tried doing an add to the datasource for the initial item, but that just keeps it from retrieving stuff from the server.  There also doesn't seem to be a built in event that would let me know that the user is trying to search (open doesn't fire if the user tabs in and starts typing unless the text is ALREADY in the data source).  I've also played with serverFiltering, but I just don't seem to have the right combination get what I'm after.  It would seem this is a common scenario where you put some data in a combobox, but avoid bringing down a list of things till a user really needs them.  Considering the number of look ups on  my screen, I do not want to load data for look ups that aren't going to be used by the user. 

In view:
<input id="assetCategoryId" name="assetCategoryId" elite-remaining-field="AssetCategory"
  data-role="combobox"
  data-auto-bind="false"
  data-placeholder="Select a status"
  data-value-primitive="true"
  data-text-field="text"
  data-value-field="id"
  data-bind="value: assetCategoryId, source: assetCategoryList" />

In the viewmodel:
assetCategoryId : 1,
assetCagetoryList:  null;

intialize : function(data) {
    viewModel.set('assetCategoryId', data.assetCategoryId);

    var ds = new kendo.data.DataSource({
           //serverFiltering: true,
           transport: {
          read: {
                url: "/dropdown/AssetCategory",
                dataType: "json"
           }
        }
    }); 

   // ds.add({ id: data.assetCategoryId,, text: data.assetCategoryText});
   viewModel.set('assetCategoryList', ds);
},


I fear that I'm going to have to wire all this up myself:
-- Ditch the datasource and use an array
-- Populate the array with my initial data
-- Tie into the keydown event of the combobox
-- Upon getting a keydown, check the length of the array, if it is 1 or less, go get the rest of my data; otherwise, do nothing.


d




Georgi Krustev
Telerik team
 answered on 05 Sep 2014
1 answer
148 views
Hi,

I am using telerik grid for mvc and I configured it for inline editing



Model Properties:
.......
 public string ErrorText { get; set; }
        public int Order { get; set; }
        public String Operator { get; set; }
..........

For the operator column in the above grid I want to use dropdown list with set of values coming from an enum list. User will select from list of operators and update the row. Could anyone guide me on implementing this.


Kiril Nikolov
Telerik team
 answered on 05 Sep 2014
1 answer
149 views
I have a grid that has multiple DropDownLists.   All of the DropDownLists are populated using the ViewData object.    In this case, I have a DropDownList that I would actually like it to populate multiple other columns in the Grid.    I am not sure how I can access the other information in the ViewData object.   So the Project_Key and the NameDesc columns in the model are for the dropdown.   But, the other columns Mgt_Unit_Key, Program_Key and Zone_Key are columns in the ViewData that I want to use to populate (default) other columns in the grid to.    How can I access these other columns in the ViewData and assign them to columns in the grid?

Here is the basics of my controller:
    public ActionResult TimecardIndex()
        {
            ViewData["Projects"] = this.projectservice.GetDropDownList();
            return View();
        }

The grid looks like:
@(Html.Kendo().Grid<IRISWeb.Models.CAS.Timecard>()
    .Name("Grid")
    .Columns(c =>
    {
        c.Command(command => { command.Destroy(); }).Width(120).Lockable(true).Locked(true);
        c.Bound(p => p.Task_Date).Width(120).Lockable(true).Locked(true).EditorTemplateName("IRISDate");
        c.ForeignKey(p => p.Activity_Key, (System.Collections.IEnumerable)ViewData["Activities"], "Activity_Key", "NameDesc").Width(350).Lockable(true);
        
        c.ForeignKey(p => p.Project_Key, (System.Collections.IEnumerable)ViewData["Projects"], "Project_Key", "NameDesc").Width(350);
        c.ForeignKey(p => p.ProjectSub_Key, (System.Collections.IEnumerable)ViewData["ProjectSubs"], "ProjectSub_Key", "NameDesc").EditorTemplateName("ProjectSub").Width(200);
        
        c.ForeignKey(p => p.Mgt_Unit_Key, (System.Collections.IEnumerable)ViewData["Mgt_Units"], "Mgt_Unit_Key", "NameDesc").Width(350);
        c.ForeignKey(p => p.Program_Key, (System.Collections.IEnumerable)ViewData["Programs"], "Program_Key", "NameDesc").Width(350);
        c.ForeignKey(p => p.Zone_Key, (System.Collections.IEnumerable)ViewData["Zones"], "Zone_Key", "NameDesc").Width(350);
        c.ForeignKey(p => p.Road_Key, (System.Collections.IEnumerable)ViewData["Roads"], "Road_Key", "FullRoadNumber").Width(200);
.....

The model for the ProjectDropDown returned by the GetDropDownList() is:
 public class ProjectDropDown
    {
        [Key]
        [ScaffoldColumn(false)]
        public string Project_Key { get; set; }

        [MaxLength(70)]
        [Display(Name = "Name")]
        public string NameDesc { get; set; }

        [MaxLength(10)]
        [Display(Name = "Mgt. Unit")]
        public string Mgt_Unit_Key { get; set; }

        [MaxLength(10)]
        [Display(Name = "Program")]
        public string Program_Key { get; set; }

        [MaxLength(10)]
        [Display(Name = "Zone")]
        public string Zone_Key { get; set; }

        [MaxLength(10)]
        [Display(Name = "Road")]
        public string Road_Key { get; set; }
    }





























































Alexander Popov
Telerik team
 answered on 05 Sep 2014
1 answer
113 views
Hi,

We are trying to use Jquery UI tabs within an MVC page that has a Kendo UI Grid, but the css
for the Jquery UI tab is not loading in IE8, we removed the grid and added the tabs alone that seems to be working
is there a conflict between Jquery UI and Kendo UI. Is there a work around for this issue

Thanks,
Annie
Vladimir Iliev
Telerik team
 answered on 05 Sep 2014
1 answer
219 views
Hello,

I'm trying to setup a panelbar that uses anglularjs library in their dynamically loaded panels. Unfortunately I was not able to make my angularjs controllers and ng attributes working in the loaded panels. The code below:

Index.cshtml
..

@(Html.Kendo().PanelBar()
    .Name("panelbar")
    .ExpandMode(PanelBarExpandMode.Single)
    .Items(panelbar =>
    {
        panelbar.Add().Text("About")
            .LoadContentFrom("About", "Home"); // About - Action, Home - controller
 
        panelbar.Add().Text("Contact")
            .LoadContentFrom("Contact", "Home");
    })
)


About.cshtml
<script src="~/Scripts/Controllers/AboutController.js"></script>
<div ng-controller="AboutController">
    {{ "this one is not working..." }}
</div>

AboutController.js
(function () {
    var app = angular.module("testPanel");
    var AboutController = function() {
        console.log('not working as it supposed to work ');
    }
    app.controller("AboutController", AboutController);
}());

The Anglular controllers and attributes are working fine outside the PanelBar. 
Thanks!
Alex Gyoshev
Telerik team
 answered on 05 Sep 2014
1 answer
230 views
Hello,

I'm trying to add some client side validation to the WYSIWIG Editor in MVC, however I cannot find any forum posts or docs with instructions on how to do this. I've tried basic unobtrusive validation but that obviously doesn't work because the textarea generated by KendoUI is set to hidden.

Can you please point me in the right direction on how to do this? I'd only like to do simple client side validation such as "Not Empty" etc.
Daniel
Telerik team
 answered on 05 Sep 2014
2 answers
335 views

Hi,

I am using kendo ui asp.net mvc.I have kendo grid with Virtualization support. Virtualization will load data on scroll. When grid has multiple pages at that time I can’t find records of previous page through JavaScript or Jquery and also I loss the state of previous record.

Is kendo ui providing progressive data load support in grid control?

In our application, we want to load data with progressive load like Silverlight.

For ex:

Case 1:

I have 500 total records and grid page size is 20.So I will get 20 records in each page. When I scroll for more record previous record must maintain in same state. If I select any record through checkbox and move down and again come bake top previous record must get with select state.

 Case 2:

 I have 500 total records and grid page size is 20.So I will get 20 records in each page. My filtering, sorting and search will perform on server or backend service side. In first page I select top 5 records out of 20.now I search diff record which is not available in first 20 records so I have to take that from service but when I back must found previous record with new record in select state.

How can I handle this type of situation without progressive load?        


digiben
Top achievements
Rank 1
 answered on 04 Sep 2014
3 answers
436 views
Hy,
I am using the CssClass and able to display one icon..on the treenode.

Using Style like so
.Item { background-position: 0 -272px; }

Now how can I show two Icons on the same Node ?

I see an example Image on the web here : http://www.telerik.com/clientsfiles/386203_Untitled.png?sfvrsn=0

Can anyone help ?

Thanks
sv
Rick Nguyen
Top achievements
Rank 1
 answered on 04 Sep 2014
1 answer
123 views
I have a grid where the first time I select an item from a DropDownList and tab out of the cell, the cell show dirty (red mark) but the cell blanks and does not show the selected item.   If I tab back into the cell and select an item from the DropDownList a second time, then the cell remembers the selection.   This happens on all DropDownList on the grid.    The following is my grid code:

@(Html.Kendo().Grid<IRISWeb.Models.CAS.Timecard>()
    .Name("Grid")
    .Columns(c =>
    {
        c.Command(command => { command.Destroy(); }).Width(120).Lockable(true).Locked(true);
        c.Bound(p => p.Task_Date).Width(120).Lockable(true).Locked(true).EditorTemplateName("IRISDate");
        c.ForeignKey(p => p.Activity_Key, (System.Collections.IEnumerable)ViewData["Activities"], "Activity_Key", "NameDesc").Width(350).Lockable(true);
        
        c.ForeignKey(p => p.Project_Key, (System.Collections.IEnumerable)ViewData["Projects"], "Project_Key", "NameDesc").Width(350);
        c.ForeignKey(p => p.ProjectSub_Key, (System.Collections.IEnumerable)ViewData["ProjectSubs"], "ProjectSub_Key", "NameDesc").EditorTemplateName("ProjectSub").Width(200);
        
        c.Bound(p => p.Crew_Num).Width(120);
        c.ForeignKey(p => p.Employee_Key, (System.Collections.IEnumerable)ViewData["Employees"], "Employee_Key", "EmployeeNumFullName").Width(350);
        c.Bound(p => p.Labor_Quantity).HtmlAttributes(new { style = "text-align: right" }).Width(120);
        c.ForeignKey(p => p.Pay_Type_Key, (System.Collections.IEnumerable)ViewData["Pay_Types"], "Pay_Type_Key", "NameDesc").Width(150);
        c.ForeignKey(p => p.Premium_Key, (System.Collections.IEnumerable)ViewData["Premiums"], "Premium_Key", "NameDesc").Width(150);
        c.Bound(p => p.Override_Labor_Rate).Format("{0:c}").HtmlAttributes(new { style = "text-align: right" }).Width(200);
        c.Bound(p => p.Production).HtmlAttributes(new { style = "text-align: right" }).Width(130);
        c.Bound(p => p.Equipment_Quantity).HtmlAttributes(new { style = "text-align: right" }).Width(150);
        c.ForeignKey(p => p.Equipment_Key, (System.Collections.IEnumerable)ViewData["Equipments"], "Equipment_Key", "NameDesc").Width(350);
        c.Bound(p => p.Equipment_Unit_Cost).Format("{0:c}").HtmlAttributes(new { style = "text-align: right" }).Width(120);
        c.Bound(p => p.Material_Quantity).HtmlAttributes(new { style = "text-align: right" }).Title("Mat. Qty").Width(120);
        c.ForeignKey(p => p.Inventory_Location_Key, (System.Collections.IEnumerable)ViewData["Inventory_Locations"], "Inventory_Location_Key", "NameDesc").Width(350);
        c.ForeignKey(p => p.UOM_Key, (System.Collections.IEnumerable)ViewData["UOMs"], "UOM_Key", "NameDesc").Width(100);
        c.Bound(p => p.Material_Description).Title("Mat. Description").Width(120);
        c.Bound(p => p.Material_Unit_Cost).Format("{0:c}").HtmlAttributes(new { style = "text-align: right" }).Title("Mat. Unit Cost").Width(150);
        c.ForeignKey(p => p.Resource_Item_Key, (System.Collections.IEnumerable)ViewData["Resource_Items"], "Resource_Item_Key", "Name").Width(350);
        c.Bound(p => p.OutSideServiceDescription).Width(120);
        c.Bound(p => p.OutSideService_Quantity).HtmlAttributes(new { style = "text-align: right" }).Width(100);
        c.Bound(p => p.OutSideServiceCost).Format("{0:c}").HtmlAttributes(new { style = "text-align: right" }).Width(120);
        c.ForeignKey(p => p.Mgt_Unit_Key, (System.Collections.IEnumerable)ViewData["Mgt_Units"], "Mgt_Unit_Key", "NameDesc").Width(350);
        c.ForeignKey(p => p.Program_Key, (System.Collections.IEnumerable)ViewData["Programs"], "Program_Key", "NameDesc").Width(350);
        c.ForeignKey(p => p.Zone_Key, (System.Collections.IEnumerable)ViewData["Zones"], "Zone_Key", "NameDesc").Width(350);
        c.ForeignKey(p => p.RBF_Key, (System.Collections.IEnumerable)ViewData["RBFs"], "RBF_Key", "NameDesc").Width(200);
        c.ForeignKey(p => p.Road_Key, (System.Collections.IEnumerable)ViewData["Roads"], "Road_Key", "FullRoadNumber").Width(200);
        c.ForeignKey(p => p.RoadName_Key, (System.Collections.IEnumerable)ViewData["RoadNames"], "RoadName_Key", "NameDesc").Width(200);
        c.Bound(p => p.Beg_Point).Width(120);
        c.Bound(p => p.End_Point).Width(120);
        c.Bound(p => p.FromLocation).Width(180);
        c.Bound(p => p.ToLocation).Width(180);
        c.ForeignKey(p => p.Reason_Key, (System.Collections.IEnumerable)ViewData["Reasons"], "Reason_Key", "NameDesc").Width(200);
        c.Bound(p => p.Comments).Width(280);
        c.Bound(p => p.EquipmentMiles).HtmlAttributes(new { style = "text-align: right" }).Width(100);
        c.Bound(p => p.EquipmentHours).HtmlAttributes(new { style = "text-align: right" }).Width(100);
        c.Bound(p => p.User1).Width(120);
        c.Bound(p => p.User2).Width(120);
        c.Bound(p => p.User3).Width(120);
        c.Bound(p => p.User4).Width(120);
        c.Bound(p => p.User5).Width(120);
        c.Bound(p => p.User6).Width(120);
        c.Bound(p => p.User7).Width(120);
        c.Bound(p => p.User8).Width(120);
        c.Bound(p => p.User9).Width(120);
        c.Bound(p => p.User10).Width(120);
        c.Bound(p => p.FuelImport).HtmlAttributes(new { style = "text-align: center" }).ClientTemplate("<input type='checkbox' #=FuelImport ? checked='checked' : '' #></input>").Width(200);
        c.Bound(p => p.Error_Message).Width(220);
        c.Bound(p => p.DateStamp).Title("Last Modified").Format("{0: MM/d/yyyy hh:mm:ss}").Width(175);
        c.ForeignKey(p => p.SecurityUser_Key, (System.Collections.IEnumerable)ViewData["SecurityUsers"], "SecurityUser_Key", "UserName").Title("IRIS User").Width(140);
    })
    .ToolBar(toolBar =>
    {
        toolBar.Create();
        toolBar.Save();
    })
    .Editable(editable => editable.Mode(GridEditMode.InCell))
    .Filterable()
    .Pageable(pageable => pageable
        .Refresh(true)
        .PageSizes(true)
        .ButtonCount(5))
    .Navigatable()
    .Sortable()
    .Scrollable(a => a.Height("auto"))
    .Resizable(resize => resize.Columns(true))
    .Reorderable(reorder => reorder.Columns(true))
    .ColumnMenu(m =>
    {
        m.Enabled(true);
        m.Filterable(true);
        m.Sortable(true);
        m.Columns(true);
    })
    .DataSource(ds => ds
        .Ajax()
        .Batch(true)
        .ServerOperation(true)
        .PageSize(20)
        .Events(e => 
        {
            e.Error("error_handler");
            //e.Change("onChange");
        })
        .Sort(s => s.Add(t => t.Task_Date))
        .Model(model =>
        {
            model.Id(m => m.Timecard_Key);
            model.Field(m => m.Equipment_Unit_Cost).Editable(false);
            model.Field(m => m.UOM_Key).Editable(false);
            model.Field(m => m.FuelImport).Editable(false);
            model.Field(m => m.DateStamp).Editable(false);
            model.Field(m => m.SecurityUser_Key).Editable(false);
            model.Field(m => m.SecurityUser_Key).DefaultValue(ViewData["defaultSecurityUser"]);
            model.Field(m => m.Timecard_Key).DefaultValue("1600000000");
            model.Field(m => m.DateStamp).DefaultValue(DateTime.Now);
        })
        .Read(r => r.Action("Read", "Timecard").Type(HttpVerbs.Get))
        .Create(c => c.Action("Create", "Timecard").Type(HttpVerbs.Post))
        .Update(u => u.Action("Update", "Timecard").Type(HttpVerbs.Post))
        .Destroy(d => d.Action("Destroy", "Timecard").Type(HttpVerbs.Post))

    )

)

<script>
    function error_handler(e) {
        if (e.errors) {
            var message = "Errors:\n";
            $.each(e.errors, function (key, value) {
                if ('errors' in value) {
                    $.each(value.errors, function () {
                        message += this + "\n";
                    });
                }
            });
            alert(message);
        }
    }

    function onChange(e) {
        if (e.action == "itemchange") {
                switch (e.field) {
                    case "Project_Key":
                        var model = e.items[0];
                        model.set("ProjectSub_Key", "");
                        break;
                    case "Inventory_Location_Key": 
                        var model = e.items[0];
                        model.set("UOM_Key", "");
                        break;
                };
        }
     
    }

 
    function filterProjectSubs() {
        var model = getCurrentEditedModel();
        return {
            Project_Key:model.Project_Key
        };
    }

    function filterInventoryUOM() {
        var model = getCurrentEditedModel();
        return {
            Inventory_Location_Key: model.Inventory_Location_Key
        };
    }

    function getCurrentEditedModel() {
        var grid = $("#Grid").data("kendoGrid");
        var editRow = grid.tbody.find("tr:has(.k-edit-cell)");
        return grid.dataItem(editRow);
    }


</script>
Kiril Nikolov
Telerik team
 answered on 04 Sep 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
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
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
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?