Header Checkbox Selection/Deselection in GridPanel with filter.

  1. #1

    Header Checkbox Selection/Deselection in GridPanel with filter.

    Hi,

    I have implement a grid with filter. Here I have tabs and the grid load the value according to tab which is also filter data accordingly. for example,
    I have two tabs one for amount $2000 and second for $3000 then grid load data for amount $2000 if tab one is selected (filter value is $2000). when I change the tab filter value is changed to $3000.

    Now the problem comes with header checkbox click it select all data rows come under both tabs. it select or deselect rows when I select one tab header check box. Image can help to understand the senerio.
    Code for Tab Change:
    <TabChange Handler="if(_flag!=0) {var _selView = #{cmbView}.getValue();
    var Unformatpremium;
    Unformatpremium = UnformatMoney(tab.text);
    ((_faceAmountHasNoProduct.indexOf(','+Unformatprem ium+',') != -1 && _selView == 1) || ((_faceAmountHasNoSelectedProduct.indexOf(','+Unfo rmatpremium+',') != -1 && _selView != 1)))
    item.suspendEvents();
    item.setActiveTab(_prevSelFaceAmtTab);
    item.resumeEvents();
    {hdnActiveTabIndex}.setValue(item.items.findIndex( 'id',item.getActiveTab().id));
    var _msg = 'No product is available for '+FormatMoney(tab.title)+' face amount(s).';
    Ext.Msg.alert('Message', _msg);
    }
    else
    {
    if(_selView == '1')
    GetRecordsForSelAmount(#{GridPanelListView},#{Colu mnModel3},Unformatpremium,_selView,false);
    else if(_selView=='4')
    GetRecordsForSelAmount(#{GridPanelCompareView},#{C olumnModelCV},Unformatpremium,_selView,false);
    }}

    Header Click Code:
    function ListHeaderClick(ct, column, e,t,eopts)
    {var colId = column.text;
    if(colId=='Product' || colId=='Premium' || colId=='Class') {
    var sortField = '';
    var sortDir = 'ASC';
    var sortState = ct.getRefOwner().getStore().getSorters()[0].direction;
    sortField='Carrier';
    if (sortState != null && sortState != undefined){
    if (sortState == 'ASC') { sortDir = 'DESC'; }
    } ct.setSortState(sortField, sortDir);
    showLayer();
    ct.getRefOwner().getStore().clearFilter();
    var amt = UnformatMoney(<%=TabStripListView.ClientID%>.getAc tiveTab().text);
    ct.getRefOwner().getStore().filter('Amount',new RegExp('^'+amt+'$'));
    setTimeout('hideLayer();',1000);
    return false;
    }
    Attached Thumbnails Click image for larger version. 

Name:	untitled.PNG 
Views:	15 
Size:	29.5 KB 
ID:	7459  

Similar Threads

  1. Replies: 1
    Last Post: Dec 04, 2013, 10:53 AM
  2. Replies: 1
    Last Post: Sep 27, 2013, 4:06 PM
  3. [CLOSED] Gridpanel Filter column and Header Group
    By Marcelo in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Feb 06, 2013, 10:17 AM
  4. Replies: 4
    Last Post: Oct 06, 2010, 9:08 AM
  5. Replies: 3
    Last Post: Aug 13, 2010, 4:25 PM

Tags for this Thread

Posting Permissions