Telerik Forums
UI for ASP.NET MVC Forum
1 answer
255 views
I want to implement master - details concept in asp.net mvc with kendoui.

Basically I have one mvc view to capture master record info. In the same view I want to add multiple detail records using kendo grid (like invoice).

I have successfully achieved the master entry part but details are not saved. I have checked the controller action method the child entities are not added in the master entity. It always shows as empty list.

I am using EF 5 and MVC 4 with Unit Of Work pattern. I am new to these technologies. I would appreciate if someone help to solve this problem.
Daniel
Telerik team
 answered on 16 Jan 2013
6 answers
249 views
Hello, 

We would like to use Aggregates with ListView. We have been able to get it working with Grid but not ListView.

<script type="text/x-kendo-tmpl" id="template">
    <div class="product">
        <img src="@Url.Content("/")${ImagePath}.jpg" alt="${Name} image" />
        <h3>${Name}</h3>
        <dl>
            <dt>Price:</dt>
            <dd>${kendo.toString(Price, "c")}</dd>
            <dt><input type="button" value="Remove"/></dt>
        </dl>
    </div>
    <div>
        <h3>Total price: ?????</h3>
    </div>
</script>
 
@(Html.Kendo().ListView<SixthCoffee.Web.ViewModels.CartItem>()
    .Name("CartList")
    .TagName("div")
    .ClientTemplateId("template")
    .DataSource(dataSource => {
        dataSource.Read(read => read.Action("AjaxCartGrid_Read", "MenuSurface"));
        dataSource.Aggregates(aggregates =>
            {
                aggregates.Add(s => s.TotalPrice).Sum();
            });
    })
             
)
Any help will be greatly appreciated.

Thanks,
Padmaja
Nikolay Rusev
Telerik team
 answered on 16 Jan 2013
6 answers
418 views
Hi,

I'm having this problem that only happens in a particular situation. If I have a grid with only one row and I try to delete it, there is a javascript error here.

l._current.closest("table")[0].focus()
Unhandled exception at line 16, column 31418 in http://localhost/zzz/Scripts/kendo/2012.3.1114/kendo.web.min.js
0x800a138f - Microsoft JScript runtime error: Unable to get value of the property 'closest': object is null or undefined

When there is more than one row on the grid, deletes work perfectly fine. I believe it might have to do with the grid trying to set focus to the closest row available...when there are no rows available at all. This is what I'm using to generate the grid. Thanks in advance.

@(Html.Kendo().Grid<MyNamespace.MyModel>()
      .Name("myGrid")
      .Columns(columns =>
      {
          columns.Bound(c => c.Name);
          columns.Command(c =>
          {
c.Edit();
               c.Destroy();           });       })       .ToolBar(toolbar => {             toolbar.Create();             })       .Sortable()       .Selectable()       .Reorderable(r => r.Columns(true))       .Resizable(r => r.Columns(true))       .Navigatable()       .Filterable()       .Scrollable(scroll => scroll.Height(500))       .Editable(editable => editable.Mode(GridEditMode.InLine))       .DataSource(dataSource => dataSource         .Ajax()         .Read(read => read                     .Type(HttpVerbs.Get)                     .Url(Url.RouteUrl("DefaultApi"new { httproute = "", controller = "mycontroller" }))              )         .Create(create => create                     .Type(HttpVerbs.Post)                     .Url(Url.RouteUrl("DefaultApi"new { httproute = "", controller = "mycontroller" }))              )         .Update(update => update                     .Type(HttpVerbs.Put)                     .Url(Url.RouteUrl("DefaultApi"new { httproute = "", controller = "mycontroller" }))              )         .Destroy(destroy => destroy                     .Type(HttpVerbs.Delete)                     .Url(Url.RouteUrl("DefaultApi"new { httproute = "", controller = "mycontroller" }))              )         .Model(m => {                     m.Id(c => c.Id);                     }                )         .ServerOperation(false)) )

UPDATE: Since it was apparently just trying to find a row to focus, I added a check to see if the object was null. I wrapped
the call like this.
function(){if(l._current)l._current.closest("table")[0].focus();}

