Jandro
2011-03-05T00:34:13Z
Well, in the ActiveX 3.0 version of iGrid i used to fill and create some Cols with Combos, so the user select the first ComboCol1 value, and then the ComboCol2 fill with the criteria of ComboCol1 (Like a combo filter), is there a way to do this on iGrid.Net, coz I've tried to do it with some iGDropDownLists, but the behavior it's different!
Igor/10Tec
2011-03-05T08:08:04Z
We do not see any problems with doing this in iGrid.NET. Maybe, you have some troubles with your code, and it would be better to discuss some parts of your code? Can you publish it here or mail it to us?
Jandro
2011-03-07T18:30:14Z
This is the code i use to fill the data of the combos in VB6, this works well for me, when i select any data on the first combo, the other combos fill with the related info:

Sub AdmonGastos_Initial_iGridDatosDetail()
    
    F_DatosGastosAdmon.iGrid1.Redraw = False
    F_DatosGastosAdmon.iGrid1.Clear True
    
    Set Rs_Nivel1 = DE_Wdx.Cn_Wdx.Execute("SELECT ExpenseId, Description FROM ExpenseAdmonConcept WHERE Nivel1 <> 0 AND Nivel2 = 0 AND Nivel3 = 0 AND Nivel4 = 0 GROUP BY ExpenseId, Description ORDER BY Description")
    If Rs_Nivel1.RecordCount > 0 Then
            F_DatosGastosAdmon.iGrid1.Combos.Add ("Nivel1")
            While Not Rs_Nivel1.EOF
                
                F_DatosGastosAdmon.iGrid1.Combos("Nivel1").AddItem sItemText:=Rs_Nivel1("Description"), vItemValue:=CInt(Rs_Nivel1("ExpenseId"))
                
                'Ini-Nivel2
                Set Rs_Nivel2 = DE_Wdx.Cn_Wdx.Execute("SELECT ExpenseId, Description FROM ExpenseAdmonConcept WHERE Nivel1 = " & Rs_Nivel1("ExpenseId") & " AND Nivel2 <> 0 AND Nivel3 = 0 AND Nivel4 = 0 GROUP BY ExpenseId, Description ORDER BY Description")
                If Rs_Nivel2.RecordCount > 0 Then
                        F_DatosGastosAdmon.iGrid1.Combos.Add (Rs_Nivel1("Description") & "Nivel2")
                        While Not Rs_Nivel2.EOF
                            
                            F_DatosGastosAdmon.iGrid1.Combos(Rs_Nivel1("Description") & "Nivel2").AddItem sItemText:=Rs_Nivel2("Description"), vItemValue:=CInt(Rs_Nivel2("ExpenseId"))
                            
                            'Ini-Nivel3
                            Set Rs_Nivel3 = DE_Wdx.Cn_Wdx.Execute("SELECT ExpenseId, Description FROM ExpenseAdmonConcept WHERE Nivel1 = " & Rs_Nivel1("ExpenseId") & " AND Nivel2 = " & Rs_Nivel2("ExpenseId") & " AND Nivel3 <> 0 AND Nivel4 = 0 GROUP BY ExpenseId, Description ORDER BY Description")
                            If Rs_Nivel3.RecordCount > 0 Then
                                    F_DatosGastosAdmon.iGrid1.Combos.Add (Rs_Nivel1("Description") & Rs_Nivel2("Description") & "Nivel3")
                                    While Not Rs_Nivel3.EOF
                                        
                                        
                                        F_DatosGastosAdmon.iGrid1.Combos(Rs_Nivel1("Description") & Rs_Nivel2("Description") & "Nivel3").AddItem sItemText:=Rs_Nivel3("Description"), vItemValue:=CInt(Rs_Nivel3("ExpenseId"))
                                        
                                        'Ini-Nivel4
                                        Set Rs_Nivel4 = DE_Wdx.Cn_Wdx.Execute("SELECT ExpenseId, Description FROM ExpenseAdmonConcept WHERE Nivel1 = " & Rs_Nivel1("ExpenseId") & " AND Nivel2 = " & Rs_Nivel2("ExpenseId") & " AND Nivel3 = " & Rs_Nivel3("ExpenseId") & " AND Nivel4 <> 0 GROUP BY ExpenseId, Description ORDER BY Description")
                                        If Rs_Nivel4.RecordCount > 0 Then
                                                F_DatosGastosAdmon.iGrid1.Combos.Add (Rs_Nivel1("Description") & Rs_Nivel2("Description") & Rs_Nivel3("Description") & "Nivel4")
                                                While Not Rs_Nivel4.EOF
                                                    
                                                    F_DatosGastosAdmon.iGrid1.Combos(Rs_Nivel1("Description") & Rs_Nivel2("Description") & Rs_Nivel3("Description") & "Nivel4").AddItem sItemText:=Rs_Nivel4("Description"), vItemValue:=CInt(Rs_Nivel4("ExpenseId"))
                                                    
                                                    Rs_Nivel4.MoveNext
                                                    
                                                Wend

                                        End If
                                        
                                    Wend

                            End If
                            Rs_Nivel2.MoveNext
                            
                        Wend

                End If
        
                Rs_Nivel1.MoveNext
                
            Wend

    End If
    
    With F_DatosGastosAdmon.iGrid1.AddCol(sKey:="nivel1", sHeader:="Nivel1")
        .eType = igCellCombo
        .sCtrlKey = "Nivel1"
    End With
    With F_DatosGastosAdmon.iGrid1.AddCol(sKey:="nivel2", sHeader:="Nivel2")
        .eType = igCellCombo
        .sCtrlKey = "Nivel2"
    End With
    With F_DatosGastosAdmon.iGrid1.AddCol(sKey:="nivel3", sHeader:="Nivel3")
        .eType = igCellCombo
        .sCtrlKey = "Nivel3"
    End With
    With F_DatosGastosAdmon.iGrid1.AddCol(sKey:="nivel4", sHeader:="Nivel4")
        .eType = igCellCombo
        .sCtrlKey = "Nivel4"
    End With

    F_DatosGastosAdmon.iGrid1.Redraw = True

