-
ColumnHeader
Hi:
Is there a property of ColumnHeader object of .Net that can let us store
some useful information to developers at runtime? For example Key or Tag
property like in VB6 that we can store some text information to.
lance
-
Re: ColumnHeader
"lance" <lanceyuan@msn.com> wrote in news:3db85b8a$1@tnews.web.devx.com:
>
> Hi:
>
> Is there a property of ColumnHeader object of .Net that can let us
> store
> some useful information to developers at runtime? For example Key or
> Tag property like in VB6 that we can store some text information to.
>
>
> lance
Not really. But you can always inherit from ColumnHeader, and add whatever
properties you need.
--
Rune Bivrin
- OOP since 1989
- SQL Server since 1990
- VB since 1991
-
Re: ColumnHeader
Or you can store it in your object model.
Rune Bivrin <rune@bivrin.com> wrote:
>"lance" <lanceyuan@msn.com> wrote in news:3db85b8a$1@tnews.web.devx.com:
>
>>
>> Hi:
>>
>> Is there a property of ColumnHeader object of .Net that can let us
>> store
>> some useful information to developers at runtime? For example Key or
>> Tag property like in VB6 that we can store some text information to.
>>
>>
>> lance
>
>Not really. But you can always inherit from ColumnHeader, and add whatever
>properties you need.
>
>--
>Rune Bivrin
> - OOP since 1989
> - SQL Server since 1990
> - VB since 1991
>
-
Re: ColumnHeader
"Markn" <vb.@127.0.0.1> wrote in news:3db91c33$1@tnews.web.devx.com:
>
> Or you can store it in your object model.
Not meaning to pick nits here, just curious of your opinion:
What do you think should be stored in the object model?
The ColumnHeader or the text? Both are possible, of course.
It becomes an interesting issue when you need to go from ColumnHeader to
something like the corresponding item in an app-defined dictionary.
Placing the dictionary key in a property of a ColumnHeader subclass is
probably the best performing solution, but it increases complexity somewhat
(if complexity = class count).
Placing a reference to the ColumnHeader in your object model requires fewer
classes, but will probably result in a linear search somewhere. Also, it
increases coupling between your object model and the WinForms object model.
--
Rune Bivrin
- OOP since 1989
- SQL Server since 1990
- VB since 1991
-
Re: ColumnHeader
Don't know for sure Rune. I was merely throwing a suggestion out. Lance
said ColumnHeader but I wonder if he really meant Row. I've done more in
another langauge. To do what that language provides currently has to be
done by the developer in .Net. I was merely suggesting to think outside
the [vb classic] box.
The thing to do is map the object model to the view (Renderer?).
Rune Bivrin <rune@bivrin.com> wrote:
>"Markn" <vb.@127.0.0.1> wrote in news:3db91c33$1@tnews.web.devx.com:
>
>>
>> Or you can store it in your object model.
>
>Not meaning to pick nits here, just curious of your opinion:
>
>What do you think should be stored in the object model?
>
>The ColumnHeader or the text? Both are possible, of course.
>
>It becomes an interesting issue when you need to go from ColumnHeader to
>something like the corresponding item in an app-defined dictionary.
>
>Placing the dictionary key in a property of a ColumnHeader subclass is
>probably the best performing solution, but it increases complexity somewhat
>(if complexity = class count).
>
>Placing a reference to the ColumnHeader in your object model requires fewer
>classes, but will probably result in a linear search somewhere. Also, it
>increases coupling between your object model and the WinForms object model.
>
>
>
>
>--
>Rune Bivrin
> - OOP since 1989
> - SQL Server since 1990
> - VB since 1991
>
-
Re: ColumnHeader
OK. Then we're on the same page. By suggesting various things, we can add
to each others skills.
Often, I find that in order to answer a "how to" question in a truly
valuable way, I have to start with asking a "why" question. Sometimes
because I don't know the answer, and sometimes because the question is
analogous to "How do I kill myself".
Somehow the recent activity over on the other side has got me looking over
my shoulder a bit, which feels odd.
--
Rune Bivrin
- OOP since 1989
- SQL Server since 1990
- VB since 1991
-
Re: ColumnHeader
Yeah, I'm not hassling you here.
Most 'technical' questions I see here(pick a group) equate to "How do the
same old thing the same old way?", "How do I do something in a bad way?"
(I wanted to say 'stupid') or "How do I get myself out of the jam caused
by doing one of the first two?".
So the question to Lance would be, what are you really trying to do?
Rune Bivrin <rune@bivrin.com> wrote:
>OK. Then we're on the same page. By suggesting various things, we can add
>to each others skills.
>
>Often, I find that in order to answer a "how to" question in a truly
>valuable way, I have to start with asking a "why" question. Sometimes
>because I don't know the answer, and sometimes because the question is
>analogous to "How do I kill myself".
>
>Somehow the recent activity over on the other side has got me looking over
>my shoulder a bit, which feels odd.
>
>--
>Rune Bivrin
> - OOP since 1989
> - SQL Server since 1990
> - VB since 1991
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks