Re: Silly suggestion - thinking aloud
Sorry, not acceptable to me. DataBinding should just work ! The grid
column
should just show a blank value since it is not assigned. This is a problem
MS does not seem to either understand or care about, but I can tell you
from experience that I have used other systems that handle this properly.
If I had to write code to handle this for all the thousands and thousands of
grid columns, text fields, comboboxes, list boxes etc... that I data bind to
I'd just shoot myself and get it over. Thankfully I have a solution that
solves this
for me. No, I can't say how :)
JIM
"Jon Skeet" <skeet@pobox.co m> wrote in message
news:MPG.19b99f 421266c9f598a42 e@news.microsof t.com...[color=blue]
> james <nospam@hyperco n.net> wrote:[color=green]
> > When it comes to databinding, and realtions where you want to
> > bind to a grid column you cannot check for null and you cannot insert
> > try catch blocks. Suppose you have a grid of Employees
> > and each Employee has the following relation path
> >
> > Employee.ToDepa rtment.ToDepart mentManager.ToJ obTitle.Name
> >
> > Now you want to have a column in the grid that displays this department
> > manages job title. Unfortuantley, if the department manager is not[/color][/color]
assigned[color=blue][color=green]
> > then the middele of your path is broken, your program crashes !![/color]
>
> So you don't do that. You do it in separate stages - and what you do if
> each "link" ends up being null may well be different anyway.
>
> --
> Jon Skeet - <skeet@pobox.co m>
> http://www.pobox.com/~skeet/
> If replying to the group, please do not mail me too[/color]
Sorry, not acceptable to me. DataBinding should just work ! The grid
column
should just show a blank value since it is not assigned. This is a problem
MS does not seem to either understand or care about, but I can tell you
from experience that I have used other systems that handle this properly.
If I had to write code to handle this for all the thousands and thousands of
grid columns, text fields, comboboxes, list boxes etc... that I data bind to
I'd just shoot myself and get it over. Thankfully I have a solution that
solves this
for me. No, I can't say how :)
JIM
"Jon Skeet" <skeet@pobox.co m> wrote in message
news:MPG.19b99f 421266c9f598a42 e@news.microsof t.com...[color=blue]
> james <nospam@hyperco n.net> wrote:[color=green]
> > When it comes to databinding, and realtions where you want to
> > bind to a grid column you cannot check for null and you cannot insert
> > try catch blocks. Suppose you have a grid of Employees
> > and each Employee has the following relation path
> >
> > Employee.ToDepa rtment.ToDepart mentManager.ToJ obTitle.Name
> >
> > Now you want to have a column in the grid that displays this department
> > manages job title. Unfortuantley, if the department manager is not[/color][/color]
assigned[color=blue][color=green]
> > then the middele of your path is broken, your program crashes !![/color]
>
> So you don't do that. You do it in separate stages - and what you do if
> each "link" ends up being null may well be different anyway.
>
> --
> Jon Skeet - <skeet@pobox.co m>
> http://www.pobox.com/~skeet/
> If replying to the group, please do not mail me too[/color]
Comment