Telerik Forums
UI for WPF Forum
1 answer
72 views
Hello,
    I am trying to open a dialog radwindow but nothing appears. The window should appear after the user clicks on a button in the primary window. My application is an XBAP. 
Any help would be appreciated.
Thanks
Jorge Gonzalez
Top achievements
Rank 1
 answered on 07 Jan 2010
3 answers
98 views
Hello

I want to let the user find a row by the value of a specific column
this is the scenario-
the user write a text in a TextBox
and click search
then I take the text and find the row
(((System.Data.DataView)RadGridView1.ItemsSource).Table.Select("ActivityName like '%" + txtSearch.Text + "%' ")[0]) 
now I want to select this row
how can I do it?
Milan
Telerik team
 answered on 07 Jan 2010
1 answer
139 views
This one I have to class as wierd.

Version: WPF Q3 2009 SP1  2009.3.1208.35

I have a GridView with 7 predefined columns.
3 of the columns have HeaderCellStyle defined.  They do not have ControlTemplates.  I've only applied a few property setters to change the visual appearance.

The application starts off with a large size, so there are no scroll bars visible.
First issue is here.  Sizing the application Window down by grabbing the bottom right thumb, the scroll bars do no properly appear.  I ahe to move the mouse about to get the horizontal scroll bar to appear, and it doesn't appear to be based fully on the GridView's visible size.

Second issue.  If you resize the Window, and make it as narrow as possible, and then widen it again, the styling on the last column (Receipt Application) has changed.  This column was defined without a style, and now it's somehow gotten the style from the column next to it.

Thrid issue.  If you are somehow able to size the Window down to half it's initial width, and have a Horizonal Scroll Bar.  Now, click on the Horizontal Scroller, and moved it left and right quickly.  The other two columns that didn't have styling, now magically have the styling applied!



namespace WpfApplication_DataGrid  
{  
    using System;  
    using System.Collections.Generic;  
    using System.Collections.ObjectModel;  
    using System.Windows;  
    using System.Windows.Data;  
    using Telerik.Windows.Controls;  
 
    /// <summary>  
    /// Interaction logic for Window8.xaml  
    /// </summary>  
    public partial class Window8 : Window  
    {  
        public Window8()  
        {  
            InitializeComponent();  
 
 
            Binding binding;  
 
 
            ObservableCollection<Receipt> list2 = new ObservableCollection<Receipt>();  
            list2.Add(new Receipt("HELLO", 1123, 456, 1, 8, DateTime.Today, "B"));  
            list2.Add(new Receipt("HELLO", 2123, 456, 2, 7, DateTime.Today, "B"));  
            list2.Add(new Receipt("HELLO", 3123, 456, 3, 6, DateTime.Today, "C"));  
            list2.Add(new Receipt("HELLO", 4123, 456, 4, 5, DateTime.Today, "C"));  
            list2.Add(new Receipt("WORLD", 1123, 456, 5, 4, DateTime.Today, "A"));  
            list2.Add(new Receipt("WORLD", 2123, 456, 6, 3, DateTime.Today, "B"));  
            list2.Add(new Receipt("WORLD", 3123, 456, 7, 2, null"C"));  
            list2.Add(new Receipt("WORLD", 4123, 456, 8, 1, DateTime.Today, "D"));  
            list2.Add(new Receipt("WORLD", 4123, 456, 8, 1, DateTime.MinValue, "D"));  
 
 
            binding = new Binding();  
            binding.Source = list2;  
            uxRadGridView.SetBinding(RadGridView.ItemsSourceProperty, binding);  
 
        }  
    }  
}  
 
namespace WpfApplication_DataGrid  
{  
    using System;  
    using System.ComponentModel;  
 
    public class Receipt : INotifyPropertyChanged  
    {
        #region fields  
        string _source;  
        double _amount;  
        double _associatedAmount;  
        double _allocatedAmount;  
        double _availableAmount;  
        DateTime? _receiptEffectiveDate;  
        string _receiptApplication;
        #endregion  
 
        #region ctor  
        public Receipt()  
        {  
        }  
 
        public Receipt(string source, double amount, double associatedAmount, double allocatedAmount, double availableAmount, DateTime? receiptEffectiveDate, string receiptApplication)  
        {  
            Source = source;  
            Amount = amount;  
            AssociatedAmount = associatedAmount;  
            AllocatedAmount = allocatedAmount;  
            AvailableAmount = AvailableAmount;  
            ReceiptEffectiveDate = receiptEffectiveDate;  
            ReceiptApplication = receiptApplication;  
        }
        #endregion  
 
