How to make web user control readonly
Hi,
I have a web user control gridview containing table and rows and columns. I want to make it readonly based on certain conditions.
I have declared property in web user control page as follows:
public Boolean ReadOnly
{
get
{
return ViewState["ReadOnly"] == null ? false : Convert.ToBoolean(ViewState["ReadOnly"]);
}
set
{
ViewState["ReadOnly"] = value;
}
}
Now I want to call this and set the control to readonly. How to do that?
Thanks,
Sheetal