Click here to Skip to main content
12,621,155 members (33,940 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# C#4.0
I want to add the textbox and dropdown list to the datagridview(in winform's application) same column.Is it possible? if it is possible let me know.......
Posted 20-Feb-13 18:49pm
Updated 20-Feb-13 19:23pm
v2
Comments
CodeMaster_Noob 21-Feb-13 0:18am
   
yes it is possible.
within gridview's template field u cn add both the controls within same
template field.
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Use ItemTemplate.
You can add controls in
<asp:itemtemplate xmlns:asp="#unknown">your controls </asp:itemtemplate>
as in Example
<asp:TemplateField HeaderText="FirstName" SortExpression="FirstName">
 
    <EditItemTemplate>
 
        <asp:TextBox ID="TextBox1" runat="server" Text='<%#
Bind("FirstName") %>'></asp:TextBox>
  Permalink  
v2
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

yes you can add multiple contorls inside one column in gridview.
  Permalink  
Comments
Shekhar Sree 21-Feb-13 0:33am
   
How can i do,
may i know that?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.161128.1 | Last Updated 21 Feb 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100