Hi Every One
can we show or hide some column in grid view depending upon user role
mean if admin all column he can see if guest some he can see can we do this in grid view if yes how if no what will be the alternate way
thanks in advance
Grid View Help
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Kirtan PatelRank #292 · 8.6K reputationPosted Oct 25, 2009, 1:54 AM EDT
get the user role first
then
//Code for binding GriDView to database
if(role == "guest")
{
GridVIew1.Columns[3].Visible = false ;
GridVIew1.Columns[4].Visible = false ;
}
else if(role == "normal")
{
GridVIew1.Columns[5].Visible = false ;
GridVIew1.Columns[6].Visible = false ;
}
else
{
//show all
}