General information
Title:
Trouble in using DropdownGrid
Environment versions
Network:
Windows 2003 Server
I had a table that binded to Datagrid. In a column(0) I want to have a dropdowngrid to easily choose the category. I bind also another table for my category to a dropdowngrid But I encountered a problem, the list of category was not viewed to dropdownlist. It is already binded because the number of index or data was present to my dropdownlist.
Here is my code:
Private sub InitDropdownGrid()
Dim sSelect As String = "SELECT ChargeList FROM dbo.BG_ChargeList"
'this line is for creating new dataset and table
m_oDatamanagement.OpenTable("ChargeListTable",sSelect)
'for binding
ddgChargeList2.DataSource = m_oDatamanagement.Table("ChargeListTable")
ddgChargeList2.DataMember = "ChargeListTable"
End sub
Private sub InitializeDatagrid
Dim sSelect As String = "SELECT UnitKey, UnitNumber, TypeOfCharge, " & _
"DateCharged, Name, Amount FROM dbo.BG_ChargesData "
m_oDatamanagement.OpenTable("Charges",sSelect)
tdgDatagrid.DataSource = m_oDatamanagement.Table("Charges")
tdgDatagrid.DataMember = "Charges"
Me.tdgOtherCharges2.Columns("TypeOfCharge").DropDown = Me.ddgChargeList2
Me.tdgOtherCharges2.Splits(0).DisplayColumns("TypeOfCharge").Button = True
End Sub
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only