| Author: pradipta 19 Aug 2008 | Member Level: Gold | Rating: Points: 5 |
Add a templatefield and add the dropdown inide it
<asp:GridView ID="GridView1" runat="server"> <Columns> <asp:TemplateField> <ItemTemplate> <asp:DropDownList runat="server"> </asp:DropDownList> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView>
|
| Author: Kalpesh Mahajan 19 Aug 2008 | Member Level: Silver | Rating: Points: 4 |
Drop Down ID is missing in the above code.
So here it is..
<asp:GridView ID="GVTest" runat="server"> <Columns> <asp:TemplateField> <ItemTemplate> <asp:DropDownList runat="server" ID="ddlTest"> </asp:DropDownList> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView>
Regards Kalpesh
|
| Author: UltimateRengan 19 Aug 2008 | Member Level: Diamond | Rating: Points: 4 |
hi, http://www.xtremedotnettalk.com/showthread.php?p=466361 http://www.experts-exchange.com/Programming/Languages/C_Sharp/Q_23413332.html http://forums.msdn.microsoft.com/en-US/vbgeneral/thread/330617a5-38d8-4b6e-af50-481171aab2e9/
i hope this may help u
|
| Author: Sreekanth M 29 Aug 2008 | Member Level: Silver | Rating: Points: 5 |
Hi,
you can add a custom combo box for your datagid control by having the below code :
Public Class mycombo
Inherits DataGridViewComboBoxColumn
Public WithEvents ColumnComboBox As ComboBox
Public Sub New()
columnComboBox = New ComboBox
end sub
end class
Dim s As New mycombo
s.ColumnComboBox.Items.Add("qw")
Me.DataGridView1.Columns.Insert(0, s)
|