Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
Hello,
 
In our current project we are using telerik rad controls for developing silverlight project,
according to logged-in user the columns are displayed on the datagrid, for some of the users some grid columns are set to invisible, which is leading to a gap between columns ,when the user is logged-in the space between the columns does not look good,
does any one know how to fix this gap, thank you very much.
 
<telerik:GridViewDataColumn DataMemberBinding="{Binding WeeklyUsage}"                                                                                
Width="84" 												DataFormatString="{}{0:F2}"                         						IsVisible="{Binding IsColumnVisibleToCustomer, Source={StaticResource PFOViewModel}}"
IsReadOnly="True" TextAlignment="Right" HeaderTextAlignment="Center"/>
 
public bool IsColumnVisibleToCustomer
        {
            get { return !WebContext.Current.User.IsInRole("Customer"); }
        }
 
public bool IsInRole(string role)
        {
            if ((this.Roles == null))
            {
                return false;
            }
            return global::System.Linq.Enumerable.Contains(this.Roles, role);
        }
Posted 7-Mar-13 12:17pm
Edited 7-Mar-13 12:48pm
v2
Comments
ThePhantomUpvoter at 7-Mar-13 17:21pm
   
If you are having a problem with Telerik controls, why are you not talking to them about it?
richcb at 7-Mar-13 17:22pm
   
Instead of visibility, can you alter the display and set it to none? That way it does not take up space on the page.
Member 9857060 at 7-Mar-13 17:24pm
   
well i am using a converter to hide the columns according to the user...
richcb at 7-Mar-13 17:25pm
   
You might need to post your code so others can take a look.
Member 9857060 at 7-Mar-13 17:43pm
   

 
public bool IsColumnVisibleToCustomer
{
get { return !WebContext.Current.User.IsInRole("Customer"); }
}
Member 9857060 at 7-Mar-13 17:49pm
   
I updated my question

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 381
1 Sergey Alexandrovich Kryukov 245
2 Marcin Kozub 225
3 Praneet Nadkar 217
4 /\jmot 189
0 OriginalGriff 8,284
1 Sergey Alexandrovich Kryukov 7,407
2 DamithSL 5,614
3 Maciej Los 4,989
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web04 | 2.8.1411023.1 | Last Updated 7 Mar 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100