Telerik Forums
UI for ASP.NET MVC Forum
1 answer
95 views

Hello,

Is it possible to combine virtualization and MVVM in a ComboBox?

Because I'm trying to do it and it doesn't work.

If yes can you send me the link to an example, because I've been searching and I didn't find any.

Thank you,

Olido.

Georgi Krustev
Telerik team
 answered on 04 Feb 2016
1 answer
267 views

Hi, I have been receiving the error  "0x800a138f - JavaScript runtime error: Unable to get property 'show' of undefined or null reference". I've looked over my code and examined my javascript function, but I have been unable to find any errors. Why would the .show error out on me?


My Code looks as follows:

@(Html.Kendo().Notification()
    .Name("#popupNotification")
    .Width("100%")
    .Position(p => p.Pinned(true).Top(30).Right(30))
    .Stacking(NotificationStackingSettings.Down)
    .AutoHideAfter(7000)
    .Templates(t =>
            {
               t.Add().Type("info").ClientTemplateID("popupTemplate");
            })
)

<button id="showNotification" class="k-button">Notification</button><br />

 

<script id="popupTemplate" type="text/x-kendo-template">
    <div class="">
        <h3>#= title #</h3>
        <p>#= message #</p>
    </div>
</script>

<script>
    $(document).ready(function() {
        var popupNotification = $("#popupNotification").data("kendoNotification");

        $("#showNotification").click(function() {
            popupNotification.show ({
                title: "New Notification",
                message: "Test"
            }, "info");
        });
    });
</script>

Misho
Telerik team
 answered on 04 Feb 2016
7 answers
307 views
So the gantt chart has Day, Week, and Month views.... but are there any plans to include a Year view? I'd like to have a Year view with Months as the sub-divider.

Thanks!
Bozhidar
Telerik team
 answered on 04 Feb 2016
5 answers
277 views

I have a Grid with a detail template to show another records related to the main data set. I'm trying to export everyting to excel but when i export it excel says "Excel found unreadable content" if i make the function to return an empty list to the export function the excel file has no problem it shows nothing about details but columns names. but if i return the dataset that i need the message of unreadable content is shown.

i've followed the example http://docs.telerik.com/kendo-ui/aspnet-mvc/helpers/grid/how-to/excel/detail-grid-export  and http://docs.telerik.com/kendo-ui/controls/data-management/grid/how-to/excel/detail-grid-export so the functions are practically the same

 

var detailExportPromises = [];

        var dataSource = new kendo.data.DataSource({
            type: "aspnetmvc-ajax",
            transport: {
                read: "@Url.Action("Fracciones_Read", "Home")",
                type: "POST"
            },
            schema: {
                data: "Data",
                total: "Total",
                error: "Errors"
            }
        });

        dataSource.read();

        function dataBound() {
            detailExportPromises = [];
            this.expandRow(this.tbody.find("tr.k-master-row").first());
        }
        function parameters() {
            return {
                fechaIni: $("#fechaIni").data("kendoDatePicker").value(),
                fechaFin: $("#fechaFin").data("kendoDatePicker").value(),
                operacion: "Imp"
            }
        }

        function fracciones_excelExport(e) {
            e.preventDefault();
        }

        function excelExport(e) {
            e.preventDefault();

            var workbook = e.workbook;

            detailExportPromises = [];

            var masterData = e.data;

            for (var rowIndex = 0; rowIndex < masterData.length; rowIndex++) {
                exportChildData(masterData[rowIndex].NumeroPedimento, rowIndex);
            }

            // wait for all detail grids to finish exporting
            $.when.apply(null, detailExportPromises)
            .then(function () {
                // get the export results
                var detailExports = $.makeArray(arguments);

                // sort by masterRowIndex
                detailExports.sort(function (a, b) {
                    return a.masterRowIndex - b.masterRowIndex;
                });

                // add an empty column
                workbook.sheets[0].columns.unshift({ width: 30 });

                // prepend an empty cell to each row
                for (var i = 0; i < workbook.sheets[0].rows.length; i++) {
                    workbook.sheets[0].rows[i].cells.unshift({});
                }

                // merge the detail export sheet rows with the master sheet rows
                // loop backwards so the masterRowIndex doesn't need to be updated
                for (var i = detailExports.length - 1; i >= 0; i--) {
                    var masterRowIndex = detailExports[i].masterRowIndex + 1;

                    var sheet = detailExports[i].sheet;

                    // prepend an empty cell to each row
                    for (var ci = 0; ci < sheet.rows.length; ci++) {
                        if (sheet.rows[ci].cells[0].value) {
                            sheet.rows[ci].cells.unshift({});
                        }
                    }

                    // insert the detail sheet rows after the master row
                    [].splice.apply(workbook.sheets[0].rows, [masterRowIndex + 1, 0].concat(sheet.rows));
                }

                // save the workbook
                kendo.saveAs({
                    dataURI: new kendo.ooxml.Workbook(workbook).toDataURL(),
                    fileName: "Importaciones.xlsx"
                });
            });
        }

        function exportChildData(NumeroPedimento, rowIndex) {
            var deferred = $.Deferred();

            detailExportPromises.push(deferred);

            var rows = [{
                cells: [
                    { value: "DescripcionFactura" },
                    { value: "DescripcionPedimento" },
                    { value: "Arancel" }
                ]
            }];

            dataSource.filter({ field: "NumeroPedimento", operator: "eq", value: NumeroPedimento });

            var exporter = new kendo.ExcelExporter({
                columns: [
                    { field: "DescripcionFactura" },
                    { field: "DescripcionPedimento" },
                    { field: "Arancel" }
                ],
                dataSource: dataSource
            });

            exporter.workbook().then(function (book, data) {
                deferred.resolve({
                    masterRowIndex: rowIndex,
                    sheet: book.sheets[0]
                });
            });
        }
    </script>

 

