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.
Unfortunately, activation email could not send to your email. Please try again.

loading combo in grid

Thread ID:

Created:

Updated:

Platform:

Replies:

14976 Jun 9,2004 05:15 AM Jun 11,2004 03:40 PM General Discussion 1
loading
Tags: General Discussion
vandana
Asked On June 9, 2004 05:15 AM

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 03:40 PM

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

CONFIRMATION

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.

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.

;