Click here to Skip to main content
15,881,413 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hey guys,
i have a radgridview in a winform project.
the radgridview load data using datasource named servRet like this:
C#
if (ServiceUtil.IsValid(servRet))
            {
                grdNiyar.SetDataSourceByServerReturn(servRet);
            }

now, in column 4 i need the column to be combobox type and load the items from another datasource named servRet1. the code look like that:
C#
BindingSource bindingSource1 = new BindingSource();
bindingSource1.DataSource = servRet1.Value;
GridViewComboBoxColumn coinsColumn = this.grdNiyar.Columns["column1"] as GridViewComboBoxColumn;
coinsColumn.Name = "colMatbeaBabank2";
coinsColumn.HeaderText = "check";
coinsColumn.DataSource = servRet1;
coinsColumn.ValueMember = "KodMatbea";
coinsColumn.DisplayMember = "KodAndShemMatbea";
coinsColumn.FilteringMode = GridViewFilteringMode.ValueMember;
coinsColumn.FieldName = "KodAndShemMatbea";
coinsColumn.Width = 200;
this.grdNiyar.Columns.Add(coinsColumn);


the result i'm getting is nothing!
the column dosent load and it stays empty but in run time i can see that the datasource loaded correctly.
any advice?
Posted
Updated 24-Mar-22 7:41am
v2

1 solution

Make sure grid AllowEdit property is set to true
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900