Kostadin
Telerik team
 answered on 04 Feb 2016
4 answers
1.0K+ views
Hi, is there a direct way to turn off autocomplete on filter without having to use some sort template?  The hack work-around I'm playing around with at the moment is setting MinLength to a unrealistic amount so the autocomplete never fires off.

columns.Bound(m => m.UserName).Title("User Name").Width(115).Filterable(f => f.Cell(c => c.Operator("contains").ShowOperators(false).MinLength(5000)));
Alexander Popov
Telerik team
 answered on 04 Feb 2016
3 answers
120 views

I am try to create a simple diagram, indicating the position of a record within a workflow. All I need is a line of different coloured circles, appropriately coloured, along with a label.

I have managed most of this, however the connectors, rather than linking to the circles, always use the text blocks to link to, meaning the lines are never straight, and not connected to the shapes.

How can I force the connectors to link to the shapes, and ignore the text?

I've attached a screenshot of the result I currently get.

 

Below is the page code:-

 

@{
    ViewBag.Title = "Index";
}
 
<h2>TEST</h2>
 
<script>
    function visualTemplate(options) {
        var dataviz = kendo.dataviz;
        var g = new dataviz.diagram.Group();
        var dataItem = options.dataItem;
 
 
        g.append(new dataviz.diagram.Circle({
            width: 50,
            height: 50,
            fill: dataItem.Colour,
            stroke: {
                width: 0
            }
        }));
 
 
        g.append(new dataviz.diagram.TextBlock({
            text: dataItem.PositionName,
            x: 60,
            y: 20,
            color: "black"
        }));
 
 
        return g;
    }
 
</script>
 
 
 
<div>
 
 
    @(Html.Kendo().Diagram()
      .Name("diagram")
      .DataSource(dataSource => dataSource
          .Read(read => read
              .Action("GetWFData", "Test")
          )
          .Model(m => m.Children("Items"))
      )
      .Editable(false)
      .Pannable(false)
      .Zoom(0)
      .Layout(l => l.Type(DiagramLayoutType.Layered))
      .ShapeDefaults(sd => sd
          .Visual("visualTemplate")
      )
      .ConnectionDefaults(cd => cd
          .Stroke(s => s
              .Color("#979797")
              .Width(2)
          )
      )
    )
 
 
 
 
</div>

 

Thanks

AP
Top achievements
Rank 1
Iron
Iron
Veteran
 answered on 03 Feb 2016
1 answer
645 views

Hi Team, Below is my requirement.
In a page,I have multiple KENDO MVC Grids where in some of grids i have Add & Update commands. I need to display Confirm Model dialog before submitting the row to controller. I didnt find any events to do this.

Please help. Thanks. Below is my MVC grid code 

