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.

Another GridDataBoundGrid ComboBox question

Thread ID:

Created:

Updated:

Platform:

Replies:

2528 Jan 28,2003 10:24 AM Jan 29,2003 01:19 AM Windows Forms 3
loading
Tags: GridControl
Bill Korchinski
Asked On January 28, 2003 10:24 AM

I'm using a very simple MS Access data base which I'm binding to a GridDataBoundGrid via OldDataAdapter. Everything works as expected except for one of the Access fields which I've defined as follows: Data Type = Text Display Control = ComboBox Row Source Type = Value List Row Source = Choice1;Choice2;Choice3 While in Access, this field behaves as expected- a ComboBox with 3 choices in the item list. However in GridDataBoundGrid, the field shows up as a ComboBox with only a single choice in the list. I'm using GridBoundColumns & have tried changing all parameters for this field without success. Any suggestions?

Administrator [Syncfusion]
Replied On January 28, 2003 11:13 AM

Try creating a StringCollection object that has your three entries. Then set the StringCollection object to be the StyleInfo.ChoiceList property of the GridBoundColumn. StringCollection sc = new StringCollection(); sc.AddRange(new string[]{"Choice1", "Choice2", "Choice3"}); //... //... gridBoundColumn1.StyleInfo.ChoiceList = sc;

Bill Korchinski
Replied On January 28, 2003 11:53 AM

Thanks. Dumb question- what's the VB syntax for sc.AddRange(new string[]{"Choice1", "Choice2", "Choice3"}) ?

Administrator [Syncfusion]
Replied On January 29, 2003 01:19 AM

VB is not square, its round :) Dim sc As New System.Collections.Specialized.StringCollection() sc.AddRange(New String() {"Choice1", "Choice2", "Choice3"}) gridBoundColumn1.StyleInfo.ChoiceList = sc

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.

;