This is a migrated thread and some comments may be shown as answers.

[Solved] Doubt on RadGridView Control's property

1 Answer 66 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ashok kumar
Top achievements
Rank 1
Ashok kumar asked on 17 Nov 2009, 01:52 AM
I am newbie to RadControls. I have to work with RadGridView. While analysing the code, I found one property called ColumnBackground with peculiar value ={x:Null}: Can anybody learn me what does it mean? I am sending the code part also.
                <grid:RadGridView x:Name="GridView1" 
                                      CanUserResizeColumns="False" 
                                      MultipleSelect="True"  
                                      DataLoadMode="Asynchronous"  
                                      AreRowDetailsFrozen="True" 
                                      RowDetailsVisibilityMode="VisibleWhenSelected" 
                                      RowDetailsTemplate="{StaticResource TestRowDetailsTemplate}" 
                                      SelectionChanged="GridView1_SelectionChanged" 
                                      ItemsSource="{Binding TestAwards, Mode=TwoWay}" 
                                      IsReadOnly="True" 
                                      AutoGenerateColumns="False"  
                                      ColumnsWidthMode="Fill" 
                                      CanUserFreezeColumns="False" 
                                      UseAlternateRowStyle="True" 
                                      ColumnBackground="{x:Null}"
                                      ShowGroupPanel="False" 
                                      RowIndicatorVisibility="Collapsed" 
                                      ScrollMode="RealTime"
                                      Style="{StaticResource RadGridViewSettings}"
                                      IsEnabled="False"
                                      Background="Transparent">

Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Kalin Milanov
Telerik team
answered on 18 Nov 2009, 12:50 PM
Hello Ashok,

There are multiple ways of setting a color in XAML. You can set a named color, a hex value, or no value at all. In the latter case the {x:Null} stands for just that.

Now the difference between a Border (for instance) with Transparent color and a border with {x:Null} color is that in the first case the Border has a background which is invisible in the second case there is no background.

One of the possible issues you might encounter is that you will not be able to click on an element with {x:Null} as background - there is nothing to click on, while as if the color is Transparent you will be able to click.

I hope this brings some clarity to your question.

Regards,
Kalin Milanov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
GridView
Asked by
Ashok kumar
Top achievements
Rank 1
Answers by
Kalin Milanov
Telerik team
Share this question
or