Results 1 to 1 of 1

Thread: system.data.datarowview being displayed in combo box,pocketPC 5.0 device [Unresolved]

Threaded View

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Dec 2001
    Posts
    1,331

    system.data.datarowview being displayed in combo box,pocketPC 5.0 device [Unresolved]

    Hello,

    I am populating at combo box from a dataset. But when I run the program I find I get system.data.datarowview being displayed in the combo box. What should be displayed is the values in the table. i.e. R4484, G5474.

    I am using pocket PC 5.0. I have tried this code in a simple window form, and it works fine, but not in a pocket Pc application. That is why i posted here. Thought maybe there was something wrong with this type of control being used in pocket pc application.

    Code:
    ds = ws.loadSupportContracts(clientID)
    
                If (ds.Tables(0).Rows.Count > 0) Then
                    Me.cboSupportContracts.DisplayMember = "supportContractID"
                    Me.cboSupportContracts.ValueMember = "supportContractID"
                    Me.cboSupportContracts.DataSource = ds.Tables("contracts").DefaultView
                End If
    I did try and solve this problem by doing the follow. But had an error "value does not fall within the expected range"
    Code:
    ds = ws.loadSupportContracts(clientID)
    Me.cboSupportContracts.DataSource = ds.Tables("contracts").DefaultView
    
                    Me.cboSupportContracts.DisplayMember = "supportContractID"
                    Me.cboSupportContracts.ValueMember = "supportContractID"
    I have also tried using a binding source but still the combo box kept on displaying system.data.datarowview.
    Code:
    ds = ws.loadContacts(clientID)
                bs.DataSource = ds
                bs.DataMember = "contracts"
    
                If (ds.Tables(0).Rows.Count > 0) Then
                    Me.cboContact.Items.Clear()
                    Me.cboSupportContracts.DisplayMember = "supportContractID"
                    Me.cboSupportContracts.ValueMember = "supportContractID"
                    Me.cboContact.DataSource = bs
                End If
    If anyone has any ideas about this please let me know.

    Many thanks in advance,

    Steve
    Last edited by steve_rm; Dec 13th, 2006 at 12:40 PM.
    steve

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width