BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
Query |
Response |
what is the exact difference between below two codes?
Record parentRecord = e.TableCellIdentity.Table.TableModel.FilteredChildTable.ParentDisplayElement.ParentRecord;
Record parentRecord = e.TableCellIdentity.DisplayElement.ParentChildTable.ParentNestedTable.ParentRecord;
|
These two code will returns the same record. These are the ways to get the corresponding parent record from child table record. So you can use any one of those methods to get the parent record.
|
Assigned text in cell which is having Checkbox control, but the text is not displayed in UI |
In order to set the text for checkbox , use the Style.Description property instead of Style.Text.
Code example:
e.Style.CellType = GridCellTypeName.CheckBox;
e.Style.Description = "CustomText";
|
Initially, On form load all my records is in collapse state. If I am exporting data to excel without doing expand, nested table cell values that are changed in QueryCellStyleInfo not exported properly. |
We could able to understand your scenario. By default, the child table records can be accessed in QueryCellStyleInfo event when that child table is in expanded state only otherwise its records are not accessed in QueryCellStyleInfo event. So that the customization of child table records was not exported to excel if it is in Collapsed state.
If you want to export the nested table customization which is done in QueryCellStyleInfo event, you need to expand the nested tables before exporting.
In the attached sample, the nested tables are expanded before exporting and collapsed after exported the grid to excel.
Code example:
if (saveFileDialog.ShowDialog() == DialogResult.OK)
{
this.gridGroupingControl1.Table.ExpandAllRecords();
ExportToExcel(saveFileDialog.FileName);
Process.Start(saveFileDialog.FileName);
this.gridGroupingControl1.Table.CollapseAllRecords();
} |