Seems to be working now for both a single row on the grid or multiple rows. Hope this gets fixed in a future release.
OmarOrnelas
Top achievements
Rank 1
 answered on 15 Jan 2013
1 answer
484 views
I want to show progress bar or disable save button in the toolbar while batch update. How do I do that ?
I am using KendoUI MVC grid.
Vladimir Iliev
Telerik team
 answered on 15 Jan 2013
2 answers
153 views
I have a telerik grid on a page with a custom Edit button for each row.  On click of the Edit button a Telerik Window opens which contains a partial view.  When I run it looks like this (the window opens to full size - size specified when created client side - and all content is visible):



However another user gets this (the modal is shrunk down so that all content is not visible and seems to be forced to fit within the width of the body set on the parent page).  I've enabled scrolling on the modal and the user doesn't see scrollbars and it still looks like below):



We're using the same browser (IE 9) and same resolution.  What could cause the Telerik window to shrink?
Dimo
Telerik team
 answered on 15 Jan 2013
2 answers
231 views
Hello,

is it possible to "select" the node which is currently selected? Right now the select-event doesn't trigger if the node is already selected. I need it to be triggered each time the user clicks on a node.

Thanks!
BigzampanoXXl
Top achievements
Rank 1
 answered on 15 Jan 2013
1 answer
184 views
When I view the Kendo Grid in Compatibility mode, if a cell is blank, there are grid lines missing - from the grid.  Is there a way to fix this?

Dimo
Telerik team
 answered on 14 Jan 2013
1 answer
122 views
Hi

in my ASP .NET MVC application I need to insert images inside the x-axis labels of a Bar Chart. Is it possible? If possible could you please share how to implement.

Thanks
Murthy
Hristo Germanov
Telerik team
 answered on 14 Jan 2013
1 answer
1.6K+ views
Hi,

first of all, this is how I implemented the NumericTextBox, bound to an integer:
@(Html.Kendo().NumericTextBoxFor(m => m.Number)
.Name("ntb")
.Format("n0")
.Min(1)
.Max(50)
)

My problem is:
As soon as I bind something against the NumericTextBox (when I use NumericTextBoxFor(...)), the value is never empty. It looks empty but as soon as the user clicks inside the TextBox the value of the bound integer (int.MinValue or whatever value the property has) is shown. First of all - the value (int.MinValue) makes no sense because the Min-property is set to 1. Secondly, why is there anything? The NumericTextBox should be empty, because I didn't set a value.

This problem causes, that the user has to delete the value first before he is able to insert something. On initialisation of the NumericTextBox it should be empty - but it should also be bound to a property.

Is there any workaround or solution for this problem? Hope someone can help me.
Daniel
Telerik team
 answered on 14 Jan 2013
1 answer
471 views

Hi, I've been looking at this for sometime and I've even tried a few example that apparently work but they don't for me.  All I want to do is say if ErrorCount > 0 then add a link similar to the WarningCount.  Just to get the basics up and running and following an example I simply want to say if ErrorCount > 0 then show 'Yes' otherwise show 'No'. For some reason it seems to ignore the ClientTemplate and just show the ErrorCount value.  Any ideas?? Please see the code below;

Many thanks.

Steve
@(Html.Kendo().Grid(Model)
    .Name("Grid")
    .HtmlAttributes(new { style = "height: 500px" })
    .Columns(columns =>
    {
        columns.Bound(p => p.ImportTypeName);
        columns.Bound(p => p.ImportedRecordCount);
        columns.Bound(p => p.FeedRecordCount);
        columns.Bound(p => p.ErrorCount).ClientTemplate("# if (ErrorCount > 0) { #" + "Yes" +
                "# } else { #" + "No" + "#}#");
 
        columns.Bound(p => p.WarningCount).Template(
       
 
  @<text>
<a href="@Url.Content("~/client/view/warnings/" + @item.ImportTypeID)">@item.WarningCount</a>
</text>);
 
 
        columns.Bound(p => p.CompletedOn);
 
    })
    .Sortable()
    .Scrollable()
    .Filterable()
 
)
Rosen
Telerik team
 answered on 14 Jan 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
Dialog
MultiColumnComboBox
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
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?