want to create expandable grid using telerik kendo controls. arrow is not coming for grid. can anyone please help me. using vb.net mvc.

0 Answers 102 Views
Data Source Grid
sonali
Top achievements
Rank 1
sonali asked on 21 Nov 2022, 07:14 AM

I have written detail expand function on index page and my kendo grid is on another page. my other functions are accessible but can't access detail expand and other functions related to kendo grid. need vb.net mvc code. 
can anyone please help.

 

function detailExpand(e) {           
            if (expandedRow != null && expandedRow[0] != e.masterRow[0]) {
                var grid = $('#drgdgrid').data('kendoGrid');
                $(".k-master-row").each(function (index) { grid.expandRow(this); });
                grid.collapseRow(expandedRow);
                expandedRow.next().remove();
            }
            expandedRow = e.masterRow;
            //id = expandedRow[0].cells[0].innerText;
            var masterDataItem = $('#drgdgrid').data('kendoGrid').dataItem(expandedRow);
            expandedDataItem = masterDataItem;
            if (masterDataItem.code != null && masterDataItem.code != '') {
                $(".hideAddButton").hide();
           }
            else {
               $(".hideAddButton").show();
            }

            

        }
Georgi Denchev
Telerik team
commented on 23 Nov 2022, 12:34 PM

Hi, Sonali,

Functions that are related to the Kendo Components (such as event handlers, template functions, etc.) must be accessible from the global context.

My advice would be to create a separate myScripts.js file, have your custom JS logic in that file and then simply include it in your Layout so that the functions are accessible from every part of your project.

Let me know if you have any questions.

Best Regards,

Georgi

No answers yet. Maybe you can help?

Tags
Data Source Grid
Asked by
sonali
Top achievements
Rank 1
Share this question
or