Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Now to subclass a grid
Message
From
02/11/2010 11:38:10
 
 
To
02/11/2010 05:41:01
General information
Forum:
ASP.NET
Category:
Class design
Environment versions
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01487795
Message ID:
01487866
Views:
36
>I have found that if I create a "user control" with the grid, I can amend the user control class and that updates in the form. Is this an acceptable method of coding? don't quite understand the difference between a "User Control" and a straight forward class.

I wouldn't use the UserControl if it's for a single control. IOW, all you'd be putting on the UserControl would be the Grid. If you were designing a control that had, as an example, a TextBox and a Button and they had to work together for some reason, then that's when you put them both in a UserControl.

So for your grid, you should just be sub-classing it in code. Use Viv's suggestion (I know it's a PITA, but it'll work once you extract all the pieces you need into your class).

~~Bonnie
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform