Telerik Forums
Kendo UI for jQuery Forum
1 answer
250 views

Hi I am having a bit of an issue.

I am trying to move the headers down the left i am trying to create something like this - 

Title              Value

created         11/05/2016

Duration        11:05:20

FPS               60

I have attached a screenshot.

I really want all my items to be the same hence why I want it as a kendo grid.

 

Any help would be appreciated.

 

 

 

Dimiter Madjarov
Telerik team
 answered on 20 Oct 2016
4 answers
1.1K+ views
I want to initialize the scheduler in the beginning of my app (in the jquery ready handler) and when I get a list of something comparable to "owners" in

http://demos.telerik.com/kendo-ui/web/scheduler/index.html

I want to set the resources.dataSource member (the one with Alex, Bob and Charlie, but in my case, there are some other owners, data coming from an ajax response).

I tried to create an array of items all having the members text, value and color, and then

var scheduler = $("#wScheduler").data("kendoScheduler");
scheduler.resources[0].dataSource = theArray;
scheduler.dataSource.sync();

but that did not change the possible "owners" of scheduler tasks.

I have also tried

var ds = new kendo.data.SchedulerDataSource({data:items});
scheduler.resources[0].dataSource = ds;

and

var ds = new kendo.data.DataSource({data:items});
scheduler.resources[0].dataSource = ds;

with no luck.
Georgi Krustev
Telerik team
 answered on 20 Oct 2016
5 answers
361 views

Hi, I am using the upload widget with angular. 

I am looking for it to achieve the following:

1) have something like k-files = "initialFiles" in the input options; to display list of previously loaded files. 

I tried using k-files along with in javascript code; but that does not work.. how do I make this feature work? 

2) Is there a way to use template (again using angular) to make the previously uploaded files downloadable? I saw a similar post but it had no examples. Can you give a small example on how to do this? 

Thanks

$scope.initalFiles = [ { name:"test1.txt" }, {name: "test2.txt" } ];
<p><input name="files"<br>    id="files"<br>    type="file"<br>    kendo-upload="uploader"<br>    k-select="onSelect"<br>    k-success="onSuccess"</p><p>k-files = "initialFiles"</p><p>    k-async="asyncOptions"/></p>
Dimiter Madjarov
Telerik team
 answered on 20 Oct 2016
9 answers
1.1K+ views
Dear all,
             i'd tried the samples of Treeview 
but the filter is able to filter only the parent node 
but i want to filter parent node and as well as child node too
could anyone give me the samples of this thread
thanks in advance
Kiril Nikolov
Telerik team
 answered on 20 Oct 2016
1 answer
281 views

The titles on Row 1 seem to be set to what's coming down from the service, how can I customize them?  Like the JSON is "studyId" but the client wants "Study_ID".

Is this possible?  I tried setting the cell value property but doesn't seem to work.

Alex Hajigeorgieva
Telerik team
 answered on 19 Oct 2016
1 answer
84 views
Hi, can I ask is it possible to modify or change the dragged header like the image attached? Wish to allow user to select their own aggregates and group them by their own. An example provided would be great if it is possible to do so.
Alex Hajigeorgieva
Telerik team
 answered on 19 Oct 2016
1 answer
383 views

I am using 3 Kendo grids.

Each grid has the ability to Export to Excel using toolbar template. 

This was all working until recently. Now it does not work on any grid. 

I am not sure what environmental issue I created. 

Here is the code. 

 

BundledConfig:

  //Telerik 
            bundles.Add(new ScriptBundle("~/bundles/kendo").Include(
                "~/Scripts/kendo/kendo.all.min.js",
                "~/Scripts/kendo/kendo.web.min.js",
                "~/Scripts/kendo/kendo.aspnetmvc.min.js",
                 "~/Scripts/jszip.min.js"));

View:

   <div class='pull-left'>
        <a class="k-button k-button-icontext" href="javascript:void(0)" onclick="customCommand()"><span class="k-icon k-add"></span>Add new transfer</a>
        <button class="k-button k-button-icontext k-grid-excel" type="button"><span class="k-icon k-i-excel"></span>Export to Excel</button>
        <button class="k-button k-button-icontext k-grid-pdf"><span class="k-icon k-i-pdf"></span>Export to PDF</button>

@helper ToolbarTemplate2()
{
    <div class='pull-left'>
        <button class="k-button k-button-icontext k-grid-excel" type="button"><span class="k-icon k-i-excel"></span>Export to Excel</button>
        <button class="k-button k-button-icontext k-grid-pdf"><span class="k-icon k-i-pdf"></span>Export to PDF</button>
    </div>
}

