Telerik Forums
Kendo UI for jQuery Forum
5 answers
153 views

Hello everybody,

ref: Kendo Mobile Listview (Scroller): visibleScrollHints

Is it somehow possible to change the visibility of the y-scrollbar at runtime? 

 

Thanks for your help

axel

Petar
Telerik team
 answered on 13 Jul 2020
2 answers
276 views

I am using Kendo Hierarchy Grid and want a way to remove the header and border lines of the master grid alone. When I apply the the CSS below the grid code, it also removes the headers child grids. 

 

@(Html.Kendo().Grid<WorkplansViewModel>()
.Name("grid_outputindicators")
.Columns(columns =>
{
columns.Bound(c => c.Transaction_Id).Hidden();
columns.Bound(c => c.WPMainRecord_Ident).Hidden();
columns.Bound(c => c.ProjectId).Hidden();
columns.Bound(c => c.FYearIdent).Hidden();
columns.Bound(c => c.FPeriodIdent).Hidden();
columns.Bound(c => c.ViewNumbering).Title("No").Width(20).Hidden();
columns.Bound(c => c.Output).Title("Define Indicators for each Output");

columns.Command(command => command.Custom(" Add Indicator").IconClass("k-icon k-i-column-stacked").Click("addoutputindicator"));

})

.Resizable(r=>r.Columns(true))
.ClientDetailTemplateId("templateoutputindicators")
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("WP_Outputs_Read", "Admin", new {projid=Model.Project_Id, fyear=Model.FYear, fperiod=Model.FPeriod}))
.Model(model =>
{
  model.Id(p => p.Transaction_Id);
})

.Events(events => events.Error("error_handler"))


)
.Events(events => events.DataBound("dataBoundOutputIndicators"))
)

 

 

 

<script id="templateoutputindicators" type="text/kendo-tmpl">
@(Html.Kendo().Grid<WP_OutputIndicatorsSubGridVM>()
.Name("gridsub_#=Transaction_Id#")
.Columns(columns =>
{
columns.Bound(o => o.Transaction_IndicatorId).Hidden();
columns.Bound(o => o.IndicatorStatementOIVM).Title("Indicator");
columns.Bound(o => o.BaselineOIVM).Width(110).Title("Baseline");
columns.Bound(o => o.TargetOIVM).Title("Target");
columns.Command(command => { command.Destroy().Text(" Delete").IconClass("k-icon k-i-delete"); });
})
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(10)
.Read(read => read.Action("WP_OutputsSubIndicators_Read", "Admin", new { output_transid = "#=Transaction_Id#" }))
.Destroy(destroy => destroy.Action("WP_Outputs_Delete", "Admin"))
)
.ToClientTemplate()
)
</script>

 

#grid_outputindicators thead.k-grid-header
{
height: 0;
border-bottom-width: 0;
visibility: hidden;
overflow: hidden;
display: none;
}

Gideon
Top achievements
Rank 1
Veteran
 answered on 10 Jul 2020
10 answers
755 views

Hi Team,
    We are using Asp.Net Kendo UI grid (not MVC).To bind the grid we are using "transport read property (Ajax POST method)" to fetch the records from the database & convert it to JsonConvert.SerializeObject, Parse it and display them on the grid.

When we bind more than 150 records we get the below error.

Screen Shot link

Code mentioned below for your reference. Can you please check & help with it?

ASP.NET - Jquery

