Tuesday, March 24, 2015

Re: Hide Column in CellTable

From the below thread

 Lot of suggestion is to use add/removeColumnStyleName but i used the same in my code but still not able to hide the column.See the below code snippet..

Code:
TextColumn<ContactInfor> empIdTxt = new TextColumn<ContactInfor>() {
@Override
public String getValue(ContactInfor object) {
return object.empId;
}
};
cellTable.addColumn(empIdTxt, "EMPLOYEE ID");

TextColumn<ContactInfor> addressTxt = new TextColumn<ContactInfor>() {
@Override
public String getValue(ContactInfor object) {
return object.address;
}
};
cellTable.addColumn(addressTxt, "ADDRESS");
cellTable.setRowData(loadContactInfo());
cellTable.addColumnStyleName(1, "hide"); // added stylename to the Column with index 1
CSS:
Added this class in stylesheet
  .hide {
display: none;
    }   
Is any other think is missed out here?

On Tuesday, March 24, 2015 at 4:13:55 PM UTC+5:30, Abdullah wrote:
Hi,
How to hide the columns in gwt Cell table?I need column for grouping purpose but don't want to show in table.Is there any way to hide..Any clue?

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment