foreach (DataRow drRow in
dtTable.Rows)
{
int
index = drRow.Table.Columns["ColumnName"].Ordinal;
}
foreach (DataColumn dc in
dtReport.Columns)
{
int index = dc.Ordinal;
}
foreach
(DataRow drTempRow in
dtReport.Rows)
{
int rowIndex = dtReport.Rows.IndexOf(drTempRow);
if (rowIndex > 1)
{
object sumObject;
sumObject =
dtReport.Compute("Sum(Total)", "EmpID = 5");
}
}
No comments:
Post a Comment