jQWidgets Forums

jQuery UI Widgets Forums Grid nested grid id select error

This topic contains 1 reply, has 1 voice, and was last updated by  mustafa 10 years, 9 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • nested grid id select error #60988

    mustafa
    Participant

    hi
    I’m using the nestedgrid,
    When example I click the add button, But grid id can not found

    0x800a139e - JavaScript çalışma zamanı hatası: Invalid jQuery Selector - #NestedGridDetail! Please, check whether the used ID or CSS Class name is correct.

    // nested grid

    var nestedDataAdapter = new $.jqx.dataAdapter(nestedSource);
            if (grid != null) {
                grid.jqxGrid({
                    source: nestedDataAdapter, editmode: 'selectedrow', selectionmode: 'singlerow', enabletooltips: true, editable: true, width: '98%', height: 200,
                    showtoolbar: true,
                    rendertoolbar: function (toolbar) {
                        var me = this;
                        var container = $("<div style='margin: 5px;'></div>");
                        toolbar.append(container);
                        container.append('<input id="addrowbutton" type="button" value="Add New Expense" />');
                        container.append('<input style="margin-left: 5px;" id="deleterowbutton" type="button" value="Delete Selected Row" />');
                        container.append('<input style="margin-left: 5px;" id="updaterowbutton" type="button" value="Update Selected Row" />');
                        $("#addrowbutton").jqxButton();
                        $("#deleterowbutton").jqxButton();
                        $("#updaterowbutton").jqxButton();
    
                        $("#updaterowbutton").on('click', function () {
                            var selectedrowindex = $("#NestedGridDetail").jqxGrid('getselectedrowindex');                         
                        });
    
                        $("#addrowbutton").on('click', function () {
                            var id = $("#NestedGridDetail").jqxGrid('getdatainformation').rowscount;                        
                        });
    
                        $("#deleterowbutton").on('click', function () {
                            var selectedrowindex = $("#NestedGridDetail").jqxGrid('getselectedrowindex');                        
                        });
                    },
    
     
    
    // master grid
    $("#Gd_ExpensesGrid").jqxGrid(
           {
               width: '98%',
               source: dataAdapter,
               pageable: true,
               sortable: true,
               altrows: true,
               autoheight: true,
               theme: 'arctic',
               initrowdetails: initrowdetails,
               virtualmode: false,
    
               rowdetailstemplate: { rowdetails: "<div id='NestedGridDetail' ></div>", rowdetailsheight: 260, rowdetailshidden: true },
               ready: function () {
                   // $("#Gd_ExpensesGrid").jqxGrid('showrowdetails', 0);
               },
               rowdetails: true,
               rowsheight: 35,
               editable: false,
               columns: window.Gd_ExpensesGrid.columns
           });
    nested grid id select error #60992

    mustafa
    Participant

    hi OK I found the problem
    thanks
    var selectedrowindex = nestedGrids[0].jqxGrid(‘getselectedrowindex’);

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.