Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
How to Load 2nd DropDownList based on the 1st DropDownList in UltraWebGrid
posted

Hi,

I'm relatively new to infragistics web grid controls. I greatly appriciate if anyone could help me here. Below is my situation -
I have a webgrid with a few columns. The 5th & the 6th columns are Region & Country; they are set as

Columns(5).Type = Infragistics.WebUI.UltraWebGrid.ColumnType.DropDownList

When the user selects a Region from column 5 I have to filter or repopulate the Country DropDownList on Column 6.

Please can someone provide with a good example.

Thanks very much,

Manju

Parents
No Data
Reply
  • 903
    posted

    I think you'll find you have to populate your drop down lists yourself.  My experience ( and a Support Case)  shows that the grid 'forgets' a bound Dropdownlist and doesn't show it after an update.  I have filled the value list with code like this (simple single column table).

                           col.Type = ColumnType.DropDownList
                            Dim VL As New ValueList
                            Dim Cmd As New OleDbCommand("Select UnitType from UnitTypes", cnn)
                            Dim Rdr As OleDbDataReader
                            Rdr = Cmd.ExecuteReader()
                            While Rdr.Read
                                VL.ValueListItems.Add(Rdr.GetString(0), Rdr.GetString(0)) 

                            End While
                            Rdr.Close()
                            col.ValueList = VL

     

    You will need to force a postback after the selection in the first dropdown.  I thin you will have to use the Client side event ValueListSelChangeHandler for that but I have no experience of it. Then you can use code to populate the second drop down

Children