The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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?
ADAdministrator Syncfusion Team January 28, 2003 04:13 PM UTC
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;
BKBill KorchinskiJanuary 28, 2003 04:53 PM UTC
Thanks. Dumb question- what's the VB syntax for
sc.AddRange(new string[]{"Choice1", "Choice2", "Choice3"})
?
ADAdministrator Syncfusion Team January 29, 2003 06:19 AM UTC
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