IRow Interface
In This Article
A row of data in a ITable.
Namespace: DevExpress.DataAccess.Sql.DataApi
Assembly: DevExpress.DataAccess.v24.2.dll
NuGet Package: DevExpress.DataAccess
#Declaration
#Related API Members
The following members return IRow objects:
#Remarks
Use index notation to access individual table rows (ITable.Item).
#Example
The following example illustrates how to use the SqlDataSource.Result property to extract all data records from an SqlDataSource and pass them to a corresponding DataTable object.
using DevExpress.DataAccess.Sql;
using DevExpress.DataAccess.Sql.DataApi;
using System;
using System.Data;
using System.Linq;
using System.Windows.Forms;
// ...
private void button1_Click(object sender, EventArgs e) {
XtraReport1 report = new XtraReport1();
SqlDataSource ds = report.DataSource as SqlDataSource;
ds.Fill();
ITable src = ds.Result["Categories"];
DataTable dest = new DataTable("Categories");
foreach (IColumn column in src.Columns)
dest.Columns.Add(column.Name, column.Type);
foreach (IRow row in src)
dest.Rows.Add(row.ToArray());
}
See Also