Telerik Forums
UI for ASP.NET MVC Forum
5 answers
1.4K+ views

Hi,

I am using columns.Select() in my grid template in order to be able to select multiple rows with the provided checkboxes. The checkbox in the header normally works well, allowing me to select or deselect all rows.

However, I have tried this same approach on a 'filterable' grid, and the column header checkbox no longer works. In this case, when I click on the checkbox, instead of toggling the selection, the grid attempts to filter on the 'select' column.

Is there anyway to turn off filtering for the select column only?  I need filtering on the other columns, and I also need to be able to use the checkbox in the header of the 'select' column. Is this possible?

 

Thanks,

Ryan

Preslav
Telerik team
 answered on 09 Aug 2018
2 answers
169 views

I ran the upgrade wizard to upgrade my telerik version to 2018.2.620 from the Q2 2016 version. However, after the upgrade none of the grid icons are showing up. 

I'm using the bootstrap theme. 

In my content folder I have a kendo directory with folders for Bootstrap, fonts, images, textures and the kendo.bootstrap.min.css and kendo.common-bootstrap.min.css files. I've included a screen shot of the folder structure. 

The Scripts/kendo directory just has the kendo.all.min.js and kendo.aspnetmvc.min.js files. 

I have the following css and script file includes on the page:

<link href="~/Content/jquery-ui-1.11.4.min.css" rel="stylesheet" />
<link href="~/Content/kendo/kendo.common-bootstrap.min.css" rel="stylesheet" />
<link href="~/Content/kendo/kendo.bootstrap.min.css" rel="stylesheet" />
<script src="~/Scripts/_lib/jquery-ui-1.11.4.min.js"></script>
<script src="~/Scripts/kendo/kendo.all.min.js"></script>
<script src="~/Scripts/kendo/kendo.aspnetmvc.min.js"></script>

 

I've confirmed using the dev tools in Chrome and using Fiddler that there are no 404's, all the files are getting loaded into the page correctly. 

 

I'm not using any bundler at all. The page just has a Html.Kendo().Grid defined and practically nothing else. I tried removing everything else on the page but the grid, but that didn't help.

 

What am I missing?

Jon
Top achievements
Rank 1
 answered on 08 Aug 2018
6 answers
955 views

Hello

As a reference I use the sample in https://demos.telerik.com/aspnet-mvc/grid/filter-multi-checkboxes. By clicking on the filter icon, a multi-check drop-down is displayed. I'd like to show a single selection drop-down (containing the distinct row values in the corresponding column as in the multi-check sample) instead of the multi-check drop-down. By clicking on one item in this drop-down, the grid content should be filtered using this selection. 

A code sample would be greatly appreceated. 

I'm using Kendo.Mvc Version 2018.2.516.545

Thank you and regards

Daniel 

Daniel
Top achievements
Rank 1
 answered on 08 Aug 2018
4 answers
203 views

How I can override alert from ImageBrowser from f.e "invalidFileType" ?

 

Because it is native web browser popup.

01.$("#editor").kendoImageBrowser({
02.            messages: {
03.                deleteFile: "@Html.Raw(ImageBrowser.DeleteFile.JsEscape())",
04.                directoryNotFound: "@Html.Raw(ImageBrowser.DirectoryNotFound.JsEscape())",
05.                emptyFolder: "@Html.Raw(ImageBrowser.EmptyFolder.JsEscape())",
06.                invalidFileType: "@Html.Raw(ImageBrowser.InvalidFileType.JsEscape())",
07.                orderBy: "@Html.Raw(ImageBrowser.OrderBy.JsEscape())",
08.                orderByName: "@Html.Raw(ImageBrowser.OrderByName.JsEscape())",
09.                orderBySize: "@Html.Raw(ImageBrowser.OrderBySize.JsEscape())",
10.                overwriteFile: "@Html.Raw(ImageBrowser.OverwriteFile.JsEscape())",
11.                uploadFile: "@Html.Raw(ImageBrowser.UploadFile.JsEscape())",
12.                dropFilesHere: "@Html.Raw(ImageBrowser.DropFilesHere.JsEscape())",
13.                search: "@Html.Raw(ImageBrowser.Search.JsEscape())"
14.            },
15.            transport: {
16.                type: "imagebrowser-aspnetmvc",
17.                read: "@Url.Action("ReadES", "ImageBrowser", new {id = Model.Id})",
18.                destroy: {
19.                    url: "@Url.Action("DestroyES", "ImageBrowser", new {id = Model.Id})",
20.                    type: "POST"
21.                },
22.                create: {
23.                    url: "@Url.Action("CreateES", "ImageBrowser", new {id = Model.Id})",
24.                    type: "POST"
25.                },
26.                thumbnailUrl: function (path, file) {
27.                    var url = "@Url.Action("ThumbnailES", "ImageBrowser", new { id = Model.Id })" + "?path=" + path + file;
28.                    return url;
29.                },
30.                uploadUrl: "@Url.Action("UploadES", "ImageBrowser", new { id = Model.Id })",
31.                imageUrl: "@Url.Action("Image", "ImageBrowser", new {path = "{0}", id = Model.Id})"
32.            }
33.        });
Veselin Tsvetanov
Telerik team
 answered on 08 Aug 2018
