Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NET Controls
I have created a user control with one textbox and one button control. Now I want to add this control in my datagridview control in VB.Net. These user controls are placed in the datagridview with order one user control in one row.
 
If I have a loop through ten user controls than ten rows in datagridview create having user control in it.
 
I don't know how to solved it. Please help me.
Posted 20-Feb-11 19:56pm
kals84702
Edited 21-Feb-11 0:17am
Slacker00770.8K
v5
Comments
mkgoud at 21-Feb-11 2:15am
   
As you are having only a textbox and button why don't you use in the gridview without the user control?
Sandeep Mewara at 21-Feb-11 3:05am
   
Not clear.
 
Further, title says 'custom control' and description 'user control', hope you the difference!
AlbinAbel at 21-Feb-11 3:06am
   
is this is a windows form or web form? If it is a webform add your user control inside a item template and bind the user control controls in the RowBound event
AlbinAbel at 21-Feb-11 3:32am
   
Yes there is a difference between custom and user control
kals84 at 21-Feb-11 4:01am
   
ok..
my mistake..
actually this is user control and i am using windows form.
santu121 at 25-Nov-11 7:51am
   
fgfd
santu121 at 25-Nov-11 7:52am
   
i want add user control in datagrid
xxx215846 at 28-Mar-12 9:55am
   
Has anyone managed to do this ? I have the same problem. I need ti add custom user control into datagridview cell. Custom user control is consists two elements. First is ListView and second is button.
Nirav_Vyas at 10-Feb-14 2:38am
   
Is anyone able to do this , I need to have a textbox, a datetime picker and a label inside a control and that control as a cell in datagrid. Please advice

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 359
1 _Amy 230
2 Manfred R. Bihy 200
3 CHill60 180
4 OriginalGriff 175
0 OriginalGriff 7,495
1 Sergey Alexandrovich Kryukov 6,402
2 Maciej Los 3,849
3 Peter Leow 3,568
4 CHill60 2,702


Advertise | Privacy | Mobile
Web02 | 2.8.140721.1 | Last Updated 14 Jan 2013
Copyright © CodeProject, 1999-2014
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