Telerik Forums
UI for WPF Forum
5 answers
167 views
Hello!
If I have a RadComboBox, with  more than 20 items this thing becomes a bit confusing.
My example:

Window1.xaml.cs:

public partial class Window1 : Window {
public Window1() {
            InitializeComponent();
            InitializeCombobox();
        }
        private void InitializeCombobox() {
            cbPrimaryData.Items.Clear();
            IList<String> dataItems = new List<string>();

            for (int i = 0; i < 50; i++) {
                dataItems.Add( "Item " + i );
            }
            cbPrimaryData.DataContext = dataItems;
        }
}

in Window1.xaml:

<Grid>
        <telerik:RadComboBox Grid.Row="1"
                             Grid.Column="1"
                             Grid.ColumnSpan="2"
                             Height="20"
                             Name="cbPrimaryData"
                             VerticalAlignment="Center"
                             ItemsSource="{Binding}"
                             Margin="2" />
    </Grid>

If I select the item at index 0 everything works fine when I try to open again the combo box the focus is at the beginning of the items list.
If item at index 1 is selected - at the nest attempt to open the combo box the focus goes to Item 17!
index 2 => focus at index 34
Afterwords the focus is moved at the end of the list.
I think that normal and logic would be that the combo box is focused starting with the selected index, and not at the end of the list.
I don't know if I was very clear in the explanation... just try the small example :)

Regards,
RoxanaC
Valeri Hristov
Telerik team
 answered on 19 Jan 2010
2 answers
111 views
Is there a way to disable the numerical tick label on the LinearScale control?
Sean
Top achievements
Rank 1
 answered on 19 Jan 2010
3 answers
93 views
Wondering if you have a date for releasing an updated internal build for the WPF controls? The combobox with the current release is really in need of some work with focus issues. Hoping all these are taken care of.

Also, any idea when using the combobox we will be able to set IsEditable = true AND limit their entires/selections to just what is in the list without having to write custom code? Setting IsReadOnly = true is not what we were looking for...

Thanks!
Valeri Hristov
Telerik team
 answered on 19 Jan 2010
2 answers
103 views
Hello,
     I set the background color of a grid column to red but it did not appear to work. When I scrolled down the cells began to appear read. When I scrolled back up to the top the cells that did not have a red background now had a red background.
Note. I have virtualizing turned on.

I switched off virtualizing  and the command to change the background of the column red did not work at all. Here's the command:

gridname.Columns[<column to turn red>].Background = Brushes.Red;

Any help would be appreciated.

Thanks
Pavel Pavlov
Telerik team
 answered on 19 Jan 2010
1 answer
205 views
Hi,
i need that my last row in grid will be always selected and that the first cell in this row will be in edit mode.
BeginEdit() doesnt work for me becouse my ItemSource is not obserableCollection, its a custom collection:
 public interface ICustomObservableCollection<T> : ICollection<T>, INotifyCollectionChanged, INotifyPropertyChanged  
        where T : EntityBase2, IEntity2  
    { }  
 
    public class CustomObservableCollection<T> : ICustomObservableCollection<T> 
        where T : EntityBase2, IEntity2  
{} 


Thanx

Masha
Milan
Telerik team
 answered on 18 Jan 2010
11 answers
483 views
Hello

I want to search for a value in one of the columns in my grid and then select the row
I used this code to run on the items
foreach (GridViewRowItem griParent in RadGridView1.ChildrenOfType<GridViewRowItem>())  
                    {  
                        if (griParent.DataItem != null)  
                        {  
                            if ((griParent.DataItem as DataRowView).Row["ActivityName"].ToString().Contains(sSearch))  
                            {  
                                gvriParent.Add(griParent);   
                            }           
                        }  
                    }  
..........  
 
if (iParentSearch < gvriParent.Count)  
                {  
                    if ((gvriParent[iParentSearch] as GridViewExpandableRow) == null && ((gvriParent[iParentSearch].ParentOfType<GridViewExpandableRow>()))!=null)  
                    {  
                        ((gvriParent[iParentSearch].ParentOfType<GridViewExpandableRow>())).IsExpanded = true;  
                    }  
                    gvriParent[iParentSearch].IsSelected = true;  
                    this.RadGridView1.BringDataItemIntoView(gvriParent[iParentSearch]);  
                    iParentSearch++;  
                }  
...... 

the problem is
that if there is a scroll in my grid
the "foreach (GridViewRowItem griParent in RadGridView1.ChildrenOfType<GridViewRowItem>())   "
does not get the rows that are not shown in the screen

by the way
I use - this.RadGridView1.BringDataItemIntoView
but it looks like nothing happen

Thanks
Orit
Top achievements
Rank 1
 answered on 18 Jan 2010
5 answers
189 views
Hi
I've been using widly RadGauges in my application, which acts as a monitoring dashboard.
I have found how to create very stylish radial and linear gauges, but I'm not successed in Numeric ones.
How you something like layout examples of Numeric gauges that can be desined (if there will be code - that's would be great :))? (except those ones in demo project).

Maybe some links, or screenshots, or examples - any help in this would be very appreciated.

I'm probably looking for creating 3D-Look Numeric Gauge (already I've made so that the text in gauge has a 3D shadow) - is that possible?

