EasyUI Forum
May 21, 2024, 03:38:28 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Some improvements  (Read 41293 times)
acreonte82
Jr. Member
**
Posts: 85



View Profile
« on: October 29, 2013, 06:42:45 AM »

Hello,
my post is only to know if ,in the new version, the crud will have a search function (for each columns)  like kendoui.com crud..

Thanks in advance!!
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: October 30, 2013, 01:16:16 AM »

A datagrid filter example can be found here http://jsfiddle.net/urhv6/.
Logged
acreonte82
Jr. Member
**
Posts: 85



View Profile
« Reply #2 on: October 30, 2013, 03:44:28 AM »

Ok I know, but I mean a search function with logic operator in column..
Like a dropdown menu, foreach columns, with a multiple type of search function with operator  "And/or/not/between.." and "> < =..."

Attached an example
« Last Edit: October 30, 2013, 06:37:49 AM by acreonte82 » Logged
mapner
Jr. Member
**
Posts: 63


View Profile
« Reply #3 on: October 30, 2013, 06:16:34 AM »

stworthy,

Very good example of filter in a grid.
How to use it with remote searching?

thanks
Logged
finzaiko
Newbie
*
Posts: 44


View Profile
« Reply #4 on: November 01, 2013, 10:40:14 PM »

Yes, Im waiting remote searching too  Grin

Thanks stworthy,
Logged
acreonte82
Jr. Member
**
Posts: 85



View Profile
« Reply #5 on: November 02, 2013, 05:36:56 AM »

stworthy,
I'm waiting your answer !!! Grin Grin Grin

Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #6 on: November 02, 2013, 05:54:04 AM »

The feature request for remote filtering has been sent to our develop team. We will release this solution after this develop work is finished.
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #7 on: November 07, 2013, 01:41:45 AM »

The datagrid filter extension is available now. It can be downloaded from http://www.jeasyui.com/extension/datagrid_filter.php.
Logged
arma
Full Member
***
Posts: 110


View Profile
« Reply #8 on: November 10, 2013, 04:07:46 PM »

1. How to make any filter component to be autofit the width with its column header width on load? It only fits if i resize column header manually.
2. How if i want to unfilter a column (no filter component in a certain column) ?
« Last Edit: November 10, 2013, 04:44:31 PM by arma » Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #9 on: November 10, 2013, 06:34:52 PM »

Please download the updated datagrid-filter file from from http://www.jeasyui.com/extension/datagrid_filter.php.
To apply a un-filter component, use 'label' filter as below:
Code:
dg.datagrid('enableFilter', [{
field:'itemid',
type:'label'
}]);
The user can also extend a new filter component. The code below shows how to achieve a 'label' filter.
Code:
$.extend($.fn.datagrid.defaults.filters, {
label: {
init: function(container, options){
return $('<span></span>').appendTo(container);
},
destroy: function(target){
$(target).remove();
},
getValue: function(target){
return $(target).html();
},
setValue: function(target, value){
$(target).html(value);
},
resize: function(target, width){
$(target)._outerWidth(width)._outerHeight(22);
}
}
});
« Last Edit: November 10, 2013, 06:37:00 PM by stworthy » Logged
mapner
Jr. Member
**
Posts: 63


View Profile
« Reply #10 on: November 13, 2013, 05:13:03 AM »

Hi,

I'm using a button for make remote search.
How I can make search while typing the text like local search?

thanks

Code:
<table id="g-tck" title="Tickets" class="easyui-datagrid" style="width:auto;height:auto;" url="<?PHP echo _URL_ ?>tickets/GetPage",
toolbar="#tb1"
pagination="true" fitColumns="true" singleSelect="true">
<thead>
<tr>
<th field="NAME"  sortable="true">Customer</th>
<th field="DATETIME_ADD"  sortable="true">Date/Time</th>   
<th field="TITLE"   sortable="true">Title</th>
<th field="STATE"   sortable="true">State</th>   
</tr>
</thead>
</table>
<div id="tb1" style="padding:5px;height:auto"> 
<div> 
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" plain="true" onclick="doSearch()"></a>
</div>
</div>   

Code:

<script type="text/javascript">

function doSearch(){   

var q_filter = JSON.stringify( $('#g-tck').datagrid('options').filterRules );

$('#g-tck').datagrid('load',{  q_filter: q_filter }); 



$(function(){
var dg = $('#g-tck').datagrid({filterBtnIconCls:'icon-filter'});
dg.datagrid('enableFilter');
dg.datagrid('options').remoteFilter = true;
});

</script>

Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #11 on: November 13, 2013, 06:54:47 AM »

The remote filtering requires the 'url' property set to retrieve data from remote server. When filtering values changed, the 'filterRules' parameter will be sent to remote server.
Code:
$(function(){
var dg = $('#g-tck').datagrid({
filterBtnIconCls:'icon-filter',
url:...,
remoteFilter:true
});
dg.datagrid('enableFilter');
});
Logged
mapner
Jr. Member
**
Posts: 63


View Profile
« Reply #12 on: November 13, 2013, 02:00:35 PM »

stworthy,

great work!

May be you must to include this in the documentation:

"When use remote filtering the 'filterRules' parameter will be sent to remote server in JSON format"

Thanks!
Logged
acreonte82
Jr. Member
**
Posts: 85



View Profile
« Reply #13 on: November 15, 2013, 03:14:55 AM »

Great work!!
thank you for having implemented my idea.
Hope this new feature helped many developers and hope it grow with new features!!
Logged
acreonte82
Jr. Member
**
Posts: 85



View Profile
« Reply #14 on: February 19, 2014, 09:19:20 AM »

stworthy can be a great idea to do a Tutorial/Demo of remote data filtering
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!