kiranboi
asked on
Programatically Adding items to a DataGridView ComboBox Cell
Hi all,
I have a ComboBox on my form that I use the following code to populate:
For i As Integer = 0 To myDeliveryServicesDataTabl e.Rows.Cou nt - 1
myItem = myDeliveryServicesDataTabl e.Rows(i)( "Name")
cmboxDelService.Items.Add( myItem)
Next
How can I do the same to a ComboBox cell in a DataGridView?
Thanks
I have a ComboBox on my form that I use the following code to populate:
For i As Integer = 0 To myDeliveryServicesDataTabl
myItem = myDeliveryServicesDataTabl
cmboxDelService.Items.Add(
Next
How can I do the same to a ComboBox cell in a DataGridView?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
<ItemTemplate>
<asp:DropDownList id="ddlGroup" runat="server" Width="100" CssClass="Dropdown"></asp:
</ItemTemplate>
</asp:TemplateColumn>
on ItemDataBound event of gridview
if ( e.Item.ItemType ==ListItemType.Item || e.Item.ItemType ==ListItemType.Alternating
{
Dim ddlGroup as DropDownList = CType(e.Item.FindControl("
For i As Integer = 0 To myDeliveryServicesDataTabl
myItem = myDeliveryServicesDataTabl
ddlGroup.Items.Add(myItem)
Next
}