.GetItems("className")
is enumerable. It returns a ObjectQuery
of generic CustomTableItem
. So you need to loop through each of those records in order to get a specific record's column values. Then when you're in that record, you loop through the column values. See example below:
var tableItems = CMS.CustomTables.CustomTableItemProvider.GetItems("ClassName");
foreach (CMS.CustomTables.CustomTableItem cti in tableItems)
{
string values = "";
foreach (string columnName in cti.ColumnNames)
{
values += cti.GetStringValue(columnName, "");
}
}