Hello there,
in reference to my other question, subdatagrid, I have a problem calling multiple times the visible attribute:
When the user presses a button, I show the datagrid with
dgrIndRoleAttributes.Visible = true:
After pressing the button again, I just redo this with the
dgrIndRoleAttributes.Visible = false;
If I press the button again, so I want visible = true again, I get the error that the control with the same ID allready exists. Does Visible = False remove the control or does it just set the CSS?
Is there a bug in my code which causes such error or should I not use this property on that way?
Thanks for your response
Matthias
Hello Olga,
I'm not readding anything from the code behind. Does Visible = true readd the control? Would it be easier to add a css class collapsed?
Thanks
Hello Matthias,
The visibility property just affects the visibility of the control, but the control is still in the Page’s controls collection, so it should not be re-added/created on postback.
Thanks,
Olga Kerchentseva
ASP.NET Principal Software Engineer
Infragistics, Inc.