Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
135
Export in Webdatagrid
posted

Hi 

I am working on excel export\import in webdatagrid.I want to add a text "Please Note: Do Not Update Columns A - B! Only data in column C will be imported! \nBefore beginning, select all cells with a green triangle, right click, and select 'Convert to Number'" at the top row as shown in attached image.I am not able to do so.My code is

protected void btnExportToExcel_Click(object sender, EventArgs e)
{

BindStatisticData();

logutils.createLogEntry(1, "Statistics Export for MI: " + currentMI.modelInstanceID, loggedInUserID);

Infragistics.Documents.Excel.Workbook workbook = new Infragistics.Documents.Excel.Workbook();

workbook.Worksheets.Add(currentMI.modelInstanceID.ToString().Substring(0, 31).Replace("-", ""));

workbook.Worksheets[0].Rows[0].Cells[0].Value = "Please Note: Do Not Update Columns A - B! Only data in column C will be imported! \nBefore beginning, select all cells with a green triangle, right click, and select 'Convert to Number'.";

Response.ClearHeaders();
WebExcelExporter1.Export(dgCompanyStats, workbook);

//UltraWebGrid1.Bands[0].Columns[1].Hidden = false;
//UltraWebGrid1.Bands[0].Columns[6].Hidden = false;
//UltraWebGrid1.Bands[0].Columns[7].Hidden = false;
//UltraWebGrid1.Bands[0].Columns[8].Hidden = false;
//UltraWebGrid1.Bands[0].Columns[9].Hidden = false;

}

Please help how to do this?