1 answer
1.4K+ views

The DateTimePicker & TimePicker close their respective animated picker when opened immediately in the following scenario:

  1. Kendo Grid is inside a Bootstrap modal.
  2. Kendo Grid has edit Popup that uses a Template.
  3. The Popup template uses the Kendo DateTimePicker AND/OR TimePicker.
  4. When editing the grid in the popup edit template, the DateTimePicker & TimePicker close their popups immediately when opened.

When I remove the grid from the Bootstrap modal, the behavior is corrected. 

Any advice would be appreciated. I don't have any example code readily available to demonstrate the behavior.

Preslav
Telerik team
 answered on 08 Aug 2018
2 answers
161 views

How can I remove the onclick border highlighting on the tabstrip?

 

Eyup
Telerik team
 answered on 08 Aug 2018
1 answer
108 views
@(Html.Kendo().Grid<sss.ViewModels.StudentMarkVM>()
 
               .Name("grid")
               .Columns(columns =>
               {
 
                   columns.ForeignKey(c => c.StudentId, (System.Collections.IEnumerable)ViewData["students"], "Id", "NameEn");
                   columns.Bound(c => c.Name).Hidden();
                   columns.ForeignKey(c => c.MarkStructureId, (System.Collections.IEnumerable)ViewData["markStructures"], "Id", "NameEn");
                   columns.Bound(c => c.Mark);
                   columns.Bound(c => c.FullMark);
                   //.ClientTemplate(Html.Kendo().NumericTextBox<double>()
                   //                            .Name("Mark_#=Mark#")
                   //                            //.Value("#=order#")
                   //                            .HtmlAttributes(new { value = "#=Mark #" })
                   //                            .Format("{0:n0}")
                   //                            .Min(0)
                   //                            .Max(100000)
                   //                            .Step(1)
                   //                            .Decimals(0)
                   //                            .Events(ev => ev.Change("numericBoxChanged"))
                   //                            .ToClientTemplate().ToHtmlString());
                   columns.Bound(c => c.IsActive).Hidden();
                   columns.Bound(c => c.Note).Hidden();
                   columns.Bound(c => c.UserDefined1).Hidden();
                   columns.Bound(c => c.UserDefined2).Hidden();
                   columns.Bound(c => c.UserDefined3).Hidden();
                   columns.Bound(c => c.UserDefined4).Hidden();
                   //columns.Bound(c => c.CreationUserName).Hidden();
                   //columns.Bound(c => c.CreationDate).Hidden().Format("{0:MM/dd/yyyy H:mm}");
                   //columns.Bound(c => c.LastUpdateUserName).Hidden();
                   //columns.Bound(c => c.LastUpdateDate).Hidden().Format("{0:MM/dd/yyyy H:mm}");
 
               })
              .ToolBar(toolbar =>
              {
                  toolbar.Save();
                  toolbar.Excel();
                  toolbar.Pdf();
              })
              .ColumnMenu()
              .Editable(editable => editable.Mode(GridEditMode.InCell))
          .HtmlAttributes(new { style = "height: 500px" })
              .Selectable(selectable =>
              {
                  selectable.Mode(GridSelectionMode.Single);
                  selectable.Type(GridSelectionType.Cell);
              })
              .Sortable(sortable =>
              {
                  sortable.SortMode(GridSortMode.SingleColumn);
              })
              .HtmlAttributes(new { style = "height: 500px" })
          .Events(ev => ev.DataBound("db"))
              .Filterable()
              .Scrollable()
             .DataSource(dataSource => dataSource
         .Ajax()
         .Model(model =>
         {
             model.Id(p => p.Id);
             model.Field(p => p.StudentId).Editable(false);
             model.Field(p => p.Name).Editable(false);
             model.Field(p => p.MarkStructureId).Editable().Editable(false);
 
         })
        .Read(read => read.Action("StudentMarks_Read2", "StudentMarks", Model))
         //.Update("StudentMark_Update", "StudentMarks")
         .Update(update => update.Action("StudentMark_Update", "StudentMarks"))
 
         )
    )
Georgi
Telerik team
 answered on 07 Aug 2018
3 answers
213 views

Hi everyone, I'm new in Kendo ASP.NET and I would like to see if some one could help me or give me an a guide. Rigth now I'm trying to implement an excel export of a pivotGrid. I already set all the pivotgrid configuration as in Razor as in the controller but when ran it I got the error (ScreenShot Attached).

The following is the configuration of the pivotGrid the View and Controller.

 

View:

@ModelType IEnumerable(Of TelerikMvcVB.HomeModel)

<link href="@Url.Content("~/Content/bootstrap.css")" rel="stylesheet" type="text/css" />

@* Content-box fixes as per http://docs.telerik.com/kendo-ui/third-party/using-kendo-with-twitter-bootstrap article  *@
<link href="@Url.Content("~/Content/box-sizing-fixes.css")" rel="stylesheet" type="text/css" />

<link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />

