EasyUI Forum
October 16, 2025, 09:40:20 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1]
1  General Category / General Discussion / extend DeleteRowSelected on: May 30, 2013, 12:07:41 PM
This is my code the problem I have is that once you take the selected rows and the index change causes me wrong, someone had a similar problem ah, thank you.

Code:
    $.extend
    (
        $.fn.datagrid.methods,
        {
            DeleteRowSelected: function (jq) {
                return jq.each
                (
                    function () {
                        //var row = $(this).datagrid('getSelected');
                        //if (row) {
                            //var idx = $(this).datagrid('getRowIndex', row);
                            //$(this).datagrid('deleteRow', idx);
                        //}
                        var Me = $(this);
                        $.each(Me.datagrid('getSelections'), function (i, item) {
                              var idx = Me.datagrid('getRowIndex', item);
                              Me.datagrid('deleteRow', idx);
                        });
                    }
                )
            }
        }
    );


Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!