Rank: Newbie Groups: Member
Joined: 5/26/2011 Posts: 2
|
Hi, I want to hide certain grid columns based on session values. Something like this
<eo:CheckBoxColumn Width="20" AllowResize="false" DataField="media_orig_id" Visible="<%= Session["App_Role"].ToString().ToUpper()=="AGENCY"%>"> </eo:CheckBoxColumn>
How can I do this. This is giving error.
Thanks
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,201
|
Hi, You just can not do that. : ) CheckBoxColumn is not a control and it won't take your data binding expressions. If you wish to set the column's Visible property based on whatever logic you have, you would just write code to do it in your code behind. For example,
Code: C#
if (whatever)
Grid1.Columns[column_index].Visible = false;
Thanks
|