Hi guys. I wanted to have a winGrid with only two columns. The first of these columns would be normal and then the second would be a combo. I fill my WinGrid with a data table as follows:
DtUnits Dim As New DataTable ("dtUnits") dtUnits. Columns.Add ("Data") dtUnits. Columns.Add ("Unit") While dateB <dateF Dim row As DataRow = dtUnits.NewRow () row (0) = dateB 'Date mm / dd / yyyy row (1) = "I want COMBO HERE BASED ON another DataTable" dtUnits.Rows.Add (row) dateB = DateAdd (DateInterval.Day, 1, CDate (dateB)) end While Me.GRID.DataSource = dtUnits The combo would serve to enter the unit available on that date, then the combos would be different. I would have units available at a date and unavailable elsewhere. I inserted the code "e.Layout.Bands (0). Columns (" Unit "). ColumnStyle.DropDownList = Style" at the event InitializeLayout
Hi,
What part of this is giving you trouble?
Here are a couple of links that might help:
HOWTO:What is the best way to place a DropDown list in a grid cell?
Creating a dropdown list in a grid cell whose list values are dependent on another cell - Windows Forms - Infragistics Community
I need to fill a datatable with a sql statement to combo line. combo of each grid will have different values. At home the picture below for example. In one day need to show some units and other units on another day. I do not need filtering. I need to fill again with a datatable.