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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

loading combo in grid

Thread ID:





14976 Jun 9,2004 09:15 AM UTC Jun 11,2004 07:40 PM UTC General Discussion 1
Tags: General Discussion
Asked On June 9, 2004 09:15 AM UTC

I am using vb.net and syncfusion grid(Syncfusion.Windows.Forms.Grid.GridControl) I have a colunm in the grid which is a combobox. I want to load the combo as normal .net combo with DisplayMember and ViewMember Currentlly i am using ChoiceList property,this can hold only one value my aim is to show customer name in the list and carry customerID at backend

Administrator [Syncfusion]
Replied On June 11, 2004 07:40 PM UTC

One way to do this is to create a DataTable, yourDateTable, holding two columns, your DisplayMember property and your ValueMember property. Then in the cell where you want to see the combobox, you set the style properties like: Dim style as GridStyleInfo = me.GridControl1(2,2) style.DataSource = yourDataTable style.CellType = "ComboBox" style.DisplayMember = "displayMemberColumnName" style.ValueMember = "valueMemberColumnName" Here is a sample using a GridDataBoundGrid, but it should illustrate how you can set up your DataTable. Another option, instead of a DataTable, is to use an ArrayList of objects where the objects instantiate a class that you define having two public properties that are you displaymember and valuemembers. In this case you would set style.DataSource = the ArrayList. WindowsApplication11_199.zip


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

Live Chat Icon For mobile
Live Chat Icon