Telerik Forums
UI for ASP.NET MVC Forum
3 answers
91 views
Hi!

We are having a single-page-application using asp.net mvc and creating views using razor. Creating several grids using the mvc-helper on a single view causes that the texts are transferred to the browser foreach grid. I have seen in this post https://github.com/loudenvier/kendo-global that it is possible to provide texts via javascript. But how can I prevent that the grid sends texts to the client?

Best regards!
Georgi Krustev
Telerik team
 answered on 06 Oct 2015
3 answers
245 views

Hi, 

Can you show me an example where a ListView or a Multiselect is inside an form. This form is called from a "grid" on next way .Editable(e => e.Mode(GridEditMode.PopUp).TemplateName("ProductorEdit"))

 

 

Thanks in advance

 

 

Xavier de la Rubia.

 

 

Boyan Dimitrov
Telerik team
 answered on 05 Oct 2015
1 answer
177 views

Starting with the Q3 release we've seen the following behavior for enum attributes that are bound to a dropdownlist.

  1.  Attribute in model is of type enum
  2. select values passed to the dropdownlist are of type IEnumerable<SelectListItem> with the value of the attribute set as selected.
  3. The dropDownList is populated using .BindTo so is loaded on page load
  4. When the form opens no value is selected in dropdown.  This happens in all cases where a dropdownlist is bound to an enum

I did some testing and found when I bound the dropdownlist to the integer that the enum represented, the dropdownlist worked as expected.  It seems that the control is no longer binding to enums as it did before (binding the value to the integer the enum represents).  Did something change that was undocumented in the Q3 release that caused this behavior?

Georgi Krustev
Telerik team
 answered on 05 Oct 2015
1 answer
70 views

Hello,

Tested on IE 10, Chrome and FF (latest version).

Write value in cell A1

Write formula in cell B1 as "=A1"

Clear value in cell A1 (focus on cell and press Delete)

Formula value remains the same.

 

Best Regards

Atanas Georgiev
Telerik team
 answered on 05 Oct 2015
1 answer
354 views

I have a batch edit grid that has a rate column, some of those rates are decimals and some are percentages. I have a column that specifies what datatype it should be. Currently, based on the object given from this command:

var grid = $("#myGrid").data("kendoGrid");
console.log(grid.dataSource.options.schema.model.fields.rate);

 The type is just a number for now. I know I can add data annotations to change that, but is there a way to do this dynamically and set individual cells to different data types? Either in Javascript or possibly a template?

Kiril Nikolov
Telerik team
 answered on 05 Oct 2015
1 answer
263 views

Hi,

I have a kendo grid displaying company data with parent-child relationship(parent company with multiple child companies). In grid I am grouping data on parentcompanyid column. But because of this grouping the grid does not show parentcompany data in grid except the parentcompanycode as group label. I want to display parent company data as a child row along with other child companies and it has to be displayed at the end of group list i.e. child companies first and then parent company. How can I achieve this?

Example:

Company                Loc           EmpCount

ABC - Parent company

PQR (child)             X                   30

XYZ (child)              X                   20

ABC(parent rec)      X                   10

                                       Total       60

Here though ABC is a parent company and group data but still it is shown as a separate entity in child list.

 

Thanks.

Nikolay Rusev
Telerik team
 answered on 05 Oct 2015
12 answers
953 views
Hi all,

I am having some odd issues with complex objects in my trial version of KendoUI complete for MVC.

I have a base entity class called Entity with the following 2 properties.
public Guid ObjectId { get; set; }
public DateTime CreatedOn { get; set; }

I then have 2 classes, Product and Category. Both inherit from Entity.
Product has a reference to a single category
public Category Category { get; set; }

My grid populates 100%.

The first issue I had was when displaying Category.CreatedOn. I was getting the JSON data instead of a date/time. Searching these forums found me an answer and I have it displaying correctly using the ClientTemplate method on the bound property.
When I make a change and post back the Product.CreatedOn is 100% and contains the value that it had originally in the read request. Category.CreatedOn is set back to 01/01/0001 00:00 which is invalid and causes my ModelState.IsValid check to fail.
This Category.CreatedOn value does however show in the grid correctly if I render the column after applying the ClientTemplate fix above.
If I set a new date in the grid for Category.CreatedOn, then this new value is persisted back to the server on update. The value is only lost if I don't alter it at all.

Am I making sense? Is there a fix for this?

I have been fiddling with DateTime types in the Grid since Thursday last week. Starting to feel real unproductive at the moment so some quick assistance would be appreciated.

TIA
Mike
Sven
Top achievements
Rank 1
 answered on 02 Oct 2015
1 answer
87 views

Hi,

We are needing to be able to send the contents of the kendo editor to the server on an intermittent basis for auto-save purposes as the user types in the editor.  I noticed that unless I stop typing and click away from the editor and it loses focus, the the editor's contents don't get committed to the textarea and thus don't get sent to the server.

