This is a migrated thread and some comments may be shown as answers.

Gridviewcomboboxcolumn is not displayed the value stored in database

1 Answer 109 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Kamalakannan
Top achievements
Rank 1
Kamalakannan asked on 25 Jul 2012, 07:10 PM
Hi,

I am using radgrid with autogenerated future. i have around 184 dynamic columns. but i need third position column as Gridviewcomboboxcolumn for this i am using below code. i removed the mold name column and inserted new gridviewcomboboxcolumn in the same position.

    Private Sub gv_CPS_DataBindingComplete(sender As Object, e As Telerik.WinControls.UI.GridViewBindingCompleteEventArgs) Handles gv_CPS.DataBindingComplete
        Dim grid = TryCast(sender, RadGridView)
        If grid Is Nothing OrElse Not grid.Columns.Contains("MOLD NAME") Then
            Return
        End If
        grid.Columns.Remove("MOLD NAME")
        Dim MOLD_NAME_COMBO = New GridViewComboBoxColumn("MOLD NAME")
        MOLD_NAME_COMBO.Name = "MOLD_NAME_COMBO"
        MOLD_NAME_COMBO.HeaderText = "MOLD NAME"
        MOLD_NAME_COMBO.DataSource = objCom.Dynamic_Combo_load("cast(mold_type_id as varchar(100)) as mold_type_id", "Name", "T_SFS_MOLD_TYPE ORDER BY NAME")
        MOLD_NAME_COMBO.ValueMember = "mold_type_id"
        MOLD_NAME_COMBO.DisplayMember = "Name"
        MOLD_NAME_COMBO.FieldName = "MOLD NAME"
        MOLD_NAME_COMBO.Width = 100
        MOLD_NAME_COMBO.DropDownStyle = RadDropDownStyle.DropDown
        MOLD_NAME_COMBO.AutoCompleteMode = AutoCompleteMode.SuggestAppend
        grid.Columns.Insert(3, MOLD_NAME_COMBO)
    End Sub

Please have look the attached image file.
Both combo box values are stored database when i retrieved the record combo value is not displayed. but combo box have the both value.

Please help on this same(urgent)

1 Answer, 1 is accepted

Sort by
0
Kamalakannan
Top achievements
Rank 1
answered on 26 Jul 2012, 10:37 PM
i fixed the issue myself thanks
Tags
GridView
Asked by
Kamalakannan
Top achievements
Rank 1
Answers by
Kamalakannan
Top achievements
Rank 1
Share this question
or