<link href="https://kendo.cdn.telerik.com/2018.2.620/styles/kendo.common-bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="https://kendo.cdn.telerik.com/2018.2.620/styles/kendo.mobile.all.min.css" rel="stylesheet" type="text/css" />
<link href="https://kendo.cdn.telerik.com/2018.2.620/styles/kendo.bootstrap.min.css" rel="stylesheet" type="text/css" />
<script src="https://kendo.cdn.telerik.com/2018.2.620/js/jquery.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2018.2.620/js/jszip.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2018.2.620/js/kendo.all.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2018.2.620/js/kendo.aspnetmvc.min.js"></script>
<script src="@Url.Content("~/Scripts/kendo.modernizr.custom.js")"></script>
<script src="~/Scripts/kendo/jszip.min.js"></script>


<div>
    <div style="margin-top:-2%">
        <h2>Kendo PivotGrid - Razor</h2>
    </div>
    <button id="export" class="k-button k-button-icontext hidden-on-narrow"><span class="k-icon k-i-excel"></span>Exportar Excel</button>
    <div class="responsive-message"></div>

    <div>
        @(Html.Kendo().PivotConfigurator().Name("configurator") _
                    .HtmlAttributes(New With {.class = "hidden-on-narrow"}) _
                    .Filterable(True) _
                    .Sortable() _
                    .Height(570)
        )

        @(Html.Kendo().PivotGrid(Of HomeModel)() _
                            .Name("pivotgrid") _
                            .Excel(Function(excel) excel _
                                .FileName("PruebaExcelRazor.xlsx") _
                                .ForceProxy(Url.Action("Excel_Export_Save", "Home"))) _
                            .HtmlAttributes(New With {.class = "hidden-on-narrow"}) _
                            .Sortable() _
                            .Configurator("#configurator") _
                            .ColumnWidth(120) _
                            .Height(570) _
                            .BindTo(Model) _
                            .DataSource(Function(dataSource) dataSource _
                                .Ajax() _
                                .Schema(Function(schema) schema _
                                .Cube(Function(cube) cube _
                                    .Dimensions(Function(dimensions) _
                                    {
                                        dimensions.Add(Function(model) model._nombre).Caption("Nombre"),
                                        dimensions.Add(Function(model) model._idProductos).Caption("Id Producto"),
                                        dimensions.Add(Function(model) model._precio).Caption("Precio"),
                                        dimensions.Add(Function(model) model._cantidad).Caption("Cantidad")
                                    }) _
                                    .Measures(Function(measures) measures.Add("Contar Productos").Field(Function(model) model._idProducto).AggregateName("Count"))
                            ))))

        )

    </div>
</div>

@Scripts.Render("~/bundles/bootstrap")
@*@RenderSection("scripts", required:=False)*@

<style>
    #pivotgrid {
        display: inline-block;
        vertical-align: top;
        width: 70%;
    }

    #configurator {
        display: inline-block;
        vertical-align: top;
    }

    .hidden-on-narrow {
        display: inline-block;
        vertical-align: top;
    }
</style>

<script>
    $(function () {
        $("#export").click(function () {
            $("#pivotgrid").getKendoPivotGrid().saveAsExcel();
        });
    });

    function onError(e) {
        alert("error: " + kendo.stringify(e.errors[0]));
    }
</script>

 

Controller:

Imports System.Runtime.InteropServices
Imports System.Web
Imports Kendo.Mvc.Extensions
Imports Kendo.Mvc.UI


Public Class HomeController
    Inherits System.Web.Mvc.Controller

    Function Index() As ActionResult
        Dim DA As New DataAccess
        Dim lstProductos = DA.GetProductList()
        Return PartialView("~/Views/Home/Index.vbhtml", lstProductos)
    End Function

    <HttpGet>
    Function Excel_Export() As ActionResult
        Return View()
    End Function


    <HttpPost>
    Function Excel_Export_Save(ByVal contentType As String, ByVal base64 As String, ByVal fileName As String) As ActionResult
        Try
            Dim fileContents = Convert.FromBase64String(base64)
            Return File(fileContents, contentType, fileName)
        Catch ex As Exception

        End Try
    End Function


    Function ListGetData() As ActionResult
        Try
            Dim DA As New DataAccess
            Dim lstProductos = DA.GetProductList()
            Return View("~/Views/Home/Index.vbhtml", lstProductos)
            'Return lstProductos
        Catch ex As Exception
            ' Return HttpStatusCodeResult(400, "")
        End Try
    End Function
End Class

Thanks for any help about the error..I made the code from the example of the web page from the remote binding

 

 

 

Boyan Dimitrov
Telerik team
 answered on 07 Aug 2018
1 answer
524 views

Hi, 

 

How can i export selected Grid rows to XML file with specific format?

 

 

Konstantin Dikov
Telerik team
 answered on 07 Aug 2018
3 answers
282 views

Hello

I had in mind to use it with "incell" edition, is there any built in custom validation as with the grid, since I can not rely on the model validation?

Thank you very much !!

Tsvetina
Telerik team
 answered on 03 Aug 2018
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
DropDownButton
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
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
LLM Kit
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?