Cell editors not working. [message #449916] |
Mon, 31 January 2005 14:35 |
Eclipse User |
|
|
|
Originally posted by: anunayashish.yahoo.com
I am trying to set cell editor to a table viewer as
CellEditor[] editors = new CellEditor[11];//Because their are 11 columns
in my table
if(i==8){//I want the eighth column to have a check box
CheckboxCellEditor oBox = new CheckboxCellEditor(oTable);
oBox.activate();
editors[i] = oBox;
}
else{
editors[i] = new TextCellEditor(oTable);
}
m_oTblViewer.setCellEditors(editors);//The cell editors are set to the
table here.
In my label provider I have added the function
public Boolean getColumnBoolean(Object element, int columnIndex) {
if(element instanceof PreviewData){
PreviewData oCell = (PreviewData)element;
if(columnIndex==8){
return oCell.getStrState();
}
}
return new Boolean(false);
}
The data fed in the table is as follows:
new PreviewData("12/05/02","12/17/02","1","B","37.00", "N","N","U",new
Boolean(true),"","",""," "," ");
|
|
|
Powered by
FUDForum. Page generated in 0.02971 seconds