Ciao a tutti, questo codice scritto per un GridView, come diventerebbe per un DataGrid?? Ottengo errori in HeaderRow e FooterRow
if (gv.HeaderRow != null)
{
GridViewExportUtil.PrepareControlForExport(gv.Head erRow);
table.Rows.Add(gv.HeaderRow);
}
// add each of the data rows to the table
foreach (GridViewRow row in gv.Items)
{
GridViewExportUtil.PrepareControlForExport(row);
table.Rows.Add(row);
}
// add the footer row to the table
if (gv.FooterRow != null)
{
GridViewExportUtil.PrepareControlForExport(gv.Foot erRow);
table.Rows.Add(gv.FooterRow);
}
// render the table into the htmlwriter
table.RenderControl(htw);

Rispondi quotando