protected void ExportToWord(string gridModel, string fileName) { ZOperationResult operationResult = new ZOperationResult(); try { if (IsExport(operationResult)) { IEnumerable data = Application.SearchAll(operationResult); if (operationResult.Ok) { SyncfusionGrid.ExportToWord(gridModel, data, fileName, AppDefaults.SyncfusionTheme); } } } catch (Exception exception) { operationResult.ParseException(exception); } if (!operationResult.Ok) { gridModel = "{\"columns\":[{\"field\":\"Message\",\"headerText\":\"" + ErrorResources.Error + "\"}]}"; SyncfusionGrid.ExportToWord(gridModel, operationResult.ToDataSet(), fileName, AppDefaults.SyncfusionTheme); } }