Click here to Skip to main content
15,907,000 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Is it possible to create common control(like grid ,textbox, combobox or etc ) and share by all form withing the project just like dataset
Posted
Comments
db7uk 30-May-12 4:20am    
Are you talking about custom controls? If so you could create a class library with classes that inherit from the base controls. i.e. you could create a numeric text box by inheriting from the textbox control and modifiying the onkeydownpreview to stop characters that are not numeric?

Yes it's possible create a "custom control" - just derive a special Control from an existing one:

class MyTextBox : System.Windows.Forms.TextBox

or you can create a "user control" - this is a composition of existing Controls. There is a base type provided for you by the .NET framework:

UserControl

so you can derive from this one if you just want to combine different controls to a reusable "block".

class MyUserControl : System.Windows.Forms.UserControl

Do you have any specific problem? Things above are quite basic... btw. DataSet is not a control - you mean DataGrid?
 
Share this answer
 
v2
Comments
Shaikh Rais 1-Jun-12 7:56am    
what i want is

I am using developer express demo version now, i try gridlookupcontrol it is inline control act as grid,
i have common gridlookcontrol which is commonly use is Customergridview , productloanview which i have to create many time in my project

what i want to create form that contain all my common control with data-set
i will inherit the form in all form and reply control with original control in form
johannesnestler 6-Jun-12 7:38am    
Sorry I don't realy understand what you mean - English is not my native language too... can you try to re-formulate your question (or show some relevant code?) Maybe then I can try to help...
Hi,

you can create user control.

for example view below link

User Control example
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900