We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Using DataBoundGrid in hierarchial level gives problem with Dataviewmanager

Thread ID:

Created:

Updated:

Platform:

Replies:

16398 Jul 14,2004 04:03 PM UTC Jul 15,2004 11:35 AM UTC WinForms 2
loading
Tags: GridControl
Umangi
Asked On July 14, 2004 04:03 PM UTC

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 = "";

Administrator [Syncfusion]
Replied On 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

Umangi
Replied On July 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.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;