PDA

View Full Version : How to add check box / radio button



sundhar_v
13 Aug 2009, 5:27 PM
Hi

I want to add Check box / Radio button in a summary page. For this i am using table object. Pl. help me how to achieve this. for your quick reference i am giving my code below

public PayeeModifyInitial(){

ContentPanel Cp = new ContentPanel();
Cp.setHeading( "Card Statement" );
Cp.setCollapsible( true );
Cp.setFrame( true );
Cp.setBorders( true );
Cp.setPosition(0, 0);
Cp.setSize( "99.5%" , "auto" );
Cp.setButtonAlign(HorizontalAlignment. CENTER );

add(Cp);

CheckBox check1 = new CheckBox();
// check1.setBorders(true);
// check1.setVisible(true);


TableColumn tableColumn1 = new TableColumn( "Delete" , "<b>Delete</b>" ,70);
TableColumn tableColumn2 = new TableColumn( "NIN-Title" , "<b>Card Holder Name</b>" ,270);
TableColumn tableColumn3 = new TableColumn( "Cust-Name-Title" , "<b>Card Number</b>" ,220);
TableColumn tableColumn4 = new TableColumn( "NINNo1" , "<b>Card Type</b>" , 200);
TableColumn tableColumn5 = new TableColumn( "Dh" , "<b>Available Balance</b>" , 200);


List<TableColumn> tableColumnList = new ArrayList<TableColumn>();
tableColumnList.add(tableColumn1);
tableColumnList.add(tableColumn2);
tableColumnList.add(tableColumn3);
tableColumnList.add(tableColumn4);
tableColumnList.add(tableColumn5);




TableColumnModel tableColumnModel = new TableColumnModel(tableColumnList);
Object[] tableObject = new Object[] { check1, "FAWAZ A SAAD" , "4938********011" , "VISA GOLD" , "96,602.45(QAR)" };
//Object[] tableObject1 = new Object[] {add(check1)};

TableItem tableItem = new TableItem(tableObject);
Table table = new Table(tableColumnModel);
table.add(tableItem);
table.setWidth( "99.5%" );
table.setHeight( "500" );




Cp.add(table);
// Cp .add(check1);

file:///C:/Documents%20and%20Settings/Sundharamoorthi/Desktop/1.jpg

Arno.Nyhm
14 Aug 2009, 8:27 AM
please attach your immage as attachement (look for the button "Manage Attachments")


you like a check box like in this examples?
http://extjs.com/examples/explorer.html#gridplugins