You need the option to have different cell editors in different rows of one column. The following example shows how to proceed if you want to implement an InputField instead of a TextView in the first table row.
wdDoInit() |
|
for(int i =0; i<3; i++){ ITableElement elem = wdContext.createAndAddTableElement(); elem.setCol1("some content for column 1" ); if(i==0)elem.setCellVariant("variant1"); else elem.setCellVariant(""); } |
The first node element's cell variant is set to variant1 and this is what you have defined as variantKey for the TableStandardCell. For the other elements an empty string is set. This means that no variant is set and these rows are displayed with the TableColumn'scell editor.
As shown in the screenshot below, the first row is displayed with an InputField and the other rows with a TextView.