Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Filter a grid without using a datasource

    Hi everyone,

    I populate the grid using the code below and it works good.
    Please see my code below.
    Code:
    	for(int i = 0 ; i < contractDateLs.size() ; i++)
    				{
    					
    					ListGridRecord record = new ListGridRecord(); 
    						record.setAttribute("dateReserved",contractDateLs.get(i));
    						record.setAttribute("receiptNumber",receiptNumLs.get(i));
    						record.setAttribute("wholeName", clientNameLs.get(i)); 
    						record.setAttribute("lotDetails", lotDetailsLs.get(i));  
    						record.setAttribute("broker_name", brokerLs.get(i));  
    						
    						record.setAttribute("agent_name", agentLs.get(i)); 
    						record.setAttribute("dueDate",dueDateLs.get(i));  
    						record.setAttribute("amount", amountLs.get(i)); 						
    						record.setAttribute("lotsale", saleIdLs.get(i)); 						
    						record.setAttribute("paymentId", paymentIdLs.get(i)); 						
    						r.add(record);	
    				}		
    				
    				grid.setData(r);
    I also have the code below.
    Code:
    		grid.setShowFilterEditor(true);
    		grid.setFilterOnKeypress(true);
    		grid.setFilterByCell(true);
    		grid.setAutoFetchData(true);
    and here are my ListGridFields.
    Code:
    ListGridField name = new ListGridField("wholeName", "Client Name");
    		ListGridField details = new ListGridField("lotDetails", "Lot Details");
    		ListGridField brokerName = new ListGridField("broker_name", "Broker");
    		ListGridField agentName = new ListGridField("agent_name", "Agent");
    		ListGridField totalAmount = new ListGridField("amount", "Amount Paid");
    		ListGridField paymentDate = new ListGridField("dueDate", "Due Date");
    		ListGridField systemReceipt = new ListGridField("receiptNumber", "System Receipt Number");
    		ListGridField contractDate = new ListGridField("dateReserved", "Contract Date");
    		ListGridField saleId = new ListGridField("lotsale", "Sale ID");
    		ListGridField paymentId = new ListGridField("paymentId", "Payment ID");
    My problem is when i try to filter a particular column.
    Like for example the 'name' ListGridField, the filter has no effect.

    Please help! Thanks.!
    Last edited by tropi_333; 27 Apr 2015, 22:14.
Working...
X