Click here to Skip to main content
15,896,539 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
DataGridTextColumn in VC2010 WPF VB. how do i insert all this data to grid.

please if anybody can help me i will appresiate it a lot
Public Sub UpdateChannelState()
        Dim nTemp As Int32
        Dim str As String
        Dim i As Int32

        For i = 0 To MaxLine - 1
            nTemp = SsmGetChType(i)
            If (nTemp = -1) Then
                MessageBox.Show("Fail to call SsmGetChType")
            ElseIf (nTemp = 12) Then

                Select Case (ChannelState(i).WorkState)
                    Case CH_IDLE
                        str = "Idle"
                    Case CH_RING
                        str = "Ringing"
                    Case CH_ACTIVE
                        str = "Active"
                    Case CH_OFFLINE
                        str = "Offline"
                    Case CH_WAITFOR_ONHOOK
                        str = "WaitforOnhook"
                End Select

                str = ""
                str = System.Text.Encoding.ASCII.GetString(ChannelState(i).pCallId)
                str = ""
                str = System.Text.Encoding.ASCII.GetString(ChannelState(i).Lcd)
                str = ""

                Select Case (ChannelState(i).Dir)
                    Case UNKNOWN
                        str = "Unknown"
                    Case UP
                        str = "Call out"
                    Case DOWN
                        str = "Call in"
                End Select
            End If
        Next
End Sub
Posted
Updated 20-Jul-11 0:35am
v3

1 solution

I think there you need to create an object of the data gird class and in that you will have
m_grid.SetDataSource(LUNKNOWN pRs);
where pRs is the record set its in VC++ i think u will have similar function in VB try and sorry if am worng
 
Share this answer
 

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