Telerik Forums
Kendo UI for jQuery Forum
4 answers
12.2K+ views

Hi,

 

I am using the selectable column to select checkboxes, I need to disable the checkboxes for a few rows based on a value from the dataset for the particular row.

 

On the event of the grid "edit", I am disabling editing for certain rows based on a condition but the checkboxes for those rows can still be checked. I need to prevent/disable checking of the checkbox for the same rows based on the same condition.

 

I have to use the selectable column for checkboxes and not a custom template.

 

I have defined the grid below.

Grid Definition

$("#grid").kendoGrid({
        dataSource: DataSource,
        pageable: {
            pageSizes: true
        },
        filterable: {
            extra: false,
            operators: {
                string: {
                    startswith: "Starts with",
                    contains: "Contains",
                    eq: "Is equal to",
                    neq: "Is not equal to"
                }
            }
        },
        sortable: true,
        groupable: true,
        editable: true,
        resizable: true,
        scrollable: false,
        detailInit: detailInit,
        toolbar: ["Save", "Cancel"],
        edit: function (e) {
            if (e.model.ClaimStatus != ClaimStatusCode.Draft && e.model.ClaimStatus != ClaimStatusCode.Complete && e.model.Status != ClaimLineItemStatusCode.Rejected) {
                e.sender.closeCell();
            }
        },
        excelExport: generateExcelFile,
        dataBound: function () {
            highlightFailedClaimLines();
        },
        columns:
            [
                { selectable: true, width: "50px" },
                { field: "ValidationStatus", title: ResourceLabels.Label_ValidationStatus, hidden: true },
                { field: "Id", title: ResourceLabels.Label_Grid_CustomerName, hidden: true },
                { field: "IsOverridden", title: ResourceLabels.Label_Override },
                { field: "OverrideReason", title: ResourceLabels.Label_OverrideReason },
                { field: "RuleFailure", title: ResourceLabels.Label_RuleFailure, hidden: true },
                { field: "ValidationError", title: ResourceLabels.Label_ValidationError, hidden: true }
            ],
        change: onCheckBoxSelect,
        saveChanges: gridSaveChanges,
    });
Anton Mironov
Telerik team
 answered on 13 Nov 2020
5 answers
1.3K+ views

I am using Kendo UI to display the dynamic menu. How do I make this as Responsive design menu without using kendoResponsivePanel? Do you have any other menu control to have this functionality? Here is my code snippet. Please advise.

@model ghi.Domain.Models.Menu.MenuItemList
@using Kendo.Mvc.UI.Fluent
@using ghi.Domain.Models.Menu
@functions{
    public void addChildren(MenuItemBuilder builder, MenuData item, MenuItemList items)
    {
        var children = items.data.Where(m => m.MenuParentID == item.MenuID);
        if (children != null)
        {
            builder.Items(menuItems =>
            {
                foreach (var child in children)
                {
                    var menuItem = menuItems.Add().Text(child.MenuText);
                    addChildren(menuItem, child, items);
                }
            });

        }
    }
}

@(Html.Kendo().Menu()
    .Name("menu")
    .Items(menu =>
    {
        menu.Add().Text("Home");
        foreach (var item in Model.data.Where(m => m.MenuParentID == null || m.MenuParentID == 0))
        {
            var builder = menu.Add().Text(item.MenuText);
            addChildren(builder, item, Model);
        }
    }))

Martin
Telerik team
 answered on 13 Nov 2020
7 answers
652 views

Hi,

I am following this https://github.com/telerik/kendo-ui-core/blob/master/docs/api/javascript/data/pivotdatasource.md to build a pivot grid. 

How can I check the data source that is used in the following read method? I want to take a look at the structure and build my own olap data source. But when I click the link, it gives 500 error.

<script>
var dataSource = new kendo.data.PivotDataSource({
  type: "xmla",
  measures: {
      values: ["[Measures].[Internet Order Lines Count]", "[Measures].[Days Current Quarter to Date]"],
      axis: "rows"
  },
  transport: {
    connection: {
        catalog: "Adventure Works DW 2008R2",
        cube: "Adventure Works"
    },
  },
  schema: {
    type: "xmla"
  }
});
dataSource.fetch();
</script>
Preslav
Telerik team
 answered on 13 Nov 2020
1 answer
146 views

Hello dear friends
I wrote a function that is basically a series of images with an animation function, which I want to use as a slider, but when I put it in the setInterval function to do it every 8 seconds, for example, instead of repeating, it delays 8 seconds and once the function Does, the code I wrote:

setInterval(function () { myslider() }, 3000);
    function myslider() {
        $('#slide-one-one').delay(500).fadeIn();
        $('#slide-one-two').delay(1500).animate({ 'opacity': '1', 'top': '150px', 'z-index': '3' });
        $('#slide-titr-one').delay(2500).animate({ 'opacity': '1', 'left': '600px', 'top': '40px', 'font-size': '60px' }, 'fast', function () {
            $('#slide-one').delay(2000).fadeOut(function () {
                $('#slide-two-two').animate({ 'width': '280px', 'height': '437px' }, function () {
                    $('#slide-two-man').animate({ 'bottom': '0px' }, function () {
                        $('#slide-two-titr').fadeIn('slow').animate({ 'left': '750px', 'top': '80px' }, function () {
                            $('#slide-two-one').animate({ 'opacity': '1' }, function () {
                                $('#slide-two').delay(2000).fadeOut(function () {
                                    $('#slide-tree-one').animate({ 'height': '270px' }, function () {
                                        $('#slide-tree-titr').animate({ 'opacity': '1' }, 'slow', function () {
                                            $('#slide-tree-two').fadeIn(function () {
                                                $('#slide-tree-tree').fadeIn(function () {
                                                    $('#slide-tree').delay(2000).fadeOut();
                                                });
                                            });
                                        });
                                    });
                                });
                            });
                        });
                    });
                });
            });
        });
    };

