From: ArunDhaJ on
Hi,
I'm having a form with a DataGridView control in it. I'm facing a
problem with a column which is set to be hidden in the designer.
While I view the form for the first time, it is hidden. But when I
load the form again, this column gets visible and shows in UI. For
that I tried to explicitly set this column to be hidden on form load,
but still the problem persists...
I'm using DataTable to bind the data to the DataGridView.

What might be the possible problem with it? How to check the property
and when it gets changed? Still more annoying is that, I've one more
form with a DataGridView in it, that form works fine. I almost spent
hours to ensure that the settings are same, but still my first form is
behaving the same way.

Please help me to resolve this issue.
Thanks in Advance
ArunDhaJ
From: ArunDhaJ on
I've got a workaround for it, but still I dont know the root cause of
it.
I've added a VisibleChanged event handler, and in that, I check if the
column's visibility is still false. If it is true, I explicitly set it
to false.
By this way, I'm able to manage it.

Still wondering who would have changed the visibility to true.

Thanks a lot for the support.
Regards
ArunDhaJ

On May 21, 3:45 pm, ArunDhaJ <arund...(a)gmail.com> wrote:
> Hi,
> I'm having a form with a DataGridView control in it. I'm facing a
> problem with a column which is set to be hidden in the designer.
> While I view the form for the first time, it is hidden. But when I
> load the form again, this column gets visible and shows in UI. For
> that I tried to explicitly set this column to be hidden on form load,
> but still the problem persists...
> I'm using DataTable to bind the data to the DataGridView.
>
> What might be the possible problem with it? How to check the property
> and when it gets changed? Still more annoying is that, I've one more
> form with a DataGridView in it, that form works fine. I almost spent
> hours to ensure that the settings are same, but still my first form is
> behaving the same way.
>
> Please help me to resolve this issue.
> Thanks in Advance
> ArunDhaJ