C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




how to add combobox in Datagridview controls


Posted Date: 19 Aug 2008      Total Responses: 4

Posted By: Manik       Member Level: Bronze     Points: 1


how to add combobox in Datagridview controls



Responses

Author: pradipta    19 Aug 2008Member Level: GoldRating:     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 2008Member Level: SilverRating:     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 2008Member Level: DiamondRating:     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 2008Member Level: SilverRating:     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)





Post Reply
You must Sign In to post a response.
Next : How to fill MSHFlexGrid from Access Database
Previous : Connect to a password protected Access databse
Return to Discussion Forum
Post New Message
Category: Visual Studio

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

conference call definitions

Contact Us    Privacy Policy    Terms Of Use