        #region properties  
        public string Source  
        {  
            get { return _source; }  
            set 
            {  
                _source = value;  
                NotifyPropertyChanged("Source");  
            }  
        }  
        public double Amount  
        {  
            get { return _amount; }  
            set 
            {  
                _amount = value;  
                NotifyPropertyChanged("Amount");  
            }  
        }  
        public double AssociatedAmount  
        {  
            get { return _associatedAmount; }  
            set 
            {  
                _associatedAmount = value;  
                NotifyPropertyChanged("AssociatedAmount");  
            }  
        }  
        public double AllocatedAmount  
        {  
            get { return _allocatedAmount; }  
            set 
            {  
                _allocatedAmount = value;  
                NotifyPropertyChanged("AllocatedAmount");  
            }  
        }  
        public double AvailableAmount  
        {  
            get { return _availableAmount; }  
            set 
            {  
                _availableAmount = value;  
                NotifyPropertyChanged("AvailableAmount");  
            }  
        }  
        public DateTime? ReceiptEffectiveDate  
        {  
            get { return _receiptEffectiveDate; }  
            set 
            {  
                _receiptEffectiveDate = value;  
                NotifyPropertyChanged("ReceiptEffectiveDate");  
            }  
        }  
 
        public string ReceiptApplication  
        {  
            get { return _receiptApplication; }  
            set 
            {  
                _receiptApplication = value;  
                NotifyPropertyChanged("ReceiptApplication");  
            }  
        }
        #endregion  
 
        #region Interface INotifyPropertyChanged  
        public event PropertyChangedEventHandler PropertyChanged;  
 
        private void NotifyPropertyChanged(string propertyName)  
        {  
            if (PropertyChanged != null)  
                PropertyChanged(thisnew PropertyChangedEventArgs(propertyName));  
        }
        #endregion  
    }  
}  
 
<Window x:Class="WpfApplication_DataGrid.Window8" Title="Window8" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:local="clr-namespace:WpfApplication_DataGrid" 
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" 
    Height="700" Width="900" WindowStartupLocation="CenterScreen">  
    <Window.Resources> 
        <LinearGradientBrush x:Key="ColumnHeaderBackgroundBrush" EndPoint="0.494,0.889" StartPoint="0.494,0.028">  
            <GradientStop Color="#FFE7F1FF" Offset="0"/>  
            <GradientStop Color="#FFD2E6FF" Offset="0.4"/>  
            <GradientStop Color="#FFC7DFFF" Offset="0.4"/>  
            <GradientStop Color="#FFC7DFFF" Offset="1"/>  
        </LinearGradientBrush> 
        <SolidColorBrush x:Key="CellSeperatorBorderBrush" Color="#FFB3B3B3"/>  
 
 
        <Style x:Key="GridViewHeaderCellStyle" TargetType="{x:Type telerik:GridViewHeaderCell}">  
            <Setter Property="Background" Value="{StaticResource ColumnHeaderBackgroundBrush}" /> 
            <Setter Property="BorderBrush" Value="{StaticResource CellSeperatorBorderBrush}"/>  
            <Setter Property="BorderThickness" Value="0,0,1,0"/>  
            <Setter Property="Foreground" Value="Black"/>  
            <Setter Property="FontWeight" Value="Light"/>  
            <Setter Property="FontSize" Value="12"/>  
            <Setter Property="DropMarkPen">  
                <Setter.Value> 
                    <Pen Thickness="60">  
                        <Pen.Brush> 
                            <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">  
                                <GradientStop Color="#00F4F5F6" Offset="0"/>  
                                <GradientStop Color="#B2808080" Offset="0.5"/>  
                                <GradientStop Color="#00F4F5F6" Offset="1"/>  
                            </LinearGradientBrush> 
                        </Pen.Brush> 
                    </Pen> 
                </Setter.Value> 
            </Setter> 
            <Setter Property="SnapsToDevicePixels" Value="True"/>  
        </Style> 
    </Window.Resources> 
    <Grid> 
        <telerik:RadGridView xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"   
                    AutoGenerateColumns="False" 
                    x:Name="uxRadGridView" telerik:StyleManager.Theme="Office_Black">  
            <telerik:RadGridView.Columns> 
                <telerik:GridViewDataColumn IsFilterable="False" DataMemberBinding="{Binding Source}" /> 
                <telerik:GridViewDataColumn IsFilterable="False" DataMemberBinding="{Binding Amount}" /> 
                <telerik:GridViewDataColumn IsFilterable="False" Header="Associated Amount" DataMemberBinding="{Binding AssociatedAmount}" HeaderCellStyle="{StaticResource GridViewHeaderCellStyle}"/>  
                <telerik:GridViewDataColumn IsFilterable="False" Header="Allocated Amount" DataMemberBinding="{Binding AllocatedAmount}" HeaderCellStyle="{StaticResource GridViewHeaderCellStyle}"/>  
                <telerik:GridViewDataColumn IsFilterable="False" Header="Available Amount" DataMemberBinding="{Binding AvailableAmount}" HeaderCellStyle="{StaticResource GridViewHeaderCellStyle}"/>  
                <telerik:GridViewDataColumn IsFilterable="False" Header="Receipt Effective Date" DataMemberBinding="{Binding ReceiptEffectiveDate}" HeaderCellStyle="{StaticResource GridViewHeaderCellStyle}"/>  
                <telerik:GridViewComboBoxColumn IsFilterable="False" UniqueName="ReceiptApplication" Header="Receipt Application" DataMemberBinding="{Binding ReceiptApplication}" /> 
            </telerik:RadGridView.Columns> 
        </telerik:RadGridView> 
    </Grid> 
