You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by SrinivasaRaju Ch <sr...@sifycorp.com> on 2009/02/26 05:20:21 UTC

SortableDataView

Hi,

 How can i add a check box in the header column by using 
DefaultDataTable class , While using sortable dataview we have to pass
 IColumn[] columns as parameter to  DefaultDataTable class .
Ex:  DefaultDataTable<EmployeeDetails> dataTable =
                new DefaultDataTable<EmployeeDetails>("entries", 
columns, provider, 4);
                add(dataTable);

where columns is the IColumn[]  in which i have to place the headers . 
Now i want to place a check box in the header column as first column
followed by some other columns ex:
 IColumn[] columns = {
             
            new AbstractColumn<EmployeeDetails>(new 
Model<String>("CheckBox")){
                    public void 
populateItem(Item<ICellPopulator<EmployeeDetails>> cellItem, String 
componentId,
                        IModel<EmployeeDetails> model){
                        cellItem.add(new CheckboxPanel(componentId, model));
                    }
            },
            new PropertyColumn<EmployeeDetails>(new Model<String>("EMP 
ID"),"empId"),
            new PropertyColumn<EmployeeDetails>(new 
Model<String>("Employee Name"), "employeeName")
}

But i unable to place a check box as header in the above  code . Please 
tell me how to do it.

Regrds,
Srinivasa Raju CH.
         


Get your world in your inbox!

Mail, widgets, documents, spreadsheets, organizer and much more with your Sifymail WIYI id!
Log on to http://www.sify.com

********** DISCLAIMER **********
Information contained and transmitted by this E-MAIL is proprietary to 
Sify Limited and is intended for use only by the individual or entity to 
which it is addressed, and may contain information that is privileged, 
confidential or exempt from disclosure under applicable law. If this is a 
forwarded message, the content of this E-MAIL may not have been sent with 
the authority of the Company. If you are not the intended recipient, an 
agent of the intended recipient or a  person responsible for delivering the 
information to the named recipient,  you are notified that any use, 
distribution, transmission, printing, copying or dissemination of this 
information in any way or in any manner is strictly prohibited. If you have 
received this communication in error, please delete this mail & notify us 
immediately at admin@sifycorp.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org