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)
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)