You can traverse the items/columns and build the desired DataTable/DataSet if this is what you are after.
protected override void OnPreRender(EventArgs e)
{
base.OnPreRender(e);
DataTable table = new DataTable();
foreach (GridColumn col in RadGrid1.MasterTableView.RenderColumns)
{
if (col.Visible)
{
table.Columns.Add(col.UniqueName);
}
}
foreach (GridDataItem item in RadGrid1.MasterTableView.Items)
{
List<string> list = new List<string>();
foreach (DataColumn column in table.Columns)
{
list.Add(item[column.ColumnName].Text);
}
table.Rows.Add(list.ToArray());
}
}
Regards,
Daniel
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.