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
1180
Grid and combo with datatable
posted

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

Parents Reply Children