@(Html.Kendo().Grid<TransferView>()
                    .Name("grid")
                    .Columns(columns =>
                    {
                        columns.Bound(e => e.TransferId).Title("ID").Width(60);
                        columns.Bound(e => e.FromDescription).Width(180);
                        columns.Bound(e => e.ToDescription).Width(180);
                        columns.Bound(e => e.FromDept).Width(120);
                        columns.Bound(e => e.ToDept).Width(120);
                        columns.Bound(e => e.CreateDate).Hidden();
                        columns.Bound(e => e.CreateProfile).Hidden();
                        columns.Bound(e => e.ChangeDate).Hidden();
                        columns.Bound(e => e.ChangeProfile).Hidden();
                        columns.Bound(e => e.ApprovalFlag).Hidden();
                        columns.Bound(e => e.ApprovalDate).Hidden();
                        columns.Bound(e => e.ApprovalProfile).Hidden();
                        columns.Bound(e => e.PostedDate).Hidden();
                        columns.Bound(e => e.PostedFlag).Hidden();
                        columns.Bound(e => e.ReceivedDate).Hidden();
                        columns.Bound(e => e.TrnComment).Hidden();
                        columns.Command(command =>
                        {
                            command.Custom("Edit").Click("showDetails");
                            command.Custom("Delete").Click("deleteTransfer").HtmlAttributes(new { @style = "border-color: #b92c28; background-color: #d9534f; color:white" });
                        }).Width("20%");
                    })
                    .Sortable()
                    .Filterable(ftb => 
                    {
                        ftb.Mode(GridFilterMode.Row);
                    })
                .ColumnMenu()
                .ToolBar(toolbar =>
                {
                toolbar.Template(@<text>@ToolbarTemplate()</text>);
                })
                .Sortable()
                .Pageable()
                .Scrollable(a => a.Height("auto"))
                .Resizable(resize => resize.Columns(true))
                .Excel(excel => excel
                        .FileName("alltransfers.xlsx")
                        .Filterable(true)
                        .AllPages(true)
                      )
                .Groupable()
                .Reorderable(Reorder => Reorder.Columns(true))
                .Navigatable()
                .Pageable(pager => pager.PageSizes(new[]
                    {
                        10,
                        20,
                        30,
                        40,
                        50,
                        100
                    }))

                .ClientDetailTemplateId("template")
                .DataSource(dataSource => dataSource
                    .Ajax()
                    .PageSize(10)
                    .Read(read => read.Action("GetAllTransfersForStore", "Transfer"))
                )
                .Events(events => events
                  .DataBound("dataBound")
                  .DetailExpand("detailExpand"))
)

<script id="template" type="text/kendo-tmpl">
    @(Html.Kendo().TabStrip()
            .Name("tabStrip_#=TransferId#")
            .SelectedIndex(0)
            .Animation(animation => animation.Open(open => open.Fade(FadeDirection.In)))
            .Items(items =>
            {
            items.Add().Text("Transactions")
                .Content(
                @<text>
                    @RenderTabStrip()
                </text>);
                items.Add().Text("Transfer Information").Content(
                       "<div class='row'>" +
                        "<div class='col-md-4'>" +
                            "<ul>" +
                                "<li><label>Created Date</label> #= CreateDate #</li>" +
                                "<li><label>Created By</label> #= CreateProfile #</li>" +
                                "<li><label>Changed Date</label> #= ChangeDate #</li>" +
                                "<li><label>Changed By</label> #= ChangeProfile #</li>" +
                                 "<li><label>Received Date </label> #= ReceivedDate #</li>" +

                            "</ul>" +
                        "</div>" +
                        "<div class='col-md-4'>" +

                            "<ul>" +

                            "<li><label>Approval Yes/No</label> #= ApprovalFlag #</li>" +
                            "<li><label>Approval Date</label> #= ApprovalDate #</li>" +
                             "<li><label>Approval Profile</label> #= ApprovalProfile #</li>" +
                            "<li><label>Posted Date</label> #= PostedDate #</li>" +
                            "<li><label>Posted Yes/No</label> #= PostedFlag #</li>" +
                        "</ul>" +
                        "</div>" +
                    "</div>"

                          );

            })
            .ToClientTemplate())}

    @helper RenderTabStrip()
    {    @(Html.Kendo().Grid<TransferLine>()
                .Name("grid_#=TransferId#")
                .Filterable(ftb => ftb.Mode(GridFilterMode.Row))
                .ColumnMenu()
                .ToolBar(toolbar =>
                 {
                     toolbar.Template(@<text>@ToolbarTemplate2()</text>);
                 })
                .Sortable()
                .Pageable()
                .Resizable(resize => resize.Columns(true))
                .Scrollable(a => a.Height("auto"))
                .Groupable()
                .Reorderable(Reorder => Reorder.Columns(true))
                .Navigatable()
                .Pageable(pager => pager.PageSizes(new[]
                    {
                        10,
                        20,
                        30,
                        40,
                        50,
                        100
                    }))
                .Columns(columns =>
                {
                    //columns.Bound(e => e.FromStoreNumber).Hidden();
                    //columns.Bound(e => e.T).Hidden());
                    //columns.Bound(e => e.FromDept).hidden();
                    //columns.Bound(e => e.ToDept).hidden();
                    columns.Bound(e => e.TransferId).Title("ID").Width(70);
                    columns.Bound(e => e.ItemUpc).Title("UPC").Width(500);
                    columns.Bound(e => e.Quantity).Width(120);
                    columns.Bound(e => e.UnitPrice).Width(120);
                    columns.Bound(e => e.ItemUOM).Width(120);
                    columns.Bound(e => e.ExtendedPrice).Format("{0:C}").Width(120);
                    columns.Bound(e => e.TrnComment).Hidden();
                    //columns.Command(command =>
                    //{
                    //    command.Custom("Delete").Click("deleteLine");
                    //}).Width("20%");

                })
                .DataSource(dataSource => dataSource
                    .Ajax()
                    .PageSize(10)
                .Read(read => read.Action("GetAllLinesForId", "Transfer", new { id = "#=TransferId#" }))

                )
                .Pageable()
                .Sortable()
                .ToClientTemplate())
}
</script>

