Paul R
2017-05-05T12:25:24Z
How can I colour the indented part of an iGrid with TreeLines? I want the indent to be the same colour as the background of the rest of the row.

TIA

UserPostedImage
Paul R
2017-05-09T07:53:04Z
Anyone? Is this possible?
Igor/10Tec
2017-05-15T07:13:41Z
Are we talking about a tree grid inside iGrid? Can you send us the source code you used to create the grid on the screenshot?
Paul R
2017-05-15T08:07:59Z
It's an iGrid that displays a tree by using Levels.

        Dim sClients() As String = {"Andrew A", "Brian B", "Charlie C", "Davina D", "Emma E"}
        Dim sDates() As Date = {#01/01/2001#, #7/9/2016#, #12/31/2017#, #9/2/2010#, #12/31/2015#}
        grdIGrid.BeginUpdate()

        grdIGrid.SortByLevels = True
        grdIGrid.RowMode = True
        grdIGrid.RowTextVisible = True
        grdIGrid.RowTextStartColNear = 0
        grdIGrid.RowTextEndColFar = 0

        For iMainRow As Integer = 0 To 9
            Dim oRow As iGRow = grdIGrid.Rows.Add

            oRow.Level = 0
            oRow.TreeButton = iGTreeButtonState.Visible
            oRow.Cells(0).Value = sClients(iMainRow Mod sClients.Count) & " :: " & iMainRow.ToString
            oRow.Cells(1).Value = ""
            oRow.Cells(1).AuxValue = iMainRow
            oRow.Cells(2).Value = sDates(iMainRow Mod sDates.Count)
            oRow.CellStyle.BackColor = Color.AliceBlue

            For iSubRow As Integer = 0 To Int(Rnd() * 5)
                Dim oSubRow As iGRow = grdIGrid.Rows.Add

                oSubRow.Level = 1
                oSubRow.TreeButton = iGTreeButtonState.Hidden
                oSubRow.Cells(0).Value = String.Format("Child {0} of Node {1}", iSubRow, iMainRow)
                oSubRow.Cells(1).AuxValue = CInt(Rnd() * 99).ToString("00")
                oSubRow.Cells(2).AuxValue = CInt(Rnd() * 99).ToString("00")
                oSubRow.CellStyle.BackColor = Color.Cornsilk
            Next
        Next

        For Each oCol As iGCol In grdIGrid.Cols
            oCol.AutoWidth()
        Next

        grdIGrid.EndUpdate()
Igor/10Tec
2017-05-16T15:26:56Z
Your code did not work without this setting:

grdIGrid.Cols.Count = 3

However, when I launched the project with this columns definition, I saw this:

Level Indent Colour.png

Click to View Image164 View(s)



As you can see, the level indents are colored as expected.

Can you tell us, how do you define the grid columns in your project? Perhaps, it's the key to answer.
Paul R
2017-05-16T15:47:30Z
The columns are created at design time using the Column editor which is why it didn't work for you without that line. As far as I can tell all the columns properties are set to default apart from Text and Width on all columns, AllowGrouping and AlloMoving is false on the first column, and the second column SortType is ByAuxValue.
Igor/10Tec
2017-05-17T07:14:41Z
I see the colored level indents even with these settings (BTW, there is no need to specify column widths as you auto-width columns in code).

I would also check the grid properties. Did you set some iGrid properties to non-default values?

And send us, please, a project we can use to reproduce the problem on our computers.
Igor/10Tec
2017-05-17T07:17:13Z
As I can see from your picture, you definitely set some grid properties to non-default values as your grid does not have the vertical grid lines.

And what is the full version of iGrid you are using? I hope it is the latest public build, i.e. 5.0.15.
Paul R
2017-05-17T09:30:31Z
Found it. After looking through the properties in the .Designer file I spotted one 'ColorizeRowLevelIndent' that was set to False. Setting it to True fixed it. I don't know how that got set, I must have done it by accident at some point. You guys really should know about that property.

We're using the v5.0.10 of the grid. I can't see anywhere to download the latest version.
Igor/10Tec
2017-05-17T11:52:16Z
Originally Posted by: Paul R 

You guys really should know about that property.



We do know this property 😉 Perhaps, we did not understand each other. You showed your code snippet and told us that this is all what we need to reproduce the issue, implying that other iGrid properties were not touched.

As for the update to the latest iGrid, we'll send you an email with the instructions.
Paul R
2017-05-17T11:59:04Z
I posted a picture at first, and that should have been enough to at least suggest that property. :)

Anyway, issue resolved now and I shall await your email with the update instructions.