Hi,
In the PreRender event of our Radgrid we have a loop to make some rows, one column, editable:
Having added an Export to Excel button to the grid I notice that the items that were set to Edit = true does not get exported.
I tried the following
But that did not help. It seems that once an item have been editable it can not be exported using the built in export functionality.
Is this really so or is it just ignorance on my part? Any ideas?
Regards,
Hans
In the PreRender event of our Radgrid we have a loop to make some rows, one column, editable:
protected void RadGridFailureReportSearch_PreRender(object sender, EventArgs e) { string strPreviousFailureReportNbr = string.Empty; foreach (GridItem item in RadGridFailureReportSearch.MasterTableView.Items) { GridEditableItem editedItem1 = (GridEditableItem)item; if (editedItem1.GetDataKeyValue("ID").ToString() != strPreviousFailureReportNbr) { strPreviousFailureReportNbr = editedItem1.GetDataKeyValue("ID").ToString(); if (item is GridEditableItem) { GridEditableItem editableItem = item as GridDataItem; editableItem.Edit = true; } } else { if (item is GridEditableItem) { GridEditableItem editableItem = item as GridDataItem; editableItem.Edit = false; } } } RadGridFailureReportSearch.Rebind(); }Having added an Export to Excel button to the grid I notice that the items that were set to Edit = true does not get exported.
I tried the following
protected void RadGridFailureReportSearch_ItemCommand(object sender, GridCommandEventArgs e) { if (e.CommandName == RadGrid.ExportToExcelCommandName) { RadGridFailureReportSearch.ExportSettings.IgnorePaging = true; foreach (GridItem item in RadGridFailureReportSearch.MasterTableView.Items) { if (item is GridEditableItem) { GridEditableItem editableItem = item as GridDataItem; editableItem.Edit = false; } }
// Tried with and without below line RadGridFailureReportSearch.Rebind(); } }But that did not help. It seems that once an item have been editable it can not be exported using the built in export functionality.
Is this really so or is it just ignorance on my part? Any ideas?
Regards,
Hans