Click here to Skip to main content
11,796,393 members (72,252 online)
Rate this: bad
Please Sign up or sign in to vote.

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 11:17am
Edited 7-Mar-13 11:48am
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 Maciej Los 570
1 Abhinav S 392
2 OriginalGriff 340
3 CPallini 269
4 KrunalRohit 249
0 OriginalGriff 2,012
1 Maciej Los 1,615
2 KrunalRohit 1,310
3 CPallini 1,015
4 Richard MacCutchan 828

Advertise | Privacy | Mobile
Web04 | 2.8.151002.1 | Last Updated 7 Mar 2013
Copyright © CodeProject, 1999-2015
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