Telerik Forums
UI for WPF Forum
1 answer
130 views

Hi,

My situation is this: I have a RadGridView control with one or more columns defined as GridViewComboBoxColumn. These combobox columns are populated with a large amount of rows, and I want to provide to the users the same functionality as in a regular RadComboBox control: type in an input field the first few letters of an item they want and the combobox column auto-completes the first match in the list and scrolls to it.

Is there any solution to this? What I tried is using a custom column derived from GridViewBoundColumnBase, as in the demo GridView->Columns->Custom Column, but couldn't make it to work.

Maya
Telerik team
 answered on 02 Jun 2011
5 answers
202 views
I'm trying to show the RadDatePicker in cells by default.  I know that I can use the built in editors, but I want the pickers showing by default without the user having to click into the cell.  So I made a control template based on an example I saw elsewhere in this forum doing the same thing for CheckBoxes.  The code I'm using is below:

<telerik:RadGridView Name="ActiveGrid" Grid.Row="0" Style="{DynamicResource DefaultGrid}"  
                     ItemsSource="{Binding Path=CompletionList}" AutoGenerateColumns="False" ScrollMode="RealTime"  
                      DataLoadMode="Synchronous" CanUserSortColumns="False" SelectionChanged="RadGridView_SelectionChanged"  
                     CurrentCellChanged="ActiveGrid_CurrentCellChanged" > 
    <telerik:RadGridView.Resources> 
        <ControlTemplate x:Key="completionDateCellTemplate" TargetType="{x:Type telerik:GridViewCell}"
            <telerik:RadDatePicker SelectionChanged="RadDatePicker_SelectionChanged" VerticalAlignment="Center" 
                                    SelectedDate="{Binding Path=dtDateCompleted}"/> 
        </ControlTemplate> 
        <Style x:Key="completionDateCellStyle" TargetType="{x:Type telerik:GridViewCell}"
            <Setter Property="telerik:GridViewCell.Template" Value="{StaticResource completionDateCellTemplate}" /> 
        </Style> 
    </telerik:RadGridView.Resources> 
    <telerik:RadGridView.Columns> 
        <telerik:GridViewDataColumn Width="*" Header="Comp." Name="CompDateCompleted"  
                                    CellStyle="{StaticResource completionDateCellStyle}" TextWrapping="Wrap"  /> 
    </telerik:RadGridView.Columns> 
</telerik:RadGridView> 
(This is of course a cut down version of my full grid)

This works fine and shows the date pickers if the dates are all null.  However, if the dates are non null then the no rows display at all - this includes rows that have the dates as null.  I can scroll for some reason when this happens even though I don't see any rows, and I get the following information from the Output window:
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='Telerik.Windows.Controls.RadGridView', AncestorLevel='1''. BindingExpression:Path=UseAlternateRowStyle; DataItem=null; target element is 'GridViewRow' (Name=''); target property is 'NoTarget' (type 'Object')

I assume this is more to do with the rows not being there than related to the DatePicker not working though.

I'm using the latest release of the controls - 2009 Q2.

I've tried binding to DisplayDate as well, and this might work except that it's a DateTime rather than a DateTime? so I can't bind to it, since my dates are nullable.

Any ideas on how to make this work?

Siingh
Top achievements
Rank 2
 answered on 02 Jun 2011
3 answers
91 views

Hello,

I have a question regarding bar charts.

On this type of chart I need to be able to modify the height of each bar (like on a usual bar charts) but also the width of each bar (this is less usual...).

So all those bars need to be modifiable in height and width and have to be stuck together (no space between them).

Is it possible to achieve that with your library ? Do I need to use a special chart ? in 2D or 3D?

Thank you in advance for your help,

Regards,

Yavor
Telerik team
 answered on 02 Jun 2011
10 answers
336 views
Hi,
I currently use the TelerikGridView control in a WPF desktop project and I have some problems with low grid performance, both with loading data, with displaying and with using it.

There are approximatively between 500 and 2.000 records to manage (sometimes up to 10.000 records in one case), and it takes more than 5 minutes to display them.

The grid is contained in an user-control which is itself contained in a scrollviewer (needed).

Here is the code of the grid's user-control:

<telerikGrid:RadGridView x:Class="Ere.Desktop.Modules.Onshore.UserControls.Etape2AGridView"
    xmlns:telerikGrid="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView"
    x:Name="radGridView" AutoGenerateColumns="False" ShowGroupPanel="False">
    <telerikGrid:RadGridView.Columns>
        <telerikGrid:GridViewDataColumn DataMemberBinding="{Binding TransfertSurSiteSpecifique1.CleLibelleType, Converter={StaticResource MyLocalizeConverter}}" Header="{Localize ONSGRIDTRANSSS1}" IsReadOnly="True" IsReorderable="False" IsResizable="False" IsSortable="False" IsGroupable="False" IsFilterable="True"/>
        <telerikGrid:GridViewDataColumn DataMemberBinding="{Binding TransfertSurSiteSpecifique1.LibelleTransfertAmont}" Header="{Localize ONSGRIDTRANSSSSPEAM1}" IsReadOnly="True" IsReorderable="False" IsResizable="False" IsSortable="False" IsGroupable="False" IsFilterable="True"/>
        <telerikGrid:GridViewDataColumn DataMemberBinding="{Binding TransfertSurSiteSpecifique1.LibelleTransfertAval}" Header="{Localize ONSGRIDTRANSSSSPEAV1}" IsReadOnly="True" IsReorderable="False" IsResizable="False" IsSortable="False" IsGroupable="False" IsFilterable="True"/>
        <telerikGrid:GridViewDataColumn DataMemberBinding="{Binding TransfertSurSiteSpecifique2.CleLibelleType, Converter={StaticResource MyLocalizeConverter}}" Header="{Localize ONSGRIDTRANSSS2}" IsReadOnly="True" IsReorderable="False" IsResizable="False" IsSortable="False" IsGroupable="False" IsFilterable="True"/>
        <telerikGrid:GridViewDataColumn DataMemberBinding="{Binding TransfertSurSiteSpecifique2.LibelleTransfertAmont}" Header="{Localize ONSGRIDTRANSSSSPEAM2}" IsReadOnly="True" IsReorderable="False" IsResizable="False" IsSortable="False" IsGroupable="False" IsFilterable="True"/>
        <telerikGrid:GridViewDataColumn DataMemberBinding="{Binding TransfertSurSiteSpecifique2.LibelleTransfertAval}" Header="{Localize ONSGRIDTRANSSSSPEAV2}" IsReadOnly="True" IsReorderable="False" IsResizable="False" IsSortable="False" IsGroupable="False" IsFilterable="True"/>
        <telerikGrid:GridViewDataColumn DataMemberBinding="{Binding TransfertSurSiteSpecifique3.CleLibelleType, Converter={StaticResource MyLocalizeConverter}}" Header="{Localize ONSGRIDTRANSSS3}" IsReadOnly="True" IsReorderable="False" IsResizable="False" IsSortable="False" IsGroupable="False" IsFilterable="True"/>
        <telerikGrid:GridViewDataColumn DataMemberBinding="{Binding TransfertSurSiteSpecifique3.LibelleTransfertAmont}" Header="{Localize ONSGRIDTRANSSSSPEAM3}" IsReadOnly="True" IsReorderable="False" IsResizable="False" IsSortable="False" IsGroupable="False" IsFilterable="True"/>
        <telerikGrid:GridViewDataColumn DataMemberBinding="{Binding TransfertSurSiteSpecifique3.LibelleTransfertAval}" Header="{Localize ONSGRIDTRANSSSSPEAV3}" IsReadOnly="True" IsReorderable="False" IsResizable="False" IsSortable="False" IsGroupable="False" IsFilterable="True"/>
        <telerikGrid:GridViewDataColumn DataMemberBinding="{Binding TransfertHorsSiteSpecifique1.CleLibelleType, Converter={StaticResource MyLocalizeConverter}}" Header="{Localize ONSGRIDTRANSHS1}" IsReadOnly="True" IsReorderable="False" IsResizable="False" IsSortable="False" IsGroupable="False" IsFilterable="True"/>
        <telerikGrid:GridViewDataColumn DataMemberBinding="{Binding TransfertHorsSiteSpecifique1.LibelleTransfertAmont}" Header="{Localize ONSGRIDTRANSHSSPEAM1}" IsReadOnly="True" IsReorderable="False" IsResizable="False" IsSortable="False" IsGroupable="False" IsFilterable="True"/>
        <telerikGrid:GridViewDataColumn DataMemberBinding="{Binding TransfertHorsSiteSpecifique1.LibelleTransfertAval}" Header="{Localize ONSGRIDTRANSHSSPEAV1}" IsReadOnly="True" IsReorderable="False" IsResizable="False" IsSortable="False" IsGroupable="False" IsFilterable="True"/>
        <telerikGrid:GridViewDataColumn DataMemberBinding="{Binding TransfertHorsSiteSpecifique2.CleLibelleType, Converter={StaticResource MyLocalizeConverter}}" Header="{Localize ONSGRIDTRANSHS2}" IsReadOnly="True" IsReorderable="False" IsResizable="False" IsSortable="False" IsGroupable="False" IsFilterable="True"/>
        <telerikGrid:GridViewDataColumn DataMemberBinding="{Binding TransfertHorsSiteSpecifique2.LibelleTransfertAmont}" Header="{Localize ONSGRIDTRANSHSSPEAM2}" IsReadOnly="True" IsReorderable="False" IsResizable="False" IsSortable="False" IsGroupable="False" IsFilterable="True"/>
        <telerikGrid:GridViewDataColumn DataMemberBinding="{Binding TransfertHorsSiteSpecifique2.LibelleTransfertAval}" Header="{Localize ONSGRIDTRANSHSSPEAV2}" IsReadOnly="True" IsReorderable="False" IsResizable="False" IsSortable="False" IsGroupable="False" IsFilterable="True"/>
        <telerikGrid:GridViewDataColumn DataMemberBinding="{Binding TransfertHorsSiteSpecifique3.CleLibelleType, Converter={StaticResource MyLocalizeConverter}}" Header="{Localize ONSGRIDTRANSHS3}" IsReadOnly="True" IsReorderable="False" IsResizable="False" IsSortable="False" IsGroupable="False" IsFilterable="True"/>
        <telerikGrid:GridViewDataColumn DataMemberBinding="{Binding TransfertHorsSiteSpecifique3.LibelleTransfertAmont}" Header="{Localize ONSGRIDTRANSHSSPEAM3}" IsReadOnly="True" IsReorderable="False" IsResizable="False" IsSortable="False" IsGroupable="False" IsFilterable="True"/>
        <telerikGrid:GridViewDataColumn DataMemberBinding="{Binding TransfertHorsSiteSpecifique3.LibelleTransfertAval}" Header="{Localize ONSGRIDTRANSHSSPEAV3}" IsReadOnly="True" IsReorderable="False" IsResizable="False" IsSortable="False" IsGroupable="False" IsFilterable="True"/>
        <telerikGrid:GridViewDataColumn DataMemberBinding="{Binding MilieuCibleSpecifique.IdType, Converter={StaticResource MyLocalizeConverter}}" Header="{Localize ONSGRIDMILCIBTYP}" IsReadOnly="True" IsReorderable="False" IsResizable="False" IsSortable="False" IsGroupable="False" IsFilterable="True"/>
        <telerikGrid:GridViewDataColumn DataMemberBinding="{Binding MilieuCibleSpecifique.LibelleSpecifique}" Header="{Localize ONSGRIDMILCBLSPE}" IsReadOnly="True" IsReorderable="False" IsResizable="False" IsSortable="False" IsGroupable="False" IsFilterable="True"/>
        <telerikGrid:GridViewDataColumn DataMemberBinding="{Binding CleLibelleModePollution, Converter={StaticResource MyLocalizeConverter}}" Header="{Localize ONSGRIDKEYLIBMOD}" IsReadOnly="True" IsReorderable="False" IsResizable="False" IsSortable="False" IsGroupable="False" IsFilterable="True"/>
        <telerikGrid:GridViewDataColumn DataMemberBinding="{Binding CleModule, Converter={StaticResource MyLocalizeConverter}}" Header="{Localize ONSGRIDKEYMODULE}" IsReadOnly="True" IsReorderable="False" IsResizable="False" IsSortable="False" IsGroupable="False" IsFilterable="True"/>
        <telerikGrid:GridViewDynamicHyperlinkColumn DataMemberBinding="{Binding IdBase, Converter={StaticResource MyLocalizeConverter}}" Header="{Localize ONSGRIDSCEBAS}" IsReadOnly="True" IsReorderable="False" IsResizable="False" IsSortable="False" IsGroupable="False" IsFilterable="True" NavigateUrlMemberPaths="FichierAide" NavigateUrlFormatString="{} {0}" />
    </telerikGrid:RadGridView.Columns>
</telerikGrid:RadGridView>

and here is the container code of the grid's user-control:

<Grid>
   <Grid.ColumnDefinitions>
        <ColumnDefinition Width="*" />
   </Grid.ColumnDefinitions>
   <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="*"/>
   </Grid.RowDefinitions>
   <ctrl:Etape2AGridView Grid.Column="0" Grid.Row="0" x:Name="GridView" ItemsSource="{Binding ScenariosSpecifiques}" DataContext="{Binding CurrentEtape}">
         <i:Interaction.Behaviors>
               <bhv:FilterBehavior Items="{Binding Items}" />
         </i:Interaction.Behaviors>
    </ctrl:Etape2AGridView>
</Grid>


I can't identify the cause of this (very) low performance.

 

Thanks!

Robert
Top achievements
Rank 1
 answered on 02 Jun 2011
2 answers
148 views
Hello Telerik team,

I am using a WPF rad grid {EnableRowVirtualization is set to"True"}.

I have used the GridViewToggleRowDetailsColumn column to toggle the visibility of the row details section of each row. 
I have some editable fields in the row details section like checkbox, dropdown.

On click of the expand button(+), I am populating these fields with some default values in  radGrid_LoadingRowDetails event.

I change the values in the fields and the leave the details section expanded. Then scroll down the grid so that the row move out of the window range and scroll up to the row again, the LoadingRowDetails fired again, thus reloading the fields in the details section with default values and thus the state of the fields is lost.

Is there any way to control the re-firing of the LoadingRowDetails on scroll if the row details section is already expanded.

Please provide your inputs.


Thanks,
Regards,
Mausami Sawant.

Mausami
Top achievements
Rank 1
 answered on 02 Jun 2011
1 answer
119 views
i am testing your solution from DEMO "Custom filter row" and i would like to know somethng about date filter. Why after i load my radgridview and i want to filter my datatime column i see selected date 1000 01 01 :/ i would like to see for exmple todauy day on start and selected after filter.
Marcin
Top achievements
Rank 1
 answered on 02 Jun 2011
3 answers
197 views
I will start by saying that I love the new RadTimeBar control.  It was exactly the sort of control we needed for our app that is currently under development.

As soon as I got the control, the first thing I tried was to bind PeriodStart, PeriodEnd, SelectionStart and SelectionEnd up to my ViewModel.  This hasn't worked very well though.  Binding PeriodEnd and PeriodStart in XAML would work only if I did the bindings in that order (ie: end first and then start).  Unfortunately VisiblePeriodEnd would always equal VisiblePeriodStart which always equalled PeriodStart so the user would have to stretch it out.  After adjusting VisiblePeriodEnd, it would then lock up at PeriodEnd and not be changeable any more.  In the end, I decided to set PeriodStart, PeriodEnd, VisiblePeriodStart and VisiblePeriodEnd to the required values from the ViewModel in the View's DataContextChanged event.  This set everything correctly and enabled the user to then adjust both VisiblePeriodStart and VisiblePeriodEnd.

Anyway, on to my main issue.  I am binding SelectionStart and SelectionEnd in XAML to my ViewModel and it works kinda ok but not really great.  My ViewModel validates the date range selection that the user has asked set using the TimeBar and then stores the validated value instead of the user requested value.  The problem I have is that if the user selects a date range with the TimeBar that when validated results in the same values that are already stored, even though I raise the PropertyChanged events for the properties that SelectionStart and SelectionEnd are bound to, the visual selection on the screen does not update (ie: revert to the previous values that were valid) and instead keeps the user requested values.   I don't see this as as a bug as such as I can see you guys developed the control with it's own validation, but if this is a feature that could be added it would be much appreciated.  For now, as our app is still under development, we are ok with releasing the current functionality to our beta testers as is, but we'd love to have this changed if possible.  In fact, I would love it if I could bind to the ViewModel not just SelectionStart and SelectionEnd but PeriodStart and PeriodEnd as well.

Hope that all made sense =)

Cheers,

Nick Barrett
Tsvetie
Telerik team
 answered on 01 Jun 2011
8 answers
193 views
Hi I can see this from your release notes "Ability to see which item was checked initially in tri state mode"  here http://www.telerik.com/versionnotes.aspx?id=2268

any info on how to use this ?

Best regards
Kristján.
Petar Mladenov
Telerik team
 answered on 01 Jun 2011
2 answers
410 views
Hi,

I'm fairly new to playing with the RadRichtextBox and am wondering if anyone would know how to get around this problem.  I am programatically formatting font and then adding text to a Rich Text Box like so (richTB is a RichTextBox decalred in the XAML):

richTB.DocumentInheritsDefaultStyleSettings = true;
richTB.FontSize = 11;
 
Section sec = new Section();
 
Span sp = new Span();
sp.Text = "Some Text I want to write to RTB";
 
Paragraph par = new Paragraph();
par.Inlines.Add(sp);
 
sec.Blocks.Add(par);
 
richTB.Document.Sections.AddBefore(rtb.Document.Sections.First, sec);

Now, this works fine, the text appears at the start of the RichTextBox.  My problem is that if I move the cursor to the next line, the font changes to something bigger (default font size of original Section).  I've tried to remove all section of the document using:

richTB.Document.Sections.Clear();

Before writing the text I want to write to the RichTextBox but this call causes an exception (Object reference not set to an instance of an object.). Why can't I clear the collection? 

Is there something wrong with removing sections?  If there is, is there a way I could just change the font of the original section to use what I defined for the RadRichTextBox?  That is my real problem.

Thanks,

-- Joel



Joel
Top achievements
Rank 1
 answered on 01 Jun 2011
1 answer
39 views
I noticed the following behavior after updating from Telerik version 2010.3.1110.40 to 2011.1.0419.40:

When a GridView is placed in a RadPane (they are docked as documents) and RadPaneGroup.AllowDragReorder = true

a) the GridView filter menu closes if you try to klick any control in it without the control reacting correctly. For example, if you try to click a checkbox, the checkbox doesn't get checked/unchecked and the menu closes. The only exception are comboxes: They can be opened but you can't select any item in it.

b) the horizontal GridView scrollbars don't scroll anymore (only in very small increments and this occurs only when dragging the scroll marker) or scroll the GridView content vertically all of a sudden.

If I set "RadPaneGroup.AllowDragReorder = false" everything seems to be fine.
Yordanka
Telerik team
 answered on 01 Jun 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?