</Window> 
 
Stefan Dobrev
Telerik team
 answered on 07 Jan 2010
6 answers
263 views

Hello,

I have a Filter Row in my GridView's header. The normal behaviour of filter is to hide the unmatching rows.
But my requirement is to highlight the matching rows and unmatched rows will still be shown. I am using the following function to do that. I am trying to set the IsSelected Property of the matching records to true, which i hoped will highlight the row. But it is not doing that. Please help.

 public void ApplySelect(object sender)  
        {  
            try  
            {  
                var senderElement = sender as FrameworkElement;  
                FilterRowDescriptor newDescriptor = new FilterRowDescriptor();  
                newDescriptor.LogicalOperator = FilterCompositionLogicalOperator.And;                  
                int idx=0;  
                foreach (MainPage.BuyHeadView bhRow in this.grid.Items)  
                {  
                    TextBox txt = senderElement as TextBox;  
                    if (bhRow.CampaignName.StartsWith(txt.Text.Trim()))  
                    {  
                        this.grid.Records[idx].IsSelected = true;  
                    }  
                    idx++;                      
                }  
                  
                //headerRow.ParentGrid.FilterDescriptors.Remove(headerRow.ParentGrid.FilterDescriptors.Where(fd => fd is FilterRowDescriptor).FirstOrDefault());  
                //headerRow.ParentGrid.FilterDescriptors.Add(newDescriptor);  
            }  
            catch  
            {  
            }  
        } 
Vishnu Ram Kumar
Top achievements
Rank 1
 answered on 07 Jan 2010
1 answer
64 views
Hello
I want to split the Colums in the gridview to 2 parts, that one is fixed and the other is horizenltal scroled

how can i control those attribute  by code in xaml or c#


1 color
2 Start position
Milan
Telerik team
 answered on 07 Jan 2010
3 answers
326 views
Hi,
I'm trying to create a new ControlTemplate for styling the GroupFooterRow.
I've used Reflector to extract the ControlTemplate GridViewGroupFooterRow from the Office Black Theme.
Whilst it looks okay initially, it seems to break down when a user updates a value, or sort a column, and the entire row dissapears underneath the GridViewGroupRow.  (Both intial look and the corrupted look are in the attached images).

Several conditions have to be met for this issue to appear.
A column has be grouped (can't see the footer otherwise).
And all Coumns have to be narrower than the view point.  (ie, no horizontal scroll bar should be visible).

Obviously something is not working right, and I've known that reflector doesn't always get all the template setters.  I was wondering if I could get the original source ControlTemplates for both the GridViewGroupRow and the GridViewGroupFooterRow?

Regards.
Kalin Milanov
Telerik team
 answered on 07 Jan 2010
2 answers
134 views
Hi, I am dealing with a difficult issue, I need to manipulate thousands of rows into rad gridview control and also have accurate sorting support in the same time, the user can chage the sorting criteria after all cells within the gridview, I cannot bring all rows from a single shoot as the data package size that must be sent through the network can exceed 5 Mb and I don't want the user to be waiting a couple of minutes until all data is loaded into the grid, I would prefer to initially add the first chunk of data which will populate the first page sorted after a predefined criteria, then if the sort criteria is changed or the page is changed I can again add the correct chunk of data to be displayed by calling a method with sorting criteria and page info parameters, this is more like a custom algorithm that I though of but, is there some built in functionality that can help me acomplish this sort of operations more stylish and more adequate if I can say so, or why not more quikly? Does rad gridview have some hidden support for this type of issues?

Many thanks!

Vladu Bogdan
Top achievements
Rank 1
 answered on 07 Jan 2010
2 answers
81 views
Hi Telerik Team,

I'm binding an hierarchical GridView with both grid's data load mode set to asynchronous. The Grouping functionality in the Parent Grid works without any issues where as the child grid hangs for few minutes and closes the application. When I removed the "DataLoadMode= Asynchrous" from the child grid view properties, the grouping function works fine on all the available columns. Can you please let me know what is the issue?

FYI: Its a WPF application.

thanks and regards...
NK
HAPPY NEW YEAR 2010
yenkay
Top achievements
Rank 2
 answered on 07 Jan 2010
3 answers
348 views
Hey,

I had a pre-sales question about RadMenu.  We have a need for a menu that overflows like the standard WPF toolbar instead of wrapping.  We have a lot of windows with menus on them, and the standard wrapping behavior causes the menu to take up too much space.  I was curious if RadMenu could overflow rather than wrapping.

Thanks,

Eric
Hristo
Telerik team
 answered on 07 Jan 2010
2 answers
134 views
Hi,
RadDocking, VS 2010, WPF, C#, non web, Q3 2009 WPF,

I can't get any raddocks to run after compiling, in VS 2010
-- I have it referenced and the xmlns: ref , I copied from sample code. Split Containers.
-- Intellisense works in my XAML for all of the raddocking classes
-- The WPF Samples work on my system, running them from the start menu,
-- The Docking panes render in VS 2010 dev/code view. 
-- I have 'Telerik.Windows.Controls.RadDocking' referenced but I don't have rad docking items in my toolbar..

 I get the following error.. when the UserControl (Which has xaml reference to the raddocking) is added as a child into a stackpanel

 Cannot find type 'Telerik.Windows.Controls.RadDocking'. The assembly used when compiling might be different than that used when loading and the type is missing.  Error at object 'System.Windows.Controls.Grid' in markup file "my xaml file"

I can give you  link to run the WPF app and see detailed stack trace.. but I can't post the link..

Thanks!


<UserControl x:Class="MyNamesSpace.Layout.DockingSample"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:telerikDocking="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Docking"
             mc:Ignorable="d"
            >
    <Grid>
        <telerikDocking:RadDocking>
            <telerikDocking:RadDocking.DocumentHost>

                <telerikDocking:RadSplitContainer>
                    <telerikDocking:RadPaneGroup>
                        <telerikDocking:RadDocumentPane Header="Document 1" Title="Document 1" />
                    </telerikDocking:RadPaneGroup>
                </telerikDocking:RadSplitContainer>

            </telerikDocking:RadDocking.DocumentHost>

            <telerikDocking:RadSplitContainer Orientation="Vertical" InitialPosition="DockedLeft">
                <telerikDocking:RadPaneGroup telerikDocking:ProportionalStackPanel.RelativeSize="200, 300">
                    <telerikDocking:RadPane Header="Pane Left 1" Content="Pane Left 1" />
                </telerikDocking:RadPaneGroup>
                <telerikDocking:RadPaneGroup telerikDocking:ProportionalStackPanel.RelativeSize="200, 100">
                    <telerikDocking:RadPane Header="Pane Left 2" Content="Pane Left 2" />
                </telerikDocking:RadPaneGroup>
                <telerikDocking:RadPaneGroup>
                    <telerikDocking:RadPane Header="Pane Left 3" Content="Pane Left 3" />
                </telerikDocking:RadPaneGroup>
            </telerikDocking:RadSplitContainer>

            <telerikDocking:RadSplitContainer Orientation="Horizontal" InitialPosition="DockedRight">
                <telerikDocking:RadPaneGroup telerikDocking:ProportionalStackPanel.RelativeSize="150, 200">
                    <telerikDocking:RadPane Header="Pane Right 1" Content="Pane Right 1" />
                </telerikDocking:RadPaneGroup>
                <telerikDocking:RadPaneGroup telerikDocking:ProportionalStackPanel.RelativeSize="250, 200">
                    <telerikDocking:RadPane Header="Pane Right 2" Content="Pane Right 2"  />
                </telerikDocking:RadPaneGroup>
            </telerikDocking:RadSplitContainer>

            <telerikDocking:RadSplitContainer Orientation="Horizontal" InitialPosition="DockedBottom">
                <telerikDocking:RadPaneGroup telerikDocking:ProportionalStackPanel.RelativeSize="100, 200">
                    <telerikDocking:RadPane Header="Pane Bottom 1" Content="Pane Bottom 1" />
                </telerikDocking:RadPaneGroup>
                <telerikDocking:RadPaneGroup telerikDocking:ProportionalStackPanel.RelativeSize="300, 200">
                    <telerikDocking:RadPane Header="Pane Bottom 2" Content="Pane Bottom 2" />
                </telerikDocking:RadPaneGroup>
            </telerikDocking:RadSplitContainer>

        </telerikDocking:RadDocking>
    </Grid>
</UserControl>




 

 

 

 

 

 

 


TheLostLeaf
Top achievements
Rank 2
 answered on 06 Jan 2010
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?