@(Html.Kendo().Grid<iMAP.SRT.Core.SRTPRODUCT>().Name("SRT").Columns(columns =>{ columns.Command(command => { command.Edit(); }).HeaderHtmlAttributes(new { @class = "headercolumn" }).Width(130); columns.Bound(c => c.ACTIVE).Title("ACTIVE").HeaderHtmlAttributes(new { @class = "headercolumn" }).ClientTemplate("<input type='checkbox' #= ACTIVE ? checked='checked' :'' # />").Width(60); columns.Bound(c => c.CODE).Title("PRODUCT CODE").HeaderHtmlAttributes(new { @class = "headercolumn" }).Width(120); columns.Bound(c => c.DESCR).Title("DESCRIPTION").HeaderHtmlAttributes(new { @class = "headercolumn" }).Width(360);}).ToolBar(toolbar => { toolbar.Create(); })//.ToolBar(toolBar => toolBar.Template(@"<a id='addSome' class='k-button k-button-icontext k-grid-add' onclick='PDSBOMResults();'><span class='k-icon k-add'></span>Add new record</a>")).Editable(editable =>{ editable.Mode(GridEditMode.InLine).Window(window =>{ window.HtmlAttributes(new { @class = "k-window-titlebar;k-window-title;k-grid-update;k-grid-cancel;k-window-action;k-icon k-update;" });});}).Editable(editable => editable.Mode(GridEditMode.InLine)).HtmlAttributes(new { style = "height:500px;" }).Groupable().Scrollable(scrollable => scrollable.Virtual(true)).Selectable(selectable => selectable .Mode(GridSelectionMode.Multiple)).Filterable()//.Filterable(ftb => ftb.Mode(GridFilterMode.Row)).Resizable(resize => resize.Columns(true)).Events(x => x.Edit("popupProductsModule").DataBound("onGrisDataBound"))//.Events(events => events.Edit(@<text>function (e) {if (e.model.isNew() == false) {$("#CODE").attr("readonly", true);$("#CREATED").attr("hidden", true);$("#CREATEDBY").attr("hidden", true);$("label[for='CREATED']").attr("hidden", true);$("label[for='CREATEDBY']").attr("hidden", true)}}</text>)).DataSource(dataSource => dataSource .Ajax().Events(events => events.RequestEnd("onRequestEndForProducts")).Model(model =>{ model.Id(p => p.PRODUCTID); model.Field(p => p.CODE).Editable(true);}).Create(update => update.Action("InsertKBProducts", "SrtProject").Data("passParamsForInsertKBProducts")).Read(read => read.Action("GetKBProducts", "SrtProject").Data("getMainProductdetailsParams")).Update(update => update.Action("UpdateKBProducts", "SrtProject").Data("passParamsForUpdateKBProducts")).Destroy(update => update.Action("DeleteKBProducts", "SrtProject"))))

Boyan Dimitrov
Telerik team
 answered on 03 Feb 2016
1 answer
121 views

Hi,

Can a bar chart have multiple bars on a single line?  (Note: the letters represent bars)  If so, is there an example?

    -----------------------------------------------------------------------------------------------------------------

    |         xxxxxxx                          yyyyyyyyy                  zzz

    |     aaaa         bbbbb                                       ccccc

    |                                            wwwwwwwwwwwwwwwwwwwwwww

    ------------------------------------------------------------------------------------------------------------------

Thanks

Scott

 

 

Danail Vasilev
Telerik team
 answered on 03 Feb 2016
1 answer
127 views

Hi I need a column.which needs to be editable in inline edit mode and should be non editable at insert mode.As well we need to have two different list in either case.in insert mode only filtered list should be shown and in edit mode all record should be shown in grid columns dropdown.

Maria Ilieva
Telerik team
 answered on 02 Feb 2016
2 answers
246 views

Hi ,

          I just updated my libraries to the latest one  2016.1.112.545 and now  the bottom border of an input widget is missing at a particular zoom level in Chrome browser but it works fine in IE and Firefox. Any help appreciated. 

 

Thank you

 

 

Pavlina
Telerik team
 answered on 02 Feb 2016
Narrow your results
Selected tags
Tags
Grid
General Discussions
Scheduler
DropDownList
Chart
Editor
TreeView
DatePicker
Upload
ComboBox
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
ListView (Mobile)
Pager
Accessibility
ColorPicker
DateRangePicker
Wizard
Security
Styling
Chat
MediaPlayer
TileLayout
DateInput
Drawer
SplitView
Barcode
ButtonGroup (Mobile)
Drawer (Mobile)
ImageEditor
RadioGroup
Sparkline
Stepper
TabStrip (Mobile)
GridLayout
Template
Badge
LinearGauge
ModalView
ResponsivePanel
TextArea
Breadcrumb
ExpansionPanel
Rating
ScrollView
ButtonGroup
CheckBoxGroup
NavBar
ProgressBar
QRCode
RadioButton
Scroller
Timeline
TreeMap
TaskBoard
OrgChart
Captcha
ActionSheet
Signature
AppBar
BottomNavigation
Card
FloatingActionButton
Licensing
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
DateTimePicker
TimePicker
StockChart
RadialGauge
ContextMenu
ArcGauge
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?