Telerik Forums
UI for WPF Forum
2 answers
158 views
Hi, 

We have implemented searching mechanism for RadGridView. It works fine when all the columns in Grid are of String type. 
But in one of the grid I have Int columns.

I figured out the problem. Currently my FilterOperator is "FilterOperator.Contains" and then it throws error "The method or operation is not implemented." for int column. If I changed FilterOperator to IsEqualTo it works great. But why can't I have FilterOperator.Contains for Int as well? I wish if it could do that.

Regards
Sanket
christine
Top achievements
Rank 1
 answered on 28 Sep 2011
2 answers
152 views
Hi all,

This is probably a very simple WPF binding question (it strikes me that it ought to be!) but I can't find an answer to it so am asking here.

I have a RadDataGrid bound to a collection of business objects (projects, to be specific).
Each project has a lead contact and a customer.
I am displaying customers in a GridViewComboBoxColumn, and contacts in another combo box column.

Currently, I'm data binding Customer combobox to a collection of customers, and the Contacts one to a collection of Contacts, like this:

<telerik:GridViewComboBoxColumn DataMemberBinding="{Binding CustomerId}" UniqueName="Customer" Header="Customer" DisplayMemberPath="CustomerName" SelectedValueMemberPath="CustomerId"></telerik:GridViewComboBoxColumn>

and in the code behind:

((GridViewComboBoxColumn)radarGridView.Columns["Customer"]).ItemsSource = customers.Values;

it's working, in that the lead contact and customer for that project are displayed in the grid - but the dropdown list for Contacts contains *all* contacts and I really want to display only Contacts which belong to the selected customer.


I know I could do this by overriding a databinding event on each row and binding the contacts column to a filtered list of contacts, but I would have to do that for every column which relates to another and I can't believe there isn't an easier way.

i.e. in effect I would like to bind the contacts combobox to something along the lines of (yes, I know this isn't valid C# :):

contacts.Where(c => c.CustomerId == <currently selected customer ID>)


What am I missing?

Kev
Kevin
Top achievements
Rank 1
 answered on 28 Sep 2011
1 answer
45 views
While coding the Backstage, the default selected tab and blank grid stay in view. Is there a way to pin-up the Backstage screen so I can see my changes dynamically as I code? I tried selecting 'Is Backstage Open' and nothing changes.
Thanks
Petar Mladenov
Telerik team
 answered on 28 Sep 2011
0 answers
86 views
{
    ...
    grid.RowIsExpandedChanged += new EventHandler<RowEventArgs>(grid_RowIsExpandedChanged);
}
 
 
void grid_RowIsExpandedChanged(object sender, RowEventArgs e)
{
    RadGridView cur = sender as RadGridView;
    IList<RadGridView> subgridlist = cur.ChildrenOfType<RadGridView>();
    for (int i = 0; i < subgridlist.Count; i++)
    {
        ...
    }          
}

Using RadGridView I wanted to edit the child-elements when the hirarchy is expanded. In my case another RadGridView. The child element is not existant when the hirarchy is opened, but it's there when I close it again. So I assume the RowIsExpandedChanged Event fired before generating the controls. Is there a way for me to access the child elements when the hirarchy has been loaded, e.g. "RowIsExpandedLoaded"?
marc
Top achievements
Rank 1
 asked on 28 Sep 2011
1 answer
140 views
Hi,

I am using Self reference grid, in that

1. How to hide (Isvisible = false) for some columns in the child grid
2. How to make the column width of parent and child as same.

Thanks,
Ramasamy
Maya
Telerik team
 answered on 28 Sep 2011
2 answers
105 views
Hello,

I have a radchart that I wish to add x series to dynamically depending on what you check off in a checkbox list.

I have a RadChart declared like this:
<telerik:RadChart x:Name="radChart" telerik:StyleManager.Theme="Metro" SeriesMappings="{Binding ChartSeriesMapping}" >
            </telerik:RadChart>

My ChartSeriesMapping is declaredl like this:
private SeriesMappingCollection _chartSeriesMapping;
public SeriesMappingCollection ChartSeriesMapping
{
    get
    {
        return _chartSeriesMapping;
    }
    set
    {
        if (_chartSeriesMapping != value)
        {
            _chartSeriesMapping = value;
            this.OnPropertyChanged("ChartSeriesMapping");
        }
    }
}

I'm adding series like this:
SeriesMapping salesAmountMapping = new SeriesMapping();
salesAmountMapping.LegendLabel = p.StoreName;
 
salesAmountMapping.ItemsSource = report.ChartData;
salesAmountMapping.SeriesDefinition = new BarSeriesDefinition();
 
salesAmountMapping.ItemMappings.Add(new ItemMapping("XValue", DataPointMember.XValue));
salesAmountMapping.ItemMappings.Add(new ItemMapping("YValue", DataPointMember.YValue));
 
report.ChartSeriesMapping.Add(salesAmountMapping);
Where ChartData is containing XValue and YValue public properties.

But the charts is always empty when I'm adding new series... How is this supposed to work? Also, how come legend Label is always set to Series 0, Series 1, etc?

Thanks in advance.
Yavor
Telerik team
 answered on 28 Sep 2011
1 answer
92 views
I use row detail in radgridview but encounter some tricky problem. Please use the code below, and click the + to show the detail row one by one, at least open one screen, then scroll the vertical scrollbar , or use mouse wheel, then if you are lucky, the sceen will tremble, unless you scroll again. To reproduce it maybe need some fortume, but i could reproduce it everytime. I am not sure if I make myself clear. How to solve this problem? Thanks.

<Window x:Class="WpfApplication1.MainWindow"
        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:telerik="http://schemas.telerik.com/2008/xaml/presentation"   
        mc:Ignorable="d"
        Title="MainWindow" d:DesignHeight="1024" d:DesignWidth="1280" MinHeight="700" MaxHeight="1024" MaxWidth="1280" SnapsToDevicePixels="True">
    <Grid>       
        <telerik:RadGridView x:Name="radGridView" AutoGenerateColumns="False" IsReadOnly="True">            
            <telerik:RadGridView.Columns>
                <telerik:GridViewToggleRowDetailsColumn/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding ID}" Header="" Width="600"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding UserID}" TextAlignment="Center"  Header="CUSIP" Width="400" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding ClientID}" TextAlignment="Center" Header="PRCMnum" Width="400" />
            </telerik:RadGridView.Columns>
 
            <telerik:RadGridView.RowDetailsTemplate>
                <DataTemplate>                    
                    <Grid x:Name="rowDetails">
                        <StackPanel Orientation="Horizontal" Margin="200,5,0,5">
                            <Label Content="ID:" Margin="0,0,5,0"/>
                            <TextBox Text="{Binding ID}"  Width="80" />                                    
                            <Label Content="UserID:" Margin="10,0,5,0"/>
                            <TextBox Text="{Binding UserID}"  Width="80" />
                            <Label Content="ClientID:" Margin="10,0,5,0"/>
                            <TextBox Text="{Binding ClientID}" Width="80" />                                    
                        </StackPanel>                        
                    </Grid>                       
                </DataTemplate>
            </telerik:RadGridView.RowDetailsTemplate>
        </telerik:RadGridView>        
    </Grid>