Any ideas would be appreciated. 

 

 

 

Stefan
Telerik team
 answered on 19 Oct 2016
2 answers
303 views

Hi,

I have a mobile navbar / toolbar. It only has one item, but is showing an empty Overflow Anchor (see image attached). How can remove the overflow anchor? (Or is there some method to flag for it to auto-hide itself when it's empty?)

I'm trying to adapt the Kendo Mobile demo here: http://demos.telerik.com/php-ui/m/index#navbar/adaptive-toolbar

My code follows.

Thanks.

-Paul

01.<div data-role="toolbar" style="min-width: 600px;" data-items='[
02.  {
03.    type: "splitButton",
04.    id:   "userDisplayName",
05.    icon: "contacts",
06.    text: "Joe User",
07.    align:"right",
08.    overflow: "never",
09.    menuButtons: [
10.      {
11.        id:  "editProfile",
12.        icon: "settings",
13.        text: "edit profile"
14.      },
15.      {
16.        id:   "logout",
17.        icon: "history",
18.        text: "Logout"
19.      }
20.    ]
21.  }        
22.]'>
23.</div>
ptw
Top achievements
Rank 1
 answered on 19 Oct 2016
1 answer
985 views

In my cshtml, I am rendering a template that will be used via javascript.

<script id="my-template" type="text/x-kendo-tmpl">
    <select id="myType">
        @foreach (var src in Model.MyTypes)
        {
            <option value="@Html.Raw(@src.Key)">@Html.Raw(@src.Value)</option>
        }
    </select>
</script>

Note that I'm using @Html.Raw to output the value and text of the select items. This is necessary because we support several languages and without the @Html.Raw, the result is an invalid template.

If I keep the @Html.Raw, I'm exposing a potential hole for XSS because this data is supplied by the user.

How can I allow multiple locales and not expose an XSS vulnerability (without having to encode the data stored in the DB)?

Thanks,

--Ed

Ivan Danchev
Telerik team
 answered on 19 Oct 2016
1 answer
705 views

I really hope someone can assist me.  I am new to MVC and Telerik Controls.  I have use the Jquery version of the Telerik Grid to display lists of parent data from my database and implemented server paging/sorting etc and this has gone well so far.

I have a list of Issues and when an item is double clicked, an issue detail view is opened (this is a razor view, with additional information to display to that contained in the grid).  I have done this by implementing a jquery call on the double click of the kendo grid. (If there is a nicer way to do this using the popup mode please could someone let me know as I found popup mode relied on the data available to the grid??)

The issue detail view need to present a list of all issue comments related to the issue and allow adding/editing and removing of them.

I would like to use the kendo grid for this list too as their may be a lot of comments and I would like to implement paging for them.

I have EF as my data layer with unit of work and repository pattern and a business layer with business models.  I am then translating to View models and currently I have an Issue view model with a List<IssueCommentsVM> property populated.

However, I am currently getting the data for IssueComments via the grids read operation to a 'GetIssueComments' action on the controller.

Issues I am having:-

- I need to be able to create a new issue and add multiple issue comments to the grid and save both the issue and the issue comments entered at the same time

- When editing an issue, there may be a lot of comments, so I would like server side paging/filtering/sorting implemented, but when I change the page/filter etc, my edits will be lost??

Is there a good way of getting the kendo grid to add/edit and delete Issue Comments in bulk edit style way, maintaining state if pages are changed or filtering is applied so that when they save the Parent Issue, the child Issue Comment changes are all passed to the Issue Save action method.

I was thinking maybe there is a way to bind the grid to the parent models child data List<IssueCommentVM> and getting add/edit/delete to post and update this model and refresh the page and hence child grid, but then how would I handle paging etc as I don't want to return all comments to the parent model, just the requested page, but I still need to save changes.

Can anyone help me out, this seems so complicated, there has to be something I am missing in my understanding.

 

Kostadin
Telerik team
 answered on 19 Oct 2016
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
ScrollView
Switch
TextArea
BulletChart
Licensing
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
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
TimePicker
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
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?