var gridDataSource =new kendo.data.DataSource({
transport: {
read: function (option) {
$.ajax({
type: "POST",
url: "History.aspx/BindGridDetails",
data: JSON.stringify({ "FromDate": $("#ContentPlaceHolder1_tdpFromDate").val(), "ToDate": $("#ContentPlaceHolder1_tdpToDate").val(), "CategoryId": $("#ContentPlaceHolder1_ddlCategory option:selected").text(), "AccountId": $("#ContentPlaceHolder1_ddlAccount option:selected").val() }),
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (response) {
option.success(JSON.parse(response.d));
}
});
}
},

C# code 

if (DB.GetHistory(iOwnerID, AccountId, sCategoryID, ref DT, ref sErrorMessage, ref ToDate, ref FromDate) == false)
{
return sErrorMessage;
}
return JsonConvert.SerializeObject(DT);

Tsvetomir
Telerik team
 answered on 10 Jul 2020
1 answer
427 views

Hi,

Is there a way to avoid the overlapping of content of two connectors from each other. After going through the connection defaults I don't see any property which can avoid this overlapping. connections.content has only font related properties. Please see attached screenshot for the overlapping content.

Below is the connection deafults which I have configured.

connectionDefaults: {
                        endCap: "ArrowEnd",
                        startCap: "FilledCircle",
                        content: {
                            template: "# if (dataItem.percentage) {# #= dataItem.percentage #% #} #"
                        },
                        stroke: {
                            color: "#000000",
                            width: 2
                        },
                        editable: {
                            connect: true,
                            remove: true,
                            tools: [{ name: "edit" }]
                        },
                        type: "polyline"
                    },

Vessy
Telerik team
 answered on 10 Jul 2020
3 answers
211 views

I have a grid which has three columns:

  • The first one is just text, not editable.
  • The second one is an <input>, should be editable.
  • The third one is a kendoDropDownList, should be editable.

My dataSource, with the two fields I want to be editable marked as such:

var dataSource = new kendo.data.DataSource({
  // Omitted for brevity
  schema: {
    model: {
      id: 'row',
      fields: {
        row: { type: 'number', editable: false },
        type: { type: 'number', editable: false },
        description: { type: 'string', editable: false }, // First column
        quantity: { type: 'number', editable: true }, // Second column
        reason: { type: 'number', editable: true } // Third column
      }
    }
  }
});

My kendoGrid, with editable: 'incell':

$('#grid').kendoGrid({
  dataSource: dataSource,
  editable: 'incell',
  columns: [
    {
      title: 'Description',
      field: 'description'
    },
    {
      title: 'Quantity',
      field: 'quantity',
      editable: function (e) { return false; },
      template: '<input type="text" id="quantity_#= row #" class="k-textbox" value="#= quantity #" />'
    },
    {
      title: 'Reason',
      field: 'reason',
      editable: function (e) { return false; },
      template: '<select id="reason_#= row #" name="reason_#= row #" class="reasoncombo" />'
    }
  ]
  // Omitted for brevity
});

I set editable: function (e) { return false; } to both columns I want to edit so it doesn't use the native editor. 

The documentation reads The JavaScript function executed when the cell/row is about to be opened for edit. The result returned will determine whether an editor for the column will be created.

Now my issue is whenever I change the value of an <input> or select another value from a kendoDropDownList, those fields are not updated and marked as dirty in the dataSource.

I even tried to add `data-bind:"value:quantity"` to the template of my <input>, no luck.

Here is a working fiddle for test purposes.

Is there a way to edit fields without the native editor?

PS: I should add that if I change editable: function (e) { return false; } to return true instead, my <input> and kendoDropDownList get changed to the native editor when clicked and changing values in the editor works just fine, though this is not what I want.

Tsvetomir
Telerik team
 answered on 10 Jul 2020
1 answer
125 views

I have this grid:

01.<div id="SearchDetail">
02.    <div id="SearchResult" style="width:850px"></div>
03.</div>
04.  
05.<script>
06.    function getSearchResult() {
07.        $("#SearchResult").kendoGrid({
08.            dataSource: {
09.                transport: {
10.                    read: {
11.                        url: BASE_URL + "SomeApi/GetRequestList",
12.                        type: "post",
13.                        dataType: "json",
14.                        data: {                       
15.                            CardId: $("#ParkingCardId").val(),
16.                            StatusId: $("#StatusId").val(),
17.                            Status: $("#Status").val()
18.                        }
19.                    }
20.                },
21.                pageSize: 10,
22.                schema: {
23.                    data: "result",
24.                    total: "total"
25.                }
26.            },
27.            groupable: false,
28.            sortable: true,
29.            resizable: true,
30.            pageable: true,
31.            filterable: false,
32.            selectable: "single",
33.            dataBound: function(e) {
34.                for (var i = 0; i < this.columns.length; i++) {
35.                    if (i === 2) {
36.                        continue;
37.                    }
38.  
39.                    this.autoFitColumn(i);
40.                }
41.  
42.                setTimeout(function() {
43.                        $(".k-pager-wrap ul").css({ "margin-left": "0px" });
44.                        $(".k-pager-wrap ul li")
45.                            .css({ "margin-left": "0px", "padding-left": "0px", "list-style-type": "none" });
46.                    },
47.                    100);
48.            },
49.            columns: [ {
50.                    field: "ParkingCardId",
51.                    title: "Card Id",
52.                    template: '<a href="@Url.Action("NewRequest", "Parking")?cardId=#=ParkingCardId#&cardTypeString=View">#=ParkingCardId#</a>'
53.                }, {
54.                    field: "Name",
55.                    title: "Full Name"
56.                }, {
57.                    field: "Status",
58.                    title: "Status"
59.                }, {
60.                    field: "IsExpired",
61.                    title: "Action",
62.                    template: '#if (IsExpired) {# <a href="@Url.Action("NewRequest", "Parking")?cardId=#=ParkingCardId#&cardTypeString=Renew Card">Renew</a> #} else {# #}#'
63.                }, {
64.                    field: "StatusId",
65.                    title: "Action",
66.                    template: '#if (StatusId === 0) {# <input type="button" class="k-button" value="Cancel" onclick="openDialog(#=ParkingCardId#)" #} else {# #}#'
67.                }
68.            ]
69.        });
70.    }
71.</script>

 

How do I get a single Action column with the two conditional actions? The button can be replaced with link.

Ivan Danchev
Telerik team
 answered on 09 Jul 2020
3 answers
691 views

 

I have a page where I am adding multiple treeviews dynamically, using a kendo template.

They are created in a loop from a javascript object.

I build the structure (ul, li, etc.), then after creating the multiple tress, run the $(...).kendoTreeView() with checkbox options.

The treeviews are formatted but as single select and not with checkboxes.

I have created an example (https://dojo.telerik.com/otelaBEL/2).

What is going wrong?

Aleksandar
Telerik team
 answered on 09 Jul 2020
2 answers
163 views
I am implementing a project with a master theme css that is conflicting with the kendo css for Dropdowns. There is gap between the selection field or click and the selection list. Is there a way I can override the master css in the specific page whiles maintaining the master theme. I am using .netcore MVC. Please see the attached pictures...
Gideon
Top achievements
Rank 1
Veteran
 answered on 08 Jul 2020
1 answer
312 views

Hi!

I have a grid setup like below:

<div id="SearchDetail">
    <div id="SearchResult" style="width:850px"></div>
</div>
 
<script>
    function getSearchResult() {
        $("#SearchResult").kendoGrid({
            dataSource: {
                transport: {
                    read: {
                        url: BASE_URL + "SomeApi/GetRequestList",
                        type: "post",
                        dataType: "json",
                        data: {                        
                            CardId: $("#ParkingCardId").val(),
                            StatusId: $("#StatusId").val(),
                            Status: $("#Status").val()
                        }
                    }
                },
                pageSize: 10,
                schema: {
                    data: "result",
                    total: "total"
                }
            },
            groupable: false,
            sortable: true,
            resizable: true,
            pageable: true,
            filterable: false,
            selectable: "single",
            dataBound: function(e) {
                for (var i = 0; i < this.columns.length; i++) {
                    if (i === 2) {
                        continue;
                    }
 
                    this.autoFitColumn(i);
                }
 
                setTimeout(function() {
                        $(".k-pager-wrap ul").css({ "margin-left": "0px" });
                        $(".k-pager-wrap ul li")
                            .css({ "margin-left": "0px", "padding-left": "0px", "list-style-type": "none" });
                    },
                    100);
            },
            columns: [ {
                    field: "ParkingCardId",
                    title: "Card Id",
                    template: '<a href="@Url.Action("NewRequest", "Parking")?cardId=#=ParkingCardId#&cardTypeString=View">#=ParkingCardId#</a>'
                }, {
                    field: "Name",
                    title: "Full Name"
                }, {
                    field: "Status",
                    title: "Status"
                }, {
                    field: "IsExpired",
                    title: "Action",
                    template: '#if (IsExpired) {# <a href="@Url.Action("NewRequest", "Parking")?cardId=#=ParkingCardId#&cardTypeString=Renew Card">Renew</a> #} else {# #}#'
                }, {
                    field: "StatusId",
                    title: "Action",
                    template: '#if (StatusId === 0) {# Show a dialog asking user Y/N. If User press Yes, call Api tp cancel request #} else {# #}#'
                }
            ]
        });
    }
</script>

 

As per the comment on the second column titles Action, I need to show a Dialog with Yes/No option. If user say Yes, then I need to call the request cancel Api and if that returns success, reload the grid.

I need help in this template or a JS function.

Ivan Danchev
Telerik team
 answered on 07 Jul 2020
1 answer
22.9K+ views
I'm trying to put a conditional in a client template and can't figure out where in the docs this is addressed. Could you point me to the correct area? Here's the code that's not working. The conditional is "CanBeOverturned":

columns.Template(@<text></text>).ClientTemplate("<div>Reviewed Date : \\#=SubmissionDateString\\# | \\#=CorrectiveActionName\\# \\# if (CanBeOverturned == true) { <a href='javascript:var t=0;' onclick='javascript:return openOverturn(\"\\#=FeedbackFormId\\#\")' style='float:right;' class='openFeedbackForm')>+ Overturn</a> }</div>");

Thanks in advance for any help you can provide!
Martin
Telerik team
 answered on 07 Jul 2020
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
MultiColumnComboBox
Chat
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Effects
Accessibility
PivotGridV2
ScrollView
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Breadcrumb
Collapsible
Localization
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
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?