Click here to Skip to main content
12,758,462 members (30,148 online)
Rate this:
Please Sign up or sign in to vote.
See more: VB 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 20:56pm
Updated 21-Feb-11 1:17am
mkgoud 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 21-Feb-11 3:05am
Not clear.

Further, title says 'custom control' and description 'user control', hope you the difference!
AlbinAbel 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 21-Feb-11 3:32am
Yes there is a difference between custom and user control
kals84 21-Feb-11 4:01am
my mistake..
actually this is user control and i am using windows form.
santu121 25-Nov-11 7:51am
santu121 25-Nov-11 7:52am
i want add user control in datagrid
xxx215846 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 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
Top Experts
Last 24hrsThis month

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