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 I am using DataBoundGrid.
I create dataset which has two tables QueryThread and Queries.
ds.Tables.Add(queryThreadTable);
ds.Tables.Add(queryTable);
ds.Relations.Add("QueryThreadQuery",queryThreadTable.Columns["QueryThreadGuid"],queryTable.Columns["QueryThreadGuid"]);
dv = new DataViewManager(ds);
I set a row filter to QueryThread table
dv.DataViewSettings["QueryThreads"].RowFilter = "OpenClose = ''Automatic Open''";
Now when I try following code It returns undefined value in ''queryLevel'' variable.
this.gridModel = this.gridDataBoundGrid1.Model;
this.gridBinder = this.gridDataBoundGrid1.Binder;
// Reduce flicker
this.gridDataBoundGrid1.BeginUpdate();
gridModel.Options.AllowSelection = GridSelectionFlags.AlphaBlend|GridSelectionFlags.Row|GridSelectionFlags.Column|GridSelectionFlags.Keyboard|GridSelectionFlags.Shift;
gridModel.Options.AllowDragSelectedCols = false;
GridStyleInfo standard = gridModel.BaseStylesMap["Standard"].StyleInfo;
standard.ShowButtons = GridShowButtons.ShowCurrentRow;
standard.CellType = "Static";
this.gridDataBoundGrid1.DataMember = "QueryThreads";
this.gridDataBoundGrid1.DataSource = dv; GridHierarchyLevel queryLevel = this.gridDataBoundGrid1.Binder.AddRelation("QueryThreadQuery");
So following line generates exception.
queryLevel.ShowHeaders = false;
Is there solution or reason why it is not returning queryLevel?
I checked with data.After filtering also there are rows in QueryThread table.
Evenif I change the RowFilter to "" the same problem continues
dv.DataViewSettings["QueryThreads"].RowFilter = "";
ADAdministrator Syncfusion Team July 14, 2004 05:14 PM UTC
Try setting the grid.DataMember to be the parent tables'' name instead of the child tables name (if I understand what you want there). Here is a little sample that seems to work as expected.
DataViewManager_8760.zip
UMUmangiJuly 15, 2004 11:35 AM UTC
I did the same.
DataMember was assigned to ''QueryThreads'' which was parent table.
I just called gridBinder.ResetHierarchyLevels();
and the problem was solved.