/**
 *	@brief	Adds one item to the control.
 *	@param[in]	texts	item texts for each column.
 *	@param[in]	data	associated data of adding item.
 *	@return	the index of added item.
 */
SInt32 BeColumnListViewAdapter::AddItem(ConstAStr* texts, void* data)
{
	BColumnListView* listView = getColumnListView();

	BeDataRow* row = new BeDataRow();
	SInt32 ix;
	for (ix = 0; ix < columnCount; ++ix)
	{
		row->SetField(new BStringField(texts[ix]), ix);
	}
	row->SetItemData(data);
	listView->AddRow(row);
	
	return listView->CountRows() - 1;
}
/**
 *	@brief	Returns item count in the control.
 *	@return	item count.
 */
SInt32 BeColumnListViewAdapter::GetCount()
{
	BColumnListView* listView = getColumnListView();
	return listView->CountRows();
}