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
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
I should have pointed out that the Dropdownlist issue may only be valid for an SQLDataSource. Other data sources may work better.
With an SQLDatasource the grid is perfect the first time you display it. The cells fill with the Display value and clicking on a cell the field turns into a drop down list allowing the user to make a selection. Do a postback and the column now only show the Data value and there is no drop down. That is the case with 9.2 anyway.