Click here to Skip to main content
15,895,509 members
Home / Discussions / C#
   

C#

 
GeneralRe: Form Paint drawing incorrectly Pin
Ennis Ray Lynch, Jr.21-Nov-08 3:57
Ennis Ray Lynch, Jr.21-Nov-08 3:57 
GeneralRe: Form Paint drawing incorrectly Pin
Chris Copeland21-Nov-08 4:07
mveChris Copeland21-Nov-08 4:07 
GeneralRe: Form Paint drawing incorrectly Pin
Guffa21-Nov-08 5:01
Guffa21-Nov-08 5:01 
QuestionGeneric Class with Inheritance Pin
MatthysDT21-Nov-08 2:50
MatthysDT21-Nov-08 2:50 
AnswerRe: Generic Class with Inheritance Pin
cor287921-Nov-08 13:41
cor287921-Nov-08 13:41 
AnswerRe: Generic Class with Inheritance Pin
N a v a n e e t h21-Nov-08 17:33
N a v a n e e t h21-Nov-08 17:33 
GeneralRe: Generic Class with Inheritance Pin
MatthysDT23-Nov-08 19:23
MatthysDT23-Nov-08 19:23 
GeneralRe: Generic Class with Inheritance Pin
cor287924-Nov-08 4:05
cor287924-Nov-08 4:05 
I'm not sure about the necessity of using a StateTracker to track the state of a row, but notwithstanding that, why would you need to derive the StateTracker from a generic type? Based on your post, I am guessing that you want to actually derive the StateTracker from the List that is used as the GridView data source. Assuming you could do this, it really wouldn't be an effective inheritance model because A List is a logical grouping of objects, and a StateTracker is an object created for tracking the state of something. There really is no logical inheritance relation between the two. I think it would be more effective to use a model like this:

Say you have objects you are viewing in your GridView. We'll call them objects of type Widget. Now you want to populate your GridView with a data source. You're using a List<Widget> collection object as your data source. Great, except this doesn't have all the data you need. You want to track the state of the List<Widget>. So just create an overloaded class, call it WidgetCollection or something like that. This class will inherit from List<Widget> and also contain an instance of the StateTracker class (which is a base type - not derived from anything other than System.Object). This inner instance of StateTracker should be used to track the state of each WidgetCollection. Again I don't know if this would be the best solution because I don't fully know your situation, but something along these lines should meet your needs - You have a collection of objects that either tracks state on the collection level or the object level. If you are tracking on the collection level, then the collection contains a StateTracker to handle this. If you are tracking on the object level, then each Object contains a StateTracker to handle this. Hope that helps or gets you pointed in the right direction.

"We are men of action; lies do not become us."

GeneralRe: Generic Class with Inheritance Pin
MatthysDT24-Nov-08 19:11
MatthysDT24-Nov-08 19:11 
QuestionParent form Text Pin
pcjd6321-Nov-08 2:45
pcjd6321-Nov-08 2:45 
AnswerRe: Parent form Text Pin
Pedram Behroozi21-Nov-08 4:57
Pedram Behroozi21-Nov-08 4:57 
GeneralRe: Parent form Text Pin
pcjd6321-Nov-08 5:07
pcjd6321-Nov-08 5:07 
GeneralRe: Parent form Text Pin
pcjd6321-Nov-08 5:18
pcjd6321-Nov-08 5:18 
GeneralRe: Parent form Text Pin
Pedram Behroozi21-Nov-08 5:26
Pedram Behroozi21-Nov-08 5:26 
GeneralRe: Parent form Text Pin
pcjd6321-Nov-08 5:59
pcjd6321-Nov-08 5:59 
GeneralRe: Parent form Text Pin
Pedram Behroozi21-Nov-08 6:42
Pedram Behroozi21-Nov-08 6:42 
QuestionEnable and Disable Certain cells in the WPF DataGrid Pin
chetanN21-Nov-08 2:33
chetanN21-Nov-08 2:33 
QuestionOpening large files to edit Pin
Matjaz-xyz21-Nov-08 1:27
Matjaz-xyz21-Nov-08 1:27 
AnswerRe: Opening large files to edit Pin
Pedram Behroozi21-Nov-08 1:31
Pedram Behroozi21-Nov-08 1:31 
AnswerRe: Opening large files to edit Pin
HosamAly21-Nov-08 8:19
HosamAly21-Nov-08 8:19 
QuestionMDI - Kinda... [modified] Pin
#realJSOP21-Nov-08 0:26
mve#realJSOP21-Nov-08 0:26 
AnswerRe: MDI - Kinda... Pin
Luc Pattyn21-Nov-08 2:52
sitebuilderLuc Pattyn21-Nov-08 2:52 
AnswerRe: MDI - Kinda... Pin
Mycroft Holmes21-Nov-08 13:49
professionalMycroft Holmes21-Nov-08 13:49 
AnswerRe: MDI - Kinda... Pin
Scott Dorman22-Nov-08 2:40
professionalScott Dorman22-Nov-08 2:40 
QuestionOpen Excel with C#.NET Pin
chirag.3g20-Nov-08 23:31
chirag.3g20-Nov-08 23:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.