Click here to Skip to main content
11,633,494 members (77,085 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: 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 17:49pm
Edited 20-Feb-13 18:23pm
v2
Comments
CodeMaster_Noob at 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 at 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
0 OriginalGriff 8,618
1 Sergey Alexandrovich Kryukov 8,189
2 Mika Wendelius 6,415
3 F-ES Sitecore 2,321
4 Suvendu Shekhar Giri 2,075


Advertise | Privacy | Mobile
Web01 | 2.8.150728.1 | Last Updated 21 Feb 2013
Copyright © CodeProject, 1999-2015
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