We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

combobox inside grid issue

Thread ID:





79924 Mar 4,2009 11:12 AM UTC Mar 5,2009 09:01 AM UTC WinForms 1
Tags: Tools
Subrata Das
Asked On March 4, 2009 11:12 AM UTC

Hi All,
I have one Syncfusion.Windows.Forms.Grid.GridDataBoundGrid named "dgrdReportCode" which has two columns and in one of that I am binding one combobox(by making its CellType as ComboBox).
Actually the data to which the grid is bound is a subset of the data that is shown in the combobox.Say the datatable that the combobox is bound to is having data (e.g "Text1","Text2","Text3") in the column that is set as comboboxe's DisplayMember.

Now initially nothing will be saved in database.So,the user will select one item say "Text1" from the combobox.Note that the user cannot edit the text of the combobox.That's why I have coded this line

entityStyle1.DropDownStyle = GridDropDownStyle.Exclusive;

Now after I save the screen and reopen the same screen I'll get a datatable which will contain the saved values(which is essentially a subset of the combobox values) and this table is actually bound to the grid.

Earlier I did not face any problem to show the saved value("Text1") as selected in the combobox because then I was not using this line of code

entityStyle1.DropDownStyle = GridDropDownStyle.Exclusive;

Now my requirement has changed and I need to use the above mentioned line of code because now user should not be able to enter anything in the combobox by pressing keys.

Now the data is being bound to the combobox("Text1","Text2","Text3") but the selected text(here say "Text1") is not being shown.It is shown as blank.

Can anybody please help me out in this?

I am providing the code snippent also.

GridBoundColumn gbcEntity1 = this.dgrdReportCode.Binder.
gbcEntity1.HeaderText = "SYSTEM";
GridStyleInfo entityStyle1 = gbcEntity1.StyleInfo;
entityStyle1.CellType = Constants.COMBOBOX;
entityStyle1.DropDownStyle = GridDropDownStyle.Exclusive;
entityStyle1.DataSource = dsParty.Tables[14];
entityStyle1.DisplayMember = dsParty.Tables[14].Columns
entityStyle1.ValueMember = dsParty.Tables[14].Columns["MAPPING_CODE_VALUE"].ColumnName;
entityStyle1.CellValue = "CAMS Party Alias";

Thanks in advance!

Jisha Joy [Syncfusion]
Replied On March 5, 2009 09:01 AM UTC

Hi Subrata,

Thank you for using Syncfusion Products.

I have tested the issue in the following sample. But i am afraid I was not able to see the issue as you mentioned. Please see the same and if the issue still exists, then reproduce the issue in the below sample and send us the modified sample. So that we could analyze the issue here.




This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon