Telerik Forums
UI for WPF Forum
2 answers
97 views
In thefollowing grid, it seems that the HeaderText attribute is ignored. Why is that?

Sorry to ask, but the documentation is thin or I am missing something.

        <telerik:RadGridView Grid.Row="1" Name="pagesGridView" telerik:StyleManager.Theme="Vista" DataLoadMode="Synchronous" AutoGenerateColumns="False" CanUserInsertRows="False" CanUserFreezeColumns="False" UseAlternateRowStyle="True" ColumnsWidthMode="Auto" ShowGroupPanel="False">  
            <telerik:RadGridView.Columns> 
                <telerik:GridViewDataColumn  x:Name="IdColumn" HeaderText="Id"  Width="75" DataMemberPath="Id" IsReadOnly="True"  /> 
                <telerik:GridViewDataColumn  x:Name="StatusColumn" HeaderText="Link"  Width="200" DataMemberPath="LinkUrl" /> 
                <telerik:GridViewDataColumn  x:Name="Title" HeaderText="Name"  Width="*" DataMemberPath="Title" /> 
            </telerik:RadGridView.Columns> 
        </telerik:RadGridView> 
Kenneth Jamieson
Top achievements
Rank 1
 answered on 21 Oct 2009
4 answers
50 views
When I put line in my xaml file:

<telerik:RadGridView Name="dataGrid" ColumnsWidthMode="Fill" IsReadOnly="True"  AutoGenerateColumns="False" DataLoadMode="Asynchronous"
                             RowIndicatorVisibility="Collapsed" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" />

 after removing  ColumnsWidthMode="Fill" works ok





I get:


   w System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, OperationType operationType, Boolean isInternal)
   w System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   w System.Windows.Controls.Primitives.ScrollBar.set_ViewportSize(Double value)
   w Telerik.Windows.Controls.GridView.ScrollBarStateController.UpdateScrollBar(ScrollBar scrollBar, ScrollBarProperties properties) w c:\Builds\WPF_Scrum\GridView_WPF_2009_Q2_SP1\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\ScrollBarStateController.cs:wiersz 60
   w Telerik.Windows.Controls.GridView.ScrollBarStateController.UpdateVerticalScrollBarsProperties(ScrollBarProperties properties) w c:\Builds\WPF_Scrum\GridView_WPF_2009_Q2_SP1\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\ScrollBarStateController.cs:wiersz 49
   w Telerik.Windows.Controls.GridView.GridViewScrollViewer.UpdateScrollBars() w c:\Builds\WPF_Scrum\GridView_WPF_2009_Q2_SP1\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewScrollViewer.cs:wiersz 503
   w Telerik.Windows.Controls.GridView.GridViewScrollViewer.GridViewScrollViewer_LayoutUpdated(Object sender, EventArgs e) w c:\Builds\WPF_Scrum\GridView_WPF_2009_Q2_SP1\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewScrollViewer.cs:wiersz 534
   w System.Windows.ContextLayoutManager.fireLayoutUpdateEvent()
   w System.Windows.ContextLayoutManager.UpdateLayout()
   w System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
   w System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
   w System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   w System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   w System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   w System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
   w System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
L uke
Top achievements
Rank 1
 answered on 21 Oct 2009
3 answers
103 views
Hello,

I have a grid.

I click on a cell and and a MouseUp event occurs.

I do what I do and then I want to cancel the focus of the cell without transferring the focus to a different cell.

Is that possible ?

Thanks,

Erez

Rossen Hristov
Telerik team
 answered on 21 Oct 2009
2 answers
124 views

Hey all,

I have a RadGrid on a Wpf page, it is goign to be loading data from a Astoria service. Right away, we need to bind it programatically - the declarative syntax won't work since I need to do some set up.

Ideally, I would grab a data subset and do the binding directly, but there is at least one problem... Astoria (int he release bits) doesn't support Count() so I cannot bind the grid directly. In other words, I cannot...

 

var corePages = contextCore.CmsPageSet.OrderBy(p => p.Title);  
pageListGridView.ItemsSource = corePages;  

Instead I have to...

 

var corePages = contextCore.CmsPageSet.OrderBy(p => p.Title);  
pageListGridView.ItemsSource = corePages.ToList(); 

Which is seriously suboptimal because it means grabbing all the records over the wire to project them into the list so that the grid is happy with them. Ugly, ugly, ugly.

It gets even worse because since this is not the astoria CTP2, I can't do projections on the server, either which means I pull down all the columns for each record, even though I only need three for the grid. I need Id, Title and Sortweight. Of those, I need Id to be hidden, so that I can access it as a key when a user clicks on a row (I need to pull up a window for the edit) but the user is not bothered with it in the grid proper.

So here are my questions....

  1. Has anyone managed a direct bind between a RadGridView and an astoria data service - am I barking up the wrong tree?
  2. How do you give the RadGridView a list of columns to use from a programtically bound data source? I knwo how to declare the columns, but I am unsure how to tie them to the (future) properties of the anonymous type I will be binding after the projection. UniqueName didn't seem to be enough. The documentation is very weak in this reguard.
  3. By any chance, does someone know the proper syntax for a lambda style .Select LINQ statement to pull multiple columns out?

Thanks!

Kenneth Jamieson
Top achievements
Rank 1
 answered on 21 Oct 2009
1 answer
57 views
We just downloaded the latest version of Telerik controls and we have noticed that the RadDataGrid for WPF has a misterious dot on the middle right hand side of the screen. (see atttached)

Any ideas where the dot / circle may be comming from?
Vlad
Telerik team
 answered on 21 Oct 2009
6 answers
146 views
If I attempt to open Example.xaml from the Docking project in the Examples_WPF.CS project installed by the Q3 beta the VS designer  errors on loading the xaml and I get the following error:

Error    28    Invalid XmlnsDeclaration occurs in assembly 'Telerik.Windows.Controls.Docking, Version=2009.3.916.35, Culture=neutral, PublicKeyToken=5803cfa389c90ce7'. XmlnsDeclaration references a namespace 'Telerik.Windows.Controls.GridView' that is not in the assembly.    C:\Program Files\Telerik\RadControls for WPF Q3 2009\Demos\Docking\FirstLook\Example.xaml    1    1    Examples_WPF.CS

Otherwise the project seems to build and run just fine.
Nikolay
Telerik team
 answered on 20 Oct 2009
1 answer
100 views
Hi,

In "RadControls_for_WPF_2009_3_1016_TRIAL",
on the GridView->CustomFilterRow sample, when you choose to filter the Date column,
And selected date from the date picker the date is not shown in the text filter row.

Thanks
Vlad
Telerik team
 answered on 20 Oct 2009
1 answer
171 views
Hello,

I'm attempting to add and remove items to the RadTileView. I'm having trouble removing the item from the collection. I'm sure I'm missing something obvious.

public partial class Window1 : Window  
    {  
        RadTileViewItem item0 = new RadTileViewItem() { Header = "1" };  
        RadTileViewItem item1 = new RadTileViewItem() { Header = "2" };  
        RadTileViewItem item2 = new RadTileViewItem() { Header = "3" };  
 
        public Window1()  
        {  
            InitializeComponent();  
 
              
            tileview.Items.Add(item0);  
            tileview.Items.Add(item1);  
            tileview.Items.Add(item2);  
 
        }  
 
        void btn_Click(object sender, RoutedEventArgs e)  
        {  
                tileview.Items.Remove(item1);  
        }  
    } 
<Window x:Class="addDeleteTileViewItem.Window1" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">  
    <Grid> 
        <Grid.RowDefinitions> 
            <RowDefinition Height="30" /> 
            <RowDefinition /> 
        </Grid.RowDefinitions> 
        <Button Click="btn_Click" /> 
        <telerik:RadTileView Name="tileview" Grid.Row="1" /> 
    </Grid> 
</Window> 

When I click the button i get a KeyNotFoundException.
Any help would be appreciated.

Thanks again,
Boots
Tihomir Petkov
Telerik team
 answered on 20 Oct 2009
1 answer
135 views
Hi,

I have following questions:

1. Can we have a RadGridView grouping similar to MS Outlook, where we have items grouped like "Today", "Yesterday" etc.
In the online samples, grouping works similar to that but it shows it as tree kind of and a vertical band line. Can we remove that (vertical band line on left side) and show the child items in simple row?

2. How we can add image to the Row selector (not as a column) and also how to add image to a column using code?
3. How we can hide (remove) RadGridView Header and Grouping title bar area?

Thanks,
Sanjeev
Stefan Dobrev
Telerik team
 answered on 20 Oct 2009
1 answer
82 views
Hi,
I wanted to display special dates based on user selection. In order to do that I need to update/repaint the calendar, but I couldn't find the function for that. I searched the forum and as I understood WinForms have this possibility. :)

Thank you :)
Kaloyan
Telerik team
 answered on 20 Oct 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?