Click here to Skip to main content
15,886,518 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have worked with grids and datasets with no problems, but i am struggling with binding the results from the WCF object so i can update/insert a row/rows using a gridview. Is this even possible? from what i have been researching, it is, I have not found any good examples similar to the following situation.

I have tried using the BindingSource and other list objects, I have also noticed that there is no value for the Datamember property to set using an object, or is there? as of now the grid loads with the data but i can do no editing.

part 1
XML
<ServiceContract(), XmlSerializerFormat()>
Public Interface IIncedentNotifications

    <OperationContract()>
    Function GetCurrentIncedents() As List(Of IncedentNotificationsData)
    Function InsertIncedent(ByVal incedent As IncedentNotificationsData) As Byte

End Interface

    'Create a data contract first
    <DataContract()>
    Public Class IncedentNotificationsData

    <DataMember()>
    Public Property IncedentDescription As String
    <DataMember()>
    Public Property IncedentDateTime As DateTime
    <DataMember()>
    Public Property Resolved As Boolean

    End Class





VB
Private Sub LoadIncedentGrid()

    Try
            binding.DataSource = incedentService.GetCurrentIncedents()
                binding.DataMember = "Incedents" 
                IncedentGrid.DataSource = binding.DataSource


....


part 2
Then how to pass back a list of only the changes made?
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900