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.
Unfortunately, activation email could not send to your email. Please try again.

nametoColindex in a hierarchycally grid model

Thread ID:

Created:

Updated:

Platform:

Replies:

6232 Aug 6,2003 12:38 AM Aug 6,2003 05:17 AM Windows Forms 2
loading
Tags: GridControl
Karl-Heinrich Nagel
Asked On August 6, 2003 12:38 AM

Hi, i tried to get the use the nametoColIndex function in a hierarchycal grid. It only worked with the parent-row. I want to "mask" some cells by hand with the event PrepareViewStyleInfo. How can i do that in a hierarchical grid (only in the child-row !) ??? Kind regards, Stefan

Administrator [Syncfusion]
Replied On August 6, 2003 01:29 AM

> Hi, i tried to get the use the nametoColIndex function in a hierarchycal grid. > It only worked with the parent-row. > > I want to "mask" some cells by hand with the event PrepareViewStyleInfo. How can i do that in a hierarchical grid (only in the child-row !) ??? > > Kind regards, > > Stefan You have to get the GridBoundRecordState object for the given row. This object has much information on the row such as its hierarchy level, its child list, its position in its parent, etc... Here is a code snippet:
Dim rs As GridBoundRecordState = Me.gridDataBoundGrid1.Binder.GetRecordStateAtRowIndex(e.RowIndex)
Dim gbc As GridBoundColumn = Me.gridDataBoundGrid1.Binder.GetHierarchyLevel(rs.LevelIndex).InternalColumns("ColName")
If Not gbc is Nothing Then
	Dim field As Integer = Me.gridDataBoundGrid1.Binder.GetHierarchyLevel(rs.LevelIndex).InternalColumns.IndexOf(gbc)
	If Me.gridDataBoundGrid1.Binder.FieldToColIndex(field) = e.ColIndex Then
		'found the column...
	End If
End If

Karl-Heinrich Nagel
Replied On August 6, 2003 05:17 AM

It works ! Thanks a lot for your support

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.

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.

;