End Sub

And here's the VB. NET code, this shows me all the info in all combos... do I'm missing something?

    Sub AdmonGastos_Initial_iGridDatosDetail()

        Dim locCont1 As Integer
        Dim locCont2 As Integer
        Dim locCont3 As Integer
        Dim locCont4 As Integer

        Vars.ListNivel1 = New iGDropDownList
        Vars.ListNivel2 = New iGDropDownList
        Vars.ListNivel3 = New iGDropDownList
        Vars.ListNivel4 = New iGDropDownList
        Vars.ListMoneda = New iGDropDownList

        F_DatosGastosAdmon.iGrid1.BeginUpdate()
        F_DatosGastosAdmon.iGrid1.Rows.Clear()
        F_DatosGastosAdmon.iGrid1.Cols.Clear()

        Vars.str_QuerySQL = ""
        Vars.str_QuerySQL = "SELECT ExpenseId, Description FROM ExpenseAdmonConcept WHERE Nivel1 <> 0 AND Nivel2 = 0 AND Nivel3 = 0 AND Nivel4 = 0 GROUP BY ExpenseId, Description ORDER BY Description"
        Vars.DV_Nivel1 = New DataView
        Vars.DV_Nivel1 = get_DataView(Vars.str_QuerySQL, "ExpenseAdmonConcept")

        If Vars.DV_Nivel1.Count > 0 Then

            For locCont1 = 0 To Vars.DV_Nivel1.Count - 1

                Vars.ListNivel1.Items.Add(Vars.DV_Nivel1(locCont1)("Description"), Vars.DV_Nivel1(locCont1)("ExpenseId"))

                Vars.str_QuerySQL = ""
                Vars.str_QuerySQL = "SELECT ExpenseId, Description FROM ExpenseAdmonConcept WHERE Nivel1 = " & Vars.DV_Nivel1(locCont1)("ExpenseId") & " AND Nivel2 <> 0 AND Nivel3 = 0 AND Nivel4 = 0 GROUP BY ExpenseId, Description ORDER BY Description"
                Vars.DV_Nivel2 = New DataView
                Vars.DV_Nivel2 = get_DataView(Vars.str_QuerySQL, "ExpenseAdmonConcept")

                If Vars.DV_Nivel2.Count > 0 Then

                    For locCont2 = 0 To Vars.DV_Nivel2.Count - 1

                        Vars.ListNivel2.Items.Add(Vars.DV_Nivel2(locCont2)("Description"), Vars.DV_Nivel2(locCont2)("ExpenseId"))

                        Vars.str_QuerySQL = ""
                        Vars.str_QuerySQL = "SELECT ExpenseId, Description FROM ExpenseAdmonConcept WHERE Nivel1 = " & Vars.DV_Nivel1(locCont1)("ExpenseId") & " AND Nivel2 = " & Vars.DV_Nivel2(locCont2)("ExpenseId") & " AND Nivel3 <> 0 AND Nivel4 = 0 GROUP BY ExpenseId, Description ORDER BY Description"
                        Vars.DV_Nivel3 = New DataView
                        Vars.DV_Nivel3 = get_DataView(Vars.str_QuerySQL, "ExpenseAdmonConcept")

                        If Vars.DV_Nivel3.Count > 0 Then

                            For locCont3 = 0 To Vars.DV_Nivel3.Count - 1

                                Vars.ListNivel3.Items.Add(Vars.DV_Nivel3(locCont3)("Description"), Vars.DV_Nivel3(locCont3)("ExpenseId"))

                                Vars.str_QuerySQL = ""
                                Vars.str_QuerySQL = "SELECT ExpenseId, Description FROM ExpenseAdmonConcept WHERE Nivel1 = " & Vars.DV_Nivel1(locCont1)("ExpenseId") & " AND Nivel2 = " & Vars.DV_Nivel2(locCont2)("ExpenseId") & " AND Nivel3 = " & Vars.DV_Nivel3(locCont3)("ExpenseId") & " AND Nivel4 <> 0 GROUP BY ExpenseId, Description ORDER BY Description"
                                Vars.DV_Nivel4 = New DataView
                                Vars.DV_Nivel4 = get_DataView(Vars.str_QuerySQL, "ExpenseAdmonConcept")

                                If Vars.DV_Nivel4.Count > 0 Then

                                    For locCont4 = 0 To Vars.DV_Nivel4.Count - 1

                                        Vars.ListNivel4.Items.Add(Vars.DV_Nivel4(locCont4)("Description"), Vars.DV_Nivel4(locCont4)("ExpenseId"))

                                    Next

                                End If

                            Next

                        End If

                    Next

                End If

            Next

        End If

        F_DatosGastosAdmon.iGrid1.Cols.Add("nivel1", "Nivel1")
        F_DatosGastosAdmon.iGrid1.Cols.Add("nivel2", "Nivel2")
        F_DatosGastosAdmon.iGrid1.Cols.Add("nivel3", "Nivel3")
        F_DatosGastosAdmon.iGrid1.Cols.Add("nivel4", "Nivel4")

        F_DatosGastosAdmon.iGrid1.Cols("nivel1").CellStyle.DropDownControl = Vars.ListNivel1
        F_DatosGastosAdmon.iGrid1.Cols("nivel2").CellStyle.DropDownControl = Vars.ListNivel2
        F_DatosGastosAdmon.iGrid1.Cols("nivel3").CellStyle.DropDownControl = Vars.ListNivel3
        F_DatosGastosAdmon.iGrid1.Cols("nivel4").CellStyle.DropDownControl = Vars.ListNivel4
        F_DatosGastosAdmon.iGrid1.Cols("moneda").CellStyle.DropDownControl = Vars.ListMoneda

        F_DatosGastosAdmon.iGrid1.EndUpdate()
		
