Hide the columns for members from parent class in grid
Hide the columns for members from parent class in grid
am 14.01.2008 21:11:38 von Fir5tSight
I have a derived class (DistributionItem) that contains a few members.
Now I have a binding list of instances of this class to be displayed
in a grid.
However, extra columns are displayed from the parent class
(IWorkerItemBase). How can I hide those members from the parent class
in the grid?
FYI, my code is below:
SortableBindingList baseList =
worker.SelectedItems;
SortableBindingList distList = new
SortableBindingList();
foreach (IWorkerItemBase bse in baseList)
{
// Safe cast
DistributionItem dist = bse as DistributionItem;
if (dist == null)
{
return;
}
// If it's DistributionItem
distList.Add(dist);
}
c1FlexGrid1.DataSource = distList;
Re: Hide the columns for members from parent class in grid
am 14.01.2008 21:26:47 von NoSpamMgbworld
My first thought is to edit the tags and restrict what is shown there.
--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA
*************************************************
| Think outside the box!
|
*************************************************
"Curious" wrote in message
news:831e42dd-01ff-4867-a1af-bfeb33c0f10e@j78g2000hsd.google groups.com...
>I have a derived class (DistributionItem) that contains a few members.
> Now I have a binding list of instances of this class to be displayed
> in a grid.
>
> However, extra columns are displayed from the parent class
> (IWorkerItemBase). How can I hide those members from the parent class
> in the grid?
>
> FYI, my code is below:
>
> SortableBindingList baseList =
> worker.SelectedItems;
>
> SortableBindingList distList = new
> SortableBindingList();
>
> foreach (IWorkerItemBase bse in baseList)
> {
>
> // Safe cast
> DistributionItem dist = bse as DistributionItem;
>
> if (dist == null)
> {
> return;
> }
>
> // If it's DistributionItem
> distList.Add(dist);
>
> }
>
> c1FlexGrid1.DataSource = distList;
Re: Hide the columns for members from parent class in grid
am 14.01.2008 21:37:10 von Fir5tSight
I did that by setting the columns in the grid properties. However, it
still loads extra columns including those in the parent class. It
seems that it ignores the properties of the grid set in the grid
properties dialog, once the datasource is set in the code.
Re: Hide the columns for members from parent class in grid
am 16.01.2008 00:55:54 von Fir5tSight
to destroy
any wicked man, at any moment. All the means that there are of sinners
going out of the world, are so in God's hands, and so universally and
absolutely subject to his power and determination, that it does not
depend at all the less on the mere will of God, whether sinners shall at
any moment go to hell, than if means were never made use of, or at all
concerned in the case.
Natural men's prudence and care to preserve their own lives, or the care
of others to preserve them, do not secure them a moment. To this, divine
providence and universal experience do also bear testimony. There is
this clear evidence that men's own wisdom is no security to them from
death; that if it were otherwise we should see some difference between
the wise and politic men of the world, and others, with regard to their
liableness to early and unexpected death: but how is it in fact? Eccles.
2:16. "How dieth the wise man? even as the fool."
All wicked men's pains and contrivance which they use to escape hell,
while they continue to reject Christ, and so remain wicked men, do not
secure them from hell one moment. Almost every natural man that hears
Re: Hide the columns for members from parent class in grid
am 16.01.2008 01:06:15 von NoSpamMgbworld
neither the existence nor the nature of God, because He
has neither extension nor limits.
But by faith we know His existence; in glory we shall know His nature. Now,
I have already shown that we may well know the existence of a thing, without
knowing its nature.
Let us now speak according to natural lights.
If there is a God, He is infinitely incomprehensible, since, having neither
parts nor limits, He has no affinity to us. We are then incapable of knowing
either what He is or if He is. This being so, who will dare to undertake the
decision of the question? Not we, who have no affinity to Him.
Who then will blame Christians for not being able to give a reason for their
belief, since they profess a religion for which they cannot give a reason?
They declare, in expounding it to the world, that it is a foolishness,
stultitiam;28 and then you complain that they do not prove it! If they
proved it, they would not keep their word; it is in lacking proofs that they
are not lacking in sense. "Yes, but although this excuses those who offer it
as such and takes away from them the blame of putting it
Re: Hide the columns for members from parent class in grid
am 16.01.2008 02:15:41 von Fir5tSight
creation.
As these two states are open, it is impossible for you not to recognise
them. Follow your own feelings, observe yourselves, and see if you do not
find the lively characteristics of these two natures. Could so many
contradictions be found in a simple subject?
Incomprehensible. Not all that is incomprehensible ceases to exist. Infinite
number. An infinite space equal to a finite.
Incredible that God should unite Himself to us. This consideration is drawn
only from the sight of our vileness. But if you are quite sincere over it,
follow it as far as I have done and recognise that we are indeed so vile
that we are incapable in ourselves of knowing if His mercy cannot make us
capable of Him. For I would know how this animal, who knows himself to be so
weak, has the right to measure the mercy of God and set limits to it,
suggested by his own fancy. He has so little knowledge of what God is that
he does not know what he himself is, and, completely disturbed at the sight
of his own state, dares to say that God cannot make him capable of communion
with Him.