Hi,
i want to format Date or number inside cell
Hi ueldeep,
In order to format dates and numbers you will have to create your own column definitions. Inside the column definition there is an overrideable method called getCell() which you can use to format the cell text. I have attached a sample application that demonstrates this.
Please be aware that the Android controls are still CTP so they are subject to change.
Thank you for answer
i am still have problem i format data dependent on some others data in row (adapter object)
i need to know how get object from adapter
The igListAdapter in the custom column definition has a getDataSource() method. You can call the get() method off of the data source, passing in the index of the item you want, and this will give you the underlying row item. You can get the row index through the igCellPath. It has a getRow() method. So your code would look like this:
int rowIndex = igCellPath.getRow();MyRowData item = (MyRowData)igListAdapter.getDataSource().get(rowIndex);
if (item.getSomeProperty() == "some value"){ // apply some format ... // set the cell text to the formatted text cell.getTextView().setText(formattedText);}