End Sub
Igor/10Tec
2011-03-09T09:18:03Z
Jandro, we formatted your post so the code is better readable now. Use such BB codes as [code] to format your posts in the future, please. This will help all to read your posts much easier.

As for the question itself, to tell you the truth, now we do not understand the question and/or your logic. It seems, there should be two columns, one with the main combo list, and the other with a 'nested' list of values which depends on the value selected in the first column in each row. Right? What we see is just 5 columns with different combo lists in each one.

Can you send us some screenshots of how it works for iGrid ActiveX? We would be glad to write even a whole sample, and place it in our Extra Sample Library for the whole community, but we need to understand the logic of your app correctly.
Jandro
2011-03-09T17:30:44Z
Yeah sorry for the code, and yes, i'm tryin' to do a nested list based on the selected value of the first column, but there are 4 columns, so i've already uploaded some images, i created an album, can you access it, or do i need to put the link?

I think i'm some kind of tester jojojo, remember the exception when i got the trial of iGrid .NET? It was a long long time ago :P

EDIT: BTW, how do i set the value in that "Combos" in iGrid .NET when i'm loading the info??? I've been tryin' but never success... just shows me the ID, not the description 😛
Igor/10Tec
2011-03-10T07:58:33Z
Let us explain the main idea of the solution for two columns. The first column contains the main combo list which isn't changed, and the second column should display a dependent combo list which depends on the value selected in the first combo, right? Then you need to have separate combo lists for the 2nd column (one for each value from the main combo list) and assign them to the cells when the user changes the value in the first column. You assign combos on cell basis but not one combo for the whole 2nd column.

Can you send us a letter to our tech support so we'll continue to work on it in our private correspondence without showing all the details here? And then show a working sample for the community if it is ever ready?