EasyUI Forum
May 16, 2024, 03:04:43 AM *
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 / EasyUI for jQuery / After adding onSelectPage event to datagrid pages does not change on datagrid on: October 30, 2022, 11:42:10 PM
I am using EasyUI for jQuery.
I have a datagrid with
Code:
pagination:true
Everything works fine with datagrid.

I want to reset a variable when page of the datagrid changes. 
In order to accomplish this I added following
Code:
 
                $('#dgParent').datagrid('getPager').pagination({
                    onSelectPage:function(pageNumber, pageSize){
                        $(this).pagination('loading');
                        alert('pageNumber:'+pageNumber+',pageSize:'+pageSize+', selectedIndex:'+selectedIndex);
                        selectedIndex=-1;
                        $(this).pagination('loaded');
                    }
                });

when I change the page I see in the alert message that the page number changes. But the page in the screen does not change.
I tried to reload datagrid but nothing changed.

I want to learn what is my problem when onSelectPage event.

Best regards
2  General Category / EasyUI for jQuery / Re: How to prevent multiple selection in multiple subgrids? on: October 27, 2022, 10:15:57 AM
I solved the problem by collapsing the previously expanded row in the main datagrid.

I hold the index of the previously selected row. Then in each expansion of a row, I collapse the previously expanded row.
In this way, only one row is expanded in the master datagrid and this prevents confusion.

This is my code
Code:
 
  var selectedIndex=-1;
   .....................................
  onExpandRow: function (index, row) {

     //collapse previously expanded parent row.
     if (selectedIndex>-1 && selectedIndex!=index)
             $(this).datagrid('collapseRow',selectedIndex);
    
      selectedIndex=index;
      ..................
  }

I am also open to other solutions.
3  General Category / EasyUI for jQuery / How to prevent multiple selection in multiple subgrids? on: October 27, 2022, 05:12:25 AM
We are using EasyUI for JQuery.
In one of the pages I used datagrid and subgrid. (similar to this sample:https://www.jeasyui.com/demo/main/index.php?plugin=DataGrid&theme=material-teal&dir=ltr&pitem=&sort=asc)

When user opens more than one items in the main datagrid, user can select multiple items in different subgrids. The same case occurs in the demo. (You can see on the attachment.)

 I can access the selected item in the subgrid that is under the selected item in the main datagrid. But I can not access the selected items in subgrids under unselected items in the main datagrid.

The selection of multiple items in different subgrids leads to confusion for users when performing operations.

I want to ask whether there is a way of
1 preventing selection in subgrids which are under the unselected item of the main datagrid.
2 selecting item in the main grid when item is subgrid is selected.

I hope I could describe the situation and my expectation.

Best regards

4  General Category / EasyUI for jQuery / Re: How to arrange datagrid filtering for different locales? on: October 26, 2022, 10:32:55 PM
It is working.

I replaced
Code:
toLowerCase()
with
Code:
toLocaleLowerCase('tr-TR') 
for Turkish specific characters.

@jarry Thanks a lot for your help.
5  General Category / EasyUI for jQuery / How to arrange datagrid filtering for different locales? on: October 26, 2022, 10:43:39 AM
We are using easyui for jquery in our application.

In one of the pages I have a datagrid and this datagrid uses clientpaging.
Code:
                  $('#dgTable').datagrid({
                        url:null,
                        autoLoad: true,
                        pageList: [10, 20, 50, 100],
                        clientPaging: true,
                        rownumbers: true,
                        filterMatchingType:'all'
                    });

In this datagrid I added a filter.

Code:
 $('#dgTable').datagrid('enableFilter', [
                         {
        field: 'fieldName',
        type: 'textbox',
        op: ['contains','equal','notequal'],
        options: {
            onChange: function (value) {
                if (value == '') {
                    $('#dgTable').datagrid('removeFilterRule', 'criteriaField');
                } else {
                    $('#dgTable').datagrid('addFilterRule', {
                        field: 'criteriaField',
                        op:  'contains',
                        value: value
                    });
                }
                $('#dgTable').datagrid('doFilter');
            }
        }
    }
                    ]);
It is working for ascii characters but for Turkish specific characters such as ı,İ,Ö,ö,Ü,ü,Ç,ç,Ş,ş,Ğ,ğ it does not work.

Is there any way of using Turkish specific characters for filtering data in datagrid.

Best regards


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