Thanks
Andrey
Telerik team
 answered on 18 Jan 2010
8 answers
1.1K+ views
I'm trying to replace the standard RadPane header with one of my own. I have followed a blog example but can't get it to work. The close button appears when the pane is hidden but when it is visible the default header is shown. What am I doing wrong?

<Window xmlns:my="clr-namespace:WpfTelerikDocking"   
        x:Class="WpfTelerikDocking.MainWindow" 
        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" 
        Title="Docking Test" Height="600" Width="1024"
     
    <DockPanel LastChildFill="True"
         
        <Menu DockPanel.Dock="Top"
            <MenuItem Header="_File"/> 
            <MenuItem Header="_Help"/> 
        </Menu> 
         
        <StatusBar DockPanel.Dock="Bottom"
            <StatusBarItem Margin="5,0,5,0" Content="Status Info"/> 
        </StatusBar> 
         
        <Grid> 
            <telerik:RadDocking Name="radDocking1" HasDocumentHost="False"
                 
                <telerik:RadDocking.Resources> 
                    <DataTemplate x:Key="PaneWithCloseButton_HeaderTemplate"
                        <StackPanel Orientation="Horizontal"
                            <ContentPresenter Content="{Binding}" /> 
                            <Button Content="X" Width="18" Height="18" 
                                /> 
                        </StackPanel> 
                    </DataTemplate> 
                </telerik:RadDocking.Resources> 
 
                <telerik:RadSplitContainer Name="LeftContainer" InitialPosition="DockedLeft"
 
                    <telerik:RadPaneGroup> 
                        <telerik:RadPane Header="PANE" 
                                HeaderTemplate="{StaticResource PaneWithCloseButton_HeaderTemplate}"
                            <TextBlock Text="Text content" /> 
                        </telerik:RadPane> 
                         
                    </telerik:RadPaneGroup> 
 
                </telerik:RadSplitContainer> 
 
                <telerik:RadSplitContainer Name="RightContainer" InitialPosition="DockedRight"
 
                    <telerik:RadPaneGroup> 
                        <telerik:RadPane Header="Map"
                        </telerik:RadPane> 
                    </telerik:RadPaneGroup> 
                     
                </telerik:RadSplitContainer> 
 
            </telerik:RadDocking> 
        </Grid> 
 
    </DockPanel> 
</Window> 
 

Cheers

Steve
Steve Chadbourne
Top achievements
Rank 1
 answered on 17 Jan 2010
0 answers
119 views
Hello,
     I finally figured out how to prevent a user from re-ordering the first column in my grid. 

Here's how I did it:

In the DataLoaded event of my grid I typed in this line (for the first column in grid):
((Telerik.Windows.Controls.GridView.GridViewDataControl)(sender)).Columns[0].IsReorderable = false;

What's kind of strange about this command is that I can't reorder the first column but I can move other columns in front of it. Here's what I did to prevent this problem:

In the  ColumnReordered event of the grid I typed in the following lines of code:

private void ColumnReordered(object sender, GridViewColumnEventArgs e)
        {
            if (e.Column.DisplayIndex == 0)
                for (int i = 1; i < gridname.Columns.Count ; i++)
                    if (e.Column.Header == gridname.Columns[i].Header)
                        e.Column.DisplayIndex = i;
        }

Note. e.Column.DisplayIndex indicates where the user tried to move the column to.

If the user attempts to move a column to the position of the first column, the code above will search for the original location of the column being moved and set e.Column.DisplayIndex  back to it's original value.  Essentially I am moving the column back to its original location.

Jorge Gonzalez
Top achievements
Rank 1
 asked on 15 Jan 2010
0 answers
84 views
Hello,
     I finally figured out how to prevent a user from re-ordering the first column in my grid. 

Here's how I did it:

In the DataLoaded event of my grid I typed in this line (for the first column in grid):
((Telerik.Windows.Controls.GridView.GridViewDataControl)(sender)).Columns[0].IsReorderable = false;

Note. What's kind of strange about this command is that I can't reorder the first column but I can move other columns in front of it.

In the  ColumnReordered event of the grid I typed in the following lines of code:

private void ColumnReordered(object sender, GridViewColumnEventArgs e)
        {
            if (e.Column.DisplayIndex == 0)
                for (int i = 1; i < gridname.Columns.Count ; i++)
                    if (e.Column.Header == gridname.Columns[i].Header)
                        e.Column.DisplayIndex = i;
        }

Note. e.Column.DisplayIndex indicates where the user tried to move the column to.

If the user attempts to move a column to the position of the first column, the code above will search for the original location of the column being moved and set e.Column.DisplayIndex  back to it's original value.  Essentially I am moving the column back to its original location.

Jorge Gonzalez
Top achievements
Rank 1
 asked on 15 Jan 2010
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?