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
70
New behavior of WebCombo 2008.1 (CLR 3.5)
posted

Hello folks,

There is someone that could explain me why a webcombo  linked to a webgrid column, return into the webgrid column, the desciption (DataTextField) instead of the code (DataValueField).

Here it's m y code  initiating the combo and linking it to the webgrid column.

        Me.cboCurrency.DataSource = MyData.Tables(tblCombo)
        Me.cboCurrency.DataTextField = MyData.Tables(tblCombo).Columns(1).ColumnName
        Me.cboCurrency.DataValueField = MyData.Tables(tblCombo).Columns(0).ColumnName
        Me.cboCurrency.DataBind()
        Me.cboCurrency.Columns(0).Hidden = True
        Me.cboCurrency.Columns(1).Width = Unit.Pixel(200)
        Me.cboCurrency.Columns(1).Header.Caption = Resources.Labels.NameLabel
        Me.cboCurrency.Columns(2).Width = Unit.Pixel(50)
        Me.cboCurrency.Columns(2).Header.Caption = Resources.Labels.Symbol

        Me.grdMain.DisplayLayout.Bands(0).Columns.FromKey("CurrencyCd").Type = ColumnType.DropDownList
        Me.grdMain.DisplayLayout.Bands(0).Columns.FromKey("CurrencyCd").EditorControlID = Me.cboCurrency.UniqueID

By the way, this code works fine with NA 2007.3 (CLR2.0).   It may be a new property that I didn't see, but the doc has the same samples in both version.

Thanks all,

 Pierre

Parents Reply Children
No Data