Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Filter a grid without using a datasource

$
0
0
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.!

Viewing all articles
Browse latest Browse all 4756

Trending Articles