I just started using Telerik Grid instead of MS based Grid.
I just tried to Add and clear columns dynamically into the grid but I couldn't find the appropirate functions in intellisense.
I tried "this.radResult.Columns.Add(dyncol)" but, I Couldn't find "Add" in intellisense, couldn't find "Clear" method in intellisense as either.
I just tried to Add and clear columns dynamically into the grid but I couldn't find the appropirate functions in intellisense.
I tried "this.radResult.Columns.Add(dyncol)" but, I Couldn't find "Add" in intellisense, couldn't find "Clear" method in intellisense as either.
| <UserControl x:Class="SolutionQ.Eclipse.Silverlight.Content.Search.xxxx.xxxx.xxxxxxxx" |
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| xmlns:dg="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data" |
| xmlns:RadNav="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation" |
| xmlns:controls="clr-namespace:SolutionQ.Eclipse.Silverlight.Content.Controls" |
| xmlns:RadGrid="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView" |
| xmlns:GridView="clr-namespace:Telerik.Windows.Controls.GridView;assembly=Telerik.Windows.Controls.GridView" |
| > |
| <Grid x:Name="LayoutRoot" Background="White"> |
| <Grid.RowDefinitions> |
| <!--xmlns:Ra=""--> |
| <RowDefinition Height="Auto" /> |
| <RowDefinition Height="1*" /> |
| </Grid.RowDefinitions> |
| <Grid.ColumnDefinitions> |
| <ColumnDefinition Width="1*" /> |
| </Grid.ColumnDefinitions> |
| <!-- Filtering ToolBar --> |
| <RadNav:RadToolBarTray Grid.Row="0" Grid.Column="0" Style="{StaticResource style_DataGridRadToolBarTray}"> |
| <RadNav:RadToolBar x:Name="rtb_Filter" Style="{StaticResource style_RadToolBar}"> |
| <!-- New Clause Button --> |
| <Button x:Name="btn_ExportToExcel" Tag="btn_ExportToExcel" Click="btn_Menu_Click" ToolTipService.ToolTip="Export to Excel Format"> |
| <controls:IconAndLabelControl Icon="Icons/PlaceHolderIcon.xaml" Label="Export To Excel" /> |
| </Button> |
| <Button x:Name="btn_ViewResults" Tag="btn_ViewResults" Click="btn_Menu_Click" ToolTipService.ToolTip="View Results"> |
| <controls:IconAndLabelControl Icon="Icons/PlaceHolderIcon.xaml" Label="View Results" /> |
| </Button> |
| </RadNav:RadToolBar> |
| </RadNav:RadToolBarTray> |
| <!--<dg:DataGrid x:Name="Result" Grid.Row="1" Grid.Column="0" AutoGenerateColumns="False" ItemsSource="{Binding Path=Items, Mode=TwoWay}" Style="{StaticResource style_GenericDataGrid}" CellStyle="{StaticResource style_GenericDataGridCell}" ColumnHeaderStyle="{StaticResource style_GenericDataGridColumnHeader_LeftAligned}" RowHeaderStyle="{StaticResource style_GenericDataGridRowHeader}" RowStyle="{StaticResource style_GenericDataGridRow}"> |
| </dg:DataGrid>--> |
| <RadGrid:RadGridView x:Name="radResult" Grid.Row="1" Grid.Column="0" AutoGenerateColumns="False" > |
| <!--ItemsSource="{Binding Path=Items, Mode=TwoWay}"--> |
| </RadGrid:RadGridView> |
| </Grid> |
| </UserControl> |
At code behind side I am using following namespaces:
| using System; |
| using System.Collections.Generic; |
| using System.Linq; |
| using System.Net; |
| using System.Windows; |
| using System.Windows.Controls; |
| using System.Windows.Documents; |
| using System.Windows.Input; |
| using System.Windows.Media; |
| using System.Windows.Media.Animation; |
| using System.Windows.Shapes; |
| // Telerik using |
| using Telerik.Windows; |
| using Telerik.Windows.Data; |
| using Telerik.Windows.Controls; |
| using Telerik.Windows.Controls.GridView; |
| using Telerik.Windows.Controls.GridView.Cells; |
| // add using |
| using System.Collections.ObjectModel; |
| using System.Windows.Browser; |
| using System.ComponentModel; |
| using System.Collections; |
| using System.Windows.Controls.Primitives; |
| void tabPreview_Loaded(object sender, RoutedEventArgs e) |
| { |
| BuildColumns(); |
| } |
| private void BuildColumns() |
| { |
| this.radResult.Columns.Clear(); //<-- This method doesnt show in intellisense, neither Add method will show up here |
| } |
Am I doing anything wrong here?