PC Review


Reply
Thread Tools Rate Thread

Compatibility FX11 vs FX10 - Combobox Management - VB.Net

 
 
=?Utf-8?B?SlBH?=
Guest
Posts: n/a
 
      21st Jan 2004
Hello

I encounter a problem migrating for fx10 to fx11. the compact framework 1.1 has a different behavior from th
previous framework 1.0 when working with combobox
I give hereafter the code used with FX10 and FX11, it works under FX10 and not in FX11. I tried to found a solution
but currently I solve the problem in simple program, but in a complex application with multiple screens
the behavior of the combobox is variable.

I've build the program using the VB.net help, the behavior with FX11 is not documented
Do i do something was wrong
Has Someone is solution ? Because It brings me sleepsless nigths !!!

Thanks for collaboratio

JP
Code used in FX1
Private Sub combobox_FX10(
'Create Datatable with standard VB Sampl
dt = DemonstrateDataTable(
dt.TableName = "Usine
'Create Datavie
dv = New DataView(dt
dv.Sort = "ProductID
'Create Datase
ds = New DataSet("Produits"
ds.Tables.Add(dt

'Standard code given in the VB.Net documentatio
cbDV.BeginUpdate(
cbDV.Sorted = Tru
'cbDV.SelectedIndex = -
'Load the DataView in the combobox datasource - WITHOUT BINDING
cbDV.DataSource = d
cbDV.DisplayMember = "ProductName
cbDV.ValueMember = "ProductID
cbDV.EndUpdate(

'Trac
'It Works
Debug.WriteLine("cbDV Count : " & cbDV.Items.Count
'Working with Framework 1.0, It doesn't Works with Compact Framework 1.

end su

Code used with FX1
Private Sub combobox(
'Create Datatable with standard VB Sampl
dt = DemonstrateDataTable(
dt.TableName = "Usine
'Create Datavie
dv = New DataView(dt
dv.Sort = "ProductID
'Create Datase
ds = New DataSet("Produits"
ds.Tables.Add(dt

'Bind TextBo
txtUsine.DataBindings.Clear(
' Binds a TextBox control to a column in the DataSet
txtUsine.DataBindings.Add("Text", ds, "Usine.ProductName"

'Bind First Combobox with D
cbDS.DataBindings.Clear(
cbDS.Sorted = Tru
cbDS.SelectedIndex = -
' Bind a Combobox control to a column in the DataSet
cbDS.DataBindings.Add("DisplayMember", ds, "Usine.ProductName"
cbDS.DataSource = ds.Tables("Usine"
cbDS.DisplayMember = "ProductName
cbDS.ValueMember = "ProductID

'Standard code given in the VB.Net documentation working with FX1
cbDV.BeginUpdate(
cbDV.Sorted = Tru
'cbDV.SelectedIndex = -
'Load the DataView in the combobox datasource - WITHOUT BINDING
cbDV.DataSource = d
cbDV.DisplayMember = "ProductName
cbDV.ValueMember = "ProductID
cbDV.EndUpdate(

'Trac
'It Works with FX11 and binding !!
Debug.WriteLine("cbDS Count : " & cbDS.Items.Count
'Working with Framework 1.0, It doesn't Works with Compact Framework 1.
Debug.WriteLine("cbDV Count : " & cbDV.Items.Count

end su

Private Function DemonstrateDataTable() As DataTabl
Dim myTable As DataTabl
myTable = New DataTabl

' add column
Dim column As DataColum
column = myTable.Columns.Add("ProductID", GetType(Integer)
column.AutoIncrement = Tru
column = myTable.Columns.Add("ProductName", GetType(String)

' populate DataTable
Dim id As Intege
For id = 1 To
myTable.Rows.Add(
New Object() {id, String.Format("product{0}", id)}
Next i

Dim dv As DataVie
dv = New DataView(myTable

Return myTabl
End Function
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FX10 - CH Sim Yoke - How do I get both jet engines to throttle tog =?Utf-8?B?Y3RoaWdnaW4=?= Windows XP Games 0 20th Jan 2007 01:26 AM
RE: rights management in 2003 and previous versions compatibility.- =?Utf-8?B?TmljayAoR2lnYVRydXN0KQ==?= Microsoft Word Document Management 0 13th Oct 2005 04:33 PM
disk-management: w2k-compatibility on nt4? Dennis Bäcker Microsoft Windows 2000 Registry 2 25th Jan 2004 06:11 PM
disk-management: w2k-compatibility on nt4? Dennis Bäcker Microsoft Windows 2000 Registry Archive 4 25th Jan 2004 06:11 PM
disk-management: w2k-compatibility on nt4? Dennis Bäcker Microsoft Windows 2000 Registry Archive 0 24th Jan 2004 02:04 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:00 PM.