protected DataTable GetSpreadDataSource()
{
object dataSrc = FpSpread1.DataSource;
if (dataSrc == null)
{
return null;
}
if (dataSrc is DataTable)
{
return dataSrc as DataTable;
}
else if (dataSrc is DataSet)
{
return (dataSrc as DataSet).Tables[0];
}
else
{
return null;
}
} |