Is there any way to programatically get the kendo editor to commit its data to the text area?

Thanks.

Alex Gyoshev
Telerik team
 answered on 02 Oct 2015
1 answer
178 views

I'm following the Virtualization demo at http://demos.telerik.com/aspnet-mvc/combobox/virtualization and get data back initially, however I notice that my request parameter is not being populated with what's sent to the server. Mainly the Filter property is null even though it's included in the request.

 Controller action: 

public JsonResult GetParentResellers([DataSourceRequest]DataSourceRequest request)
{
    //...
}

The only properties that have a value are PageSize, Page and Take.

I've attached an image of the ajax request that the Combobox sends to the server.

Georgi Krustev
Telerik team
 answered on 02 Oct 2015
1 answer
177 views

I have created two views ​Shipment and Shipment Lines,

The Shipment has the header info, and of course the lines is the details.  How do I have an action link form the parent grid to the child view, and pass the correct order Id (the model) to the line read action?

 This is the Shipment View:  

@(Html.Kendo().Grid<Portal.Model.DAX.PurchaseShipment>()
        .Name("Grid")
        .Columns(columns =>
        {
            columns.Bound(c => c.CompanyId).Width(160);
            columns.Bound(c => c.VendAccount).Width(120)
            columns.Bound(c => c.DeliveryMode).Width(120);
            columns.Bound(c => c.VendShipId).Width(120);
            columns.Bound(c => c.ShipmentDate).Width(140).Format("{0:MM/dd/yy}");
            columns.Bound(c => c.EstimateShipmentDate).Width(140).Format("{0:MM/dd/yy}");
            columns.Bound(c => c.SourceOfData).Hidden(true).IncludeInMenu(false);
            columns.Bound(c => c.RecVersion).Title("Rec Version").Hidden(true).IncludeInMenu(false);
            columns.Bound(c => c.RecId).Title("RecId").Hidden(true).IncludeInMenu(false);
            columns.Bound(c => c.CompanyId).ClientTemplate(@Html.ActionLink("Lines", "Lines", "Shipment", new { CompanyId = "#=CompanyId#", RecId = "#=RecId#" }, "").ToHtmlString()).Width(120);
            columns.Command(command => {
                command.Edit();
                command.Destroy();
 
            }).Width(180);
        })
        .ToolBar(toolbar =>
        {
            toolbar.Create().Text("Add Shipment").HtmlAttributes(new { @title = "Add Shipment" });
            toolbar.Excel();
        })
        .Editable(editable => editable.Mode(GridEditMode.PopUp))
        .DataSource(dataSource => dataSource
            .Ajax()
            .PageSize(20)
            .Model(model => model.Id(p => p.CompanyId))
            .Read(read => read.Action("Read", "Shipment").Type(HttpVerbs.Post))
            .Create(create => create.Action("Create", "Shipment").Type(HttpVerbs.Post))
            .Update(update => update.Action("Update", "Shipment").Type(HttpVerbs.Post))
            .Destroy(destroy => destroy.Action("Destroy", "Shipment"))
        )
    )

And the Lines View: (I know the model has the PurchaseShipment data, I had textboxes populating it for testing)

@using Portal.Model.DAX
@model PurchaseShipment
 
    @(Html.Kendo().Grid<Portal.Models.ShipmentLinesViewModel>()
      .Name("grid")
      .Columns(columns =>
      {
          columns.Bound(c => c.CompanyId);
          columns.Bound(c => c.ShipId);
          columns.Bound(c => c.PurchId);
          columns.Bound(c => c.PurchaseOrderId);
          columns.Bound(c => c.PurchaseOrderDate);
          columns.Bound(c => c.InventTransId);
          columns.Bound(c => c.LineNum);
          columns.Bound(c => c.ItemId);
          columns.Bound(c => c.UnitId);
          columns.Bound(c => c.QuantityOrdered);
          columns.Bound(c => c.QuantityShipped);
          columns.Bound(c => c.RecVersion);
          columns.Bound(c => c.RecId);
          columns.Command(command => { command.Edit(); }).Width(180);
      })
      .ToolBar(toolbar =>
      {
          toolbar.Excel();
      })
      .Editable(editable => editable.Mode(GridEditMode.InLine))
      .Pageable()
      .Sortable(sortable =>
      {
          sortable.SortMode(GridSortMode.MultipleColumn);
      })
      .Filterable()
      .Scrollable()
      .DataSource(dataSource => dataSource
          .Ajax()
          .Model(model => model.Id(p => p.CompanyId))
          .Read(read => read.Action("Lines_Read", "Shipment"))
          .Update(update => update.Action("Lines_Update", "Shipment"))
      )
    )

 

So the issue is that when the read for the lines happens it doesn't have the Shipment Model available so I can grab the correct line data.  How do I pass from one view to the next, and pass the model to the read action?

Boyan Dimitrov
Telerik team
 answered on 02 Oct 2015
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?