That's exactly what I tried to explain to Mario. Thanks Janak!

Regards, Etienne



> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:ulc-developer-
> [EMAIL PROTECTED] On Behalf Of Janak Mulani
> Sent: Wednesday, July 26, 2006 5:50 AM
> To: Mario H. Castillo
> Cc: [EMAIL PROTECTED] Com
> Subject: RE: [ULC-developer] getCellEditor(int row, int col)
> 
> Hi Mario,
> 
> In ULC, you set cell editor on a ULCTableColumn using:
> 
>    setCellEditor(ITableCellEditor cellEditor)
> 
> For ITableCellEditor you need to implement:
> 
>     public IEditorComponent getTableCellEditorComponent(ULCTable
table,
> Object value, int row) {}
> 
> In this method you can return different cell editor components based
on
> row
> and column. For instance:
> 
>  public class MyCellEditor implements ITableCellEditor {
> 
>         private int fColumnId;
>         private ULCTextField fEditorComponent1;
>         private ULCTextField fEditorComponent2;
> 
>         public MyCellEditor(int columnId) {
>             fColumnId = columnId;
> 
>             fEditorComponent1 = new ULCTextField();
>             fEditorComponent1.setDataType(new ULCStringDataType());
> 
>             fEditorComponent2 = new ULCTextField();
>             fEditorComponent2.setDataType(new
> ULCDateDataType("dd.MM.yyyy"));
>         }
> 
> 
>         public IEditorComponent getTableCellEditorComponent(ULCTable
> table,
> Object value, int row) {
>             if ((row % 2 == 0) && (fColumnId % 2 == 0)) {
>                 return fEditorComponent1;
>             } else {
>                 return fEditorComponent2;
>             }
>         }
>     }
> 
> I hope this helps.
> 
> Thanks and regards,
> 
> Janak
> 
> 
> 
> >-----Original Message-----
> >From: [EMAIL PROTECTED]
> >[mailto:[EMAIL PROTECTED] Behalf Of Mario H.
> >Castillo
> >Sent: Tuesday, July 25, 2006 11:57 PM
> >To: [EMAIL PROTECTED] Com
> >Subject: [ULC-developer] getCellEditor(int row, int col)
> >
> >
> >Hello,
> >
> >I am pretty sure you answered these question dozen of times
> >before, in Swing
> >I can augment the function "TableCellEditor getCellEditor(int row,
> >int col)"
> >in order to create a TableCellEditor per row/col rather than
> >column based,
> >in my case I need to know the row also.
> >
> >How do I do this in ULC?
> >
> >Mario
> >
> >_______________________________________________
> >ULC-developer mailing list
> >[email protected]
> >http://lists.canoo.com/mailman/listinfo/ulc-developer
> 
> _______________________________________________
> ULC-developer mailing list
> [email protected]
> http://lists.canoo.com/mailman/listinfo/ulc-developer
_______________________________________________
ULC-developer mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/ulc-developer

Reply via email to