The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hi together,
I have a gridgroupingcontrol with an assigned data source. Now when I later add a further column to the datatable which is assigned to the data source of the grid - I get an error when I try the following:
// Get the grid engine
GridEngine engine = this.myGridGrouping.Engine;
GridTableDescriptor parentTD = (GridTableDescriptor)engine.TableDescriptor;
GridTableCellStyleInfo nameStyle = parentTD.Columns["NameOfNewColumn"].Appearance.AnyRecordFieldCell;
I get the error that the "NameOfNewColumn" doesn''t exist. But the column really exists in the datasource property. I think I have to make an update to the engine or the gridgroupingcontrol so that my changes become known. How can this be done?
Regards,
Markus
ADAdministrator Syncfusion Team August 9, 2005 03:22 PM UTC
A couple of ways you can try to handle this.
If you know when you have added the extra column to your datasource, you can try calling TableDescriptor.Columns.Add and also add the column to the grid.
The other thing you can try is calling TableDescriptor.Columns.LoadDefault. This should reload all the columns from teh datasource.
JLJim LIttleDecember 9, 2016 07:09 PM UTC
THIS IS BAD ADVICE:
The problem with calling TableDescriptor.Columns.LoadDefault() is that all customizations already done to the columns (such as the HeaderText value) will be wiped out when LoadDefault() runs.
ARAmal Raj U Syncfusion Team December 13, 2016 01:12 PM UTC
Hi Jim,
Thanks for your update.
We have updated the details regarding your query in the incident 168943. Please refer to the incident 168943 for better follow up.