Click here to Skip to main content
11,567,539 members (42,535 online)
Rate this: bad
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
Edited 21-Feb-11 0:17am
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
my mistake..
actually this is user control and i am using windows form.
santu121 at 25-Nov-11 7:51am
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
Please Sign up or sign in to vote.

Solution 1


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

  Print Answers RSS

Advertise | Privacy | Mobile
Web04 | 2.8.150624.2 | Last Updated 14 Jan 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