Telerik Forums
Kendo UI for jQuery Forum
0 answers
377 views
IF I use:

@(Html.Kendo().Grid<WebSiteHotelRazor.Models.ReportesModeloVentas>()
The grid doesn't return data but if I use:

If I use this it works
@model IEnumerable<WebSiteHotelRazor.Models.ReportesModeloVentas>
@(Html.Kendo().Grid(Model)

What am I missing?

Code that works:

@{
    ViewBag.Title = "Reporte";
}

 

@model IEnumerable<WebSiteHotelRazor.Models.ReportesModeloVentas>
          

<h1>Reporte de Ventas Año 2011</h1>

<p>
@(Html.Kendo().Grid(Model)

    .Name("GridAGQ")
    .Columns(columns =>
    {
        columns.Bound(p => p.Ano).Width(50).Title("Año").HeaderHtmlAttributes(new { @style = "text-align:center;font-weight:bold" });
        columns.Bound(p => p.PRODUCTO).Width(200).Title("Producto").HeaderHtmlAttributes(new { @style = "text-align:center;font-weight:bold" });
        columns.Bound(p => p.DESCRIPCION_PRODUCTO).Width(300).Title("Descripción del Producto").HeaderHtmlAttributes(new { @style = "text-align:center;font-weight:bold" });
        columns.Bound(p => p.SUBTOTAL_ENERO).Width(150).Title("Enero").Format("{0:#,###.00}").HtmlAttributes(new { @style = "text-align:right" }).HeaderHtmlAttributes(new { @style = "text-align:center;font-weight:bold" });
        columns.Bound(p => p.SUBTOTAL_FEBRERO).Width(150).Title("Febrero").Format("{0:#,###.00}").HtmlAttributes(new { @style = "text-align:right" }).HeaderHtmlAttributes(new { @style = "text-align:center;font-weight:bold" });
        columns.Bound(p => p.SUBTOTAL_MARZO).Width(150).Title("Marzo").Format("{0:#,###.00}").HtmlAttributes(new { @style = "text-align:right" }).HeaderHtmlAttributes(new { @style = "text-align:center;font-weight:bold" });
        columns.Bound(p => p.SUBTOTAL_ABRIL).Width(150).Title("Abril").Format("{0:#,###.00}").HtmlAttributes(new { @style = "text-align:right" }).HeaderHtmlAttributes(new { @style = "text-align:center;font-weight:bold" });
        columns.Bound(p => p.SUBTOTAL_MAYO).Width(150).Title("Mayo").Format("{0:#,###.00}").HtmlAttributes(new { @style = "text-align:right" }).HeaderHtmlAttributes(new { @style = "text-align:center;font-weight:bold" });
        columns.Bound(p => p.SUBTOTAL_JUNIO).Width(150).Title("Junio").Format("{0:#,###.00}").HtmlAttributes(new { @style = "text-align:right" }).HeaderHtmlAttributes(new { @style = "text-align:center;font-weight:bold" });
        columns.Bound(p => p.SUBTOTAL_JULIO).Width(150).Title("Julio").Format("{0:#,###.00}").HtmlAttributes(new { @style = "text-align:right" }).HeaderHtmlAttributes(new { @style = "text-align:center;font-weight:bold" });
        columns.Bound(p => p.SUBTOTAL_AGOSTO).Width(150).Title("Agosto").Format("{0:#,###.00}").HtmlAttributes(new { @style = "text-align:right" }).HeaderHtmlAttributes(new { @style = "text-align:center;font-weight:bold" });
        columns.Bound(p => p.SUBTOTAL_SEPTIEMBRE).Width(150).Title("Septiembre").Format("{0:#,###.00}").HtmlAttributes(new { @style = "text-align:right" }).HeaderHtmlAttributes(new { @style = "text-align:center;font-weight:bold" });
        columns.Bound(p => p.SUBTOTAL_OCTUBRE).Width(150).Title("Octubre").Format("{0:#,###.00}").HtmlAttributes(new { @style = "text-align:right" }).HeaderHtmlAttributes(new { @style = "text-align:center;font-weight:bold" });
        columns.Bound(p => p.SUBTOTAL_NOVIEMBRE).Width(150).Title("Noviembre").Format("{0:#,###.00}").HtmlAttributes(new { @style = "text-align:right" }).HeaderHtmlAttributes(new { @style = "text-align:center;font-weight:bold" });
        columns.Bound(p => p.SUBTOTAL_DICIEMBRE).Width(150).Title("Diciembre").Format("{0:#,###.00}").HtmlAttributes(new { @style = "text-align:right" }).HeaderHtmlAttributes(new { @style = "text-align:center;font-weight:bold" });
        columns.Bound(p => p.SUBTOTAL_TOTAL).Width(150).Title("Total").Format("{0:#,###.00}").HtmlAttributes(new { @style = "text-align:right;font-weight:bold" }).HeaderHtmlAttributes(new { @style = "text-align:center;font-weight:bold" });
    })
    .Groupable()
    .Scrollable()
    .Filterable()
    .Pageable()
    .DataSource(dataSource => dataSource
    .Ajax()
    .ServerOperation(false)
    .Read(read => read.Action("Products_Read", "Grid"))
    )
        )
        </p>
        <p>
        <input id="Submit1" type="submit" value="submit" /></p>
       

Adrian
Top achievements
Rank 1
 asked on 09 Aug 2012
3 answers
132 views
I am experiencing a strange issue where there is a random extra digit in the pager. See screenshot.  

Also here is the html generated if that helps.

<div class="k-pager-wrap k-grid-pager" data-role="pager">
<ul class="k-pager k-reset k-numeric">
<a class="k-link k-state-disabled" title="Go to the first page" href="#" data-page="1">
<a class="k-link k-state-disabled" title="Go to the previous page" href="#" data-page="1">
<ul class="k-pager-numbers k-reset">
<a class="k-link" title="Go to the next page" href="#" data-page="2">
<a class="k-link" title="Go to the last page" href="#" data-page="3">
<span class="k-pager-info k-label">1 - 10 of 28 items</span>
</div>

There appears to be a random UL with class='k-pager k-reset k-numeric' in the page?  Any ideas.

I have added a second pager to the page via

$("#somepager").kendoPager( { dataSource: gridDatasource });

and that one is fine.
MiBu
Top achievements
Rank 1
 answered on 09 Aug 2012
0 answers
145 views
How to show numeric column data in hundred-comma(eg:- 5,31,745) separator in kendoGrid?
I am using this in columns defination of kendoGrid:-
 {  
field: "Total", 
title: "Total Amount", 
template: '#= kendo.tostring(Total,"##,#") #'  
}

But it throw "Microsoft JScript runtime error: Invalid template:"
Navin
Top achievements
Rank 1
 asked on 09 Aug 2012
0 answers
121 views
How to show numeric column data in hundred-comma(eg:- 5,31,745) separator in kendoGrid?
Navin
Top achievements
Rank 1
 asked on 09 Aug 2012
0 answers
102 views
Hi everyone,

I am attempting to use the Editor control as an EditorTemplate for HTML as a test for a possible application where one important requirement is the possibillity to copy&paste elements from MS Word (most of the end users have this need).
As a huge fan of all the Telerik products, I downloaded the Kendo UI to try your amazing HTML Editor because I saw that all the requirements I needed related to copy&paste elements from MS Word were accomplished in your online demo page (http://demos.kendoui.com/web/editor/all-tools.html).
However, when I downloaded the Open SourceGPL v3 Web version of the page "all-tools.html" there are some elements that doesn't work when copied from MS Word (when they work in the online demo page).
The most important for me at this point to show to the possible client are the Ordered/Unordered list that worked online but not in the demo version.
This is a very important and urgent issue.Can anyone help me on this? Hope so!

Best Regards,
Gonçalo N.


Note: I also tested it on other browsers - Chrome 21.0.1180.60 m and I.E. 7,8 and 9
Nuno
Top achievements
Rank 1
 asked on 09 Aug 2012
1 answer
150 views
I am trying to create Kendo Menu like "Stores" menu in "Basic Usage" example (http://demos.kendoui.com/web/menu/index.html).

A little modification I have inside my "Stores" menu is a Kendo TabStrip.
Kendo TabStrip works great if it stands alone. But when put inside of a Kendo Menu, the styling mess up and the tab is not aligned horizontally anymore.

Is there an easy way to get around this?

Thanks! 
Kamen Bundev
Telerik team
 answered on 09 Aug 2012
2 answers
283 views

i want to use dataviz and web controls in the same page,so i add
<script src="kendo.web.min.js"></script>
<script src="kendo.dataviz.min.js"></script>

in my html page.

 when i creating kendogrid with datasource such as

var dataSource = new kendo.data.DataSource({
             transport: {
                 read:  {
                     url: "getOperatorsByOrg.do?format=json&orgid=2",
                     dataType: "json"
                 }
             },
             batch: true,
             pageSize: 30,
             schema: {
              model: {
                   fields: {
                    userid: { editable: false, nullable: true },
                    operatorname: { editable: false },
                    password: { editable: false }
                   }
                 }
             }
         });

      $("#"+divname).kendoGrid({
          dataSource: dataSource,
          pageable: true,
          height: 300,
          toolbar: ["create"],
          columns: [
                 { field:"userid",title:"userid" },
                 { field: "operatorname",title:"operatorname", width: "150px" },
                 { field: "password", title:"password", width: "150px" }]
      });

a javascript error is showed:

message: 'undefined' is null or is not an object
row: 8
char: 45249
code: 0
URI: http://localhost:8080/reportproject/views/js/kendo/kendo.web.min.js

and the data in grid can't be showed

 when i delete the "<script src="kendo.dataviz.min.js"></script>"
the data can be showed very good

how i can do?

Zhipan
Top achievements
Rank 1
 answered on 09 Aug 2012
3 answers
222 views
Hi,

I'm reopening a window with new content, but I can't figure out how to change the dimensions of it.

How do I accomplish this?
David
Top achievements
Rank 1
 answered on 09 Aug 2012
1 answer
591 views
Hey,

Is there an easy way to change the direction of the k-callout-n arrow on the validation message, or to remove it entirely?

Any help would be greatly appreciated!
Alexander Valchev
Telerik team
 answered on 09 Aug 2012
1 answer
107 views
I have a basic example like the tap strip demo [ http://demos.kendoui.com/mobile/tabstrip/index.html ]

When I run it in eclipse with the simulator, it moves the tap strips to the top and content does not fit within the phone display.
There is about a 3-4 pixel white area around the application and has both a horizontal and vertical scrolling.

Thanks for any advice...
Petyo
Telerik team
 answered on 09 Aug 2012
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
DatePicker
Spreadsheet
Upload
ListView (Mobile)
ComboBox
TabStrip
MultiSelect
AutoComplete
ListView
Menu
Templates
Gantt
Validation
TreeList
Diagram
NumericTextBox
Splitter
PanelBar
Application
Map
Drag and Drop
ToolTip
Calendar
PivotGrid
ScrollView (Mobile)
Toolbar
TabStrip (Mobile)
Slider
Button (Mobile)
Filter
SPA
Drawing API
Drawer (Mobile)
Globalization
LinearGauge
Sortable
ModalView
Hierarchical Data Source
Button
FileManager
MaskedTextBox
View
Form
NavBar
Notification
Switch (Mobile)
SplitView
ListBox
DropDownTree
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
ColorPicker
Pager
Styling
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
Licensing
ScrollView
Switch
TextArea
BulletChart
QRCode
ResponsivePanel
Wizard
CheckBoxGroup
Localization
Barcode
Breadcrumb
Collapsible
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
TimePicker
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
BottomNavigation
Ripple
SkeletonContainer
Avatar
Circular ProgressBar
FlatColorPicker
SplitButton
Signature
Chip
ChipList
VS Code Extension
AIPrompt
PropertyGrid
Sankey
Chart Wizard
OTP Input
SpeechToTextButton
InlineAIPrompt
StockChart
ContextMenu
DateTimePicker
RadialGauge
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?