Martin
Telerik team
 answered on 13 Nov 2020
4 answers
3.2K+ views
Hello,

I have kendo window that pops up at the click of a link as shown below. Inside the window I have an input box which when changed gets data from the server
and displays the same on the kendo grid. The problem is, once I close the which and I re-open it, the previous data still shows. How can I clear the
currently loaded data on the close of the Kendo window?

Below is my Home/Index.vbhtml and Application/Index.vbhtml (which opens in a window as a partial view)

Regards.

Home/Index.vbhtml

<a href="#" onclick='openWindow()'>Open Window</a>

<div id="Window">@Html.Partial("~/Views/Application/Index.vbhtml")</div>

<script>
    function openWindow() {
        $("#Window").kendoWindow({
            actions: ["Close"],
            width: 1290,
            height: 580,
            modal: true,
            title: "Loan Application",
            visible: false
        }).data("kendoWindow").center();
        $("#Window").data("kendoWindow").open();
    };
</script>


Application/Index.vbhtml

<input autocomplete="off" id="TxtUserID" />

<div id="grid"></div>

<script>
    $(function () {
        $('#TxtUserID').change(function () {
            LoanDataGrid()
        })
    });
</script>

<script>
    function LoanDataGrid() {
        var UserID = $("#TxtUserID").val();

        $("#grid").kendoGrid({
            dataSource: {
                     transport: {
                        read: {
                            data: { UserID: UserID },
                            dataType: "json",
                            url: '@Url.Action("Grid", "Application")',
                        }
                    },
                    schema: {
                        model: {
                            fields: {
                                Id: { type: "string" },
                                Name: { type: "string" },
                                Age: { type: "string" }
                            }
                        }
                },
                pageSize: 1
            },
            toolbar: ["search"],
            height: 205,
            scrollable: true,
            persistSelection: true,
            columns: [
                { field: "Id", title: "Id", width: "50px" },
                { field: "Name", title: "Name" },
                { field: "Age", title: "Age" },
            ]
        });
    };
</script>
Martin
Telerik team
 answered on 13 Nov 2020
5 answers
348 views

Hello,

 

How can I grab the #CIRCULAR! text/string from the cell?

This occurs when there is a formula error on the formula column.

 

I am trying to create a validation method that will validate the spreadsheet on the UI has no #CIRCULAR! errors before allowing the user to Submit their changes to the backend, if #CIRCULAR! is present in the spreadsheet, I will show a popup letting the user know #CIRCULAR! exist in a specific row.

 

Thank you!

Vincent
Top achievements
Rank 1
 answered on 12 Nov 2020
8 answers
753 views
Hello,

I am using Kendo Grid and the model is a dynamic one where i have a list of column names from an XML file and table Name and so i have to use a datatable model which varies depending on table Name and fields specified in XML file. i would like to have Inline editing in place, but when i add .Editable(editable => editable.Mode(GridEditMode.InLine)) i get error.
"Templates can be used only with field access, property access, single-dimension array index, or single-parameter custom indexer expressions."

If i try creating custon button and try to make selected row editable in jquery i canot successfully acieve that using grid.editRow. It just makes first cell editable .

Is it possible to use Inline editing with datatable model? If now how else can i achieve with custom button Edit which changes to update cancel and does the required function.

Thanks

Anamika
Kiran
Top achievements
Rank 1
Veteran
Iron
 answered on 12 Nov 2020
4 answers
770 views

I am looking to create a collection of quizzes for our HR training.  From the database side i would like to send in a list of questions and answers in a JSON object.  From that JSON, I want to dynamically create the dom for the web quiz using templates in kendo for jquery.  I found some articles and read up a bit about templates in telerik and thought that the template works for what I need.  I found an example on the forums and have modified it try to add the radiobutton group for multiple choice question or true\false and Yes\No questions.  So in my example, I can't get the radio buttons to show in the nested template.  What am I missing with regards to the radio template only showing as an object but not rendering the actual radio buttons.  

 

https://dojo.telerik.com/iwuQaJUz

Veselin Tsvetanov
Telerik team
 answered on 12 Nov 2020
12 answers
669 views

We used kendo editor for content management. When we add the data the kendo-window popup, the cursor goes to top of the editor. This issue occure in Internet explorer. But chrome it is working fine. Please help me out of this.

 

Regards,

Ayyappan M

Neli
Telerik team
 answered on 12 Nov 2020
5 answers
132 views

Hi team,

<Tooltip bad positioned when autohide:false>

 

See your own demo for an example.

I will appreciate a workaround.

Also, sorry but the new style of the callout is ugly and lack visibility.

That said, thank you for the great job done with kendo ui.

Laurent.

 

Stoyan
Telerik team
 answered on 11 Nov 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?