</Window>

using System;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Documents;
using System.Collections.ObjectModel;
 
namespace WpfApplication1
{   
    public partial class MainWindow : Window
    {
        
        public MainWindow()
        {
            InitializeComponent();          
           
            this.radGridView.ItemsSource = new ObservableCollection<AgencySpecPool>(GetSpecPoolInfoHierarchy());    
        }
 
        List<AgencySpecPool> GetSpecPoolInfoHierarchy()
        {
            List<AgencySpecPool> list = new List<AgencySpecPool>();
            for (int i = 0; i < 1000; i++)
            {
                int seed = (int)DateTime.Now.Ticks + i;
                Random rand = new Random(seed);
                list.Add(new AgencySpecPool(rand.Next(), rand.Next(), rand.Next()));
            }
            return list;
        }
    }
 
    public class AgencySpecPool
    {        
        public int ID {get;set;}
        public int UserID { getset; }
        public int ClientID { getset; }
        public AgencySpecPool(int id, int uid, int cid)
        {
            ID = id;
            UserID = uid;
            ClientID = cid;
        }
    }
}
Yordanka
Telerik team
 answered on 28 Sep 2011
1 answer
113 views
Hi,

I have a RadTabControl on my WPF form with multiple tabs (9). If I click on the "WindowState=Normal" button to shrink my form, some tabs become not visible due to the display space but the scroll buttons of my RadTabControl doesn't appear. I have to resize my form manually to get the RadTablControl scroll buttons visible.

I use VS2008 and Telerik v.2011.2.712.35

Thank's
Petar Mladenov
Telerik team
 answered on 28 Sep 2011
0 answers
83 views
Hi Support

I have two ItemPropertDefinition Which binded to two different combo box, I want to filter ItemSource of second one according to Selected Item of first Combo. is it possible  in DataFilter? how can I implement it?

Thanks in advance
Mehri
Mehri
Top achievements
Rank 1
 asked on 28 Sep 2011
1 answer
61 views
Hi,

I have a table like the below

ID   Name          Parent ID
1    Benefits        NULL
2    Enrolment     NULL
3    Health             1
4    Employee       1
5    Initial               2

and i need the output like

-Benefits
      - Health
      - Employee
- Enrolment
      - Initial

Now I am getting the hierachy correctly, but instead of showing only the parents my grid shows all the 5 rows. Any idea please.

Thanks,
Ramasamy
Ramasamy
Top achievements
Rank 1
 answered on 28 Sep 2011
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?