Telerik Forums
UI for WPF Forum
4 answers
90 views
Hi Guys,

I used telerik wpf gridview to bind a collection source, the every data item have a foreign key related other tables, so I use the GridViewComboBoxColumn to show the relation and make user can change it . below is my code
<telerik:GridViewComboBoxColumn Header="{common:Translate Group}"
UniqueName="ColourGroupingID"
DisplayMemberPath="Description"
ItemsSource="{Binding ColorEntityCollection}"
SelectedValueMemberPath="ColourGroupingID" DataMemberBinding="{Binding ColourGroupingFk}"
>
</telerik:GridViewComboBoxColumn>
In above code, you can see ColorEntityCollection have two properties used for valuePath and displayPath of combobox, dataItem's ColourGroupingFk is foreign key. Everything is ok, but the filtering, the gridview unexpectedly filtered by ColourGroupingFk  , not expected DisplayMemberPath : Description . Please see attachment.

How can I do this? PS: I also set Gridview's FilteringMode = FilteringMode.FilterRow for using a header filter row.  I read many threads on forum, many thread recommand :
<telerik:GridViewComboBoxColumn.FilteringControl>
                    <Controls1:ComboColumnFilteringControl />
                </telerik:GridViewComboBoxColumn.FilteringControl>

But our team don't need popup filter window, only row filter. Please help me.. Thanks very much!






Deng
Top achievements
Rank 1
 answered on 15 Oct 2012
0 answers
120 views
Telerik: 2012.2.912.40 (RadControls for WPF Q2 2012 SP2)
OS: Windows 7

Problem: I have a WPF Class Library project, after dragging a DataPager to my UserControl, I get "Could not load file or assembly 'Telerik.Windows.Controls.Data, PublicKeyToken=5803cfa389c90ce7' or one of its dependencies. The system cannot find the file specified."

But if I make my project's output type to Windows Application, my project runs fine.

Is there an issue with DataPager and wpf class library projects?

Please help.

Thanks,
Mark
Mark
Top achievements
Rank 1
 asked on 15 Oct 2012
1 answer
78 views
Hello
i have some problem about gridvieuw
first :
how to make a columns to Unselectable stat?,i want to prevent the user to clicking on some columns
the second
to solve the first problem I use this method :
the main objectf is to click on specefic cells and capture the value to use in a sql query,so i need to capture the adequate value for the query works.
here is the code :
void GridViewKPI_MouseDown(object sender, MouseButtonEventArgs e)
        {
            RadContextMenu radContextMenu = new RadContextMenu();
 
            if (GridViewKPI.CurrentCell.Column.UniqueName == "Cell ID")
            {
                TBox_CellID.Text = GridViewKPI.CurrentCell.Value.ToString();
                 
                RadMenuItem copyItem = new RadMenuItem();
                copyItem.Header = "Show In chart";
                radContextMenu.Items.Add(copyItem);
                RadMenuItem pasteItem = new RadMenuItem();
                pasteItem.Header = "Show in Ho Stat";
                radContextMenu.Items.Add(pasteItem);
                RadMenuItem cutItem = new RadMenuItem();
                cutItem.Header = "Show in Map";
                radContextMenu.Items.Add(cutItem);
                RadContextMenu.SetContextMenu(this.GridViewKPI, radContextMenu);
 
            }
            //else radContextMenu.Items.Remove(copyItem);
        }
The code work fine ,the first time when i click in other cells nothing happens,and when i click in a  specefic cells (Cell ID in my case) the contextmenu appears normally and this is the main objectif,but after this when i reclick in the other cell the contextmenu appears also,and this is my problem,the contextmenu must appears only when i click in a specific columns.
so,how to prevent this to happen?
thanks a lot
Amine
Top achievements
Rank 1
 answered on 14 Oct 2012
4 answers
624 views
hi!!!

how can i looping throught the collection  of items (or throught comboboxitem ) of my combobox  in code behind??

here is my code

 

 

<telerik:RadComboBox IsEditable="True" IsTextSearchEnabled="True">

 

 

 

<telerik:RadComboBoxItem>

 

item1

 

 

</telerik:RadComboBoxItem>

 

 

 

<telerik:RadComboBoxItem>

 

item2

 

 

</telerik:RadComboBoxItem>

 

 

 

<telerik:RadComboBoxItem>

 

item3

 

 

</telerik:RadComboBoxItem>

 

 

 

 

 

 

 

</telerik:RadComboBox>

thanks for your help

Oscar Zapata

 

Boyan
Telerik team
 answered on 14 Oct 2012
2 answers
96 views
Hi!
I have made a customized appointment view selector by copying the template in Expression and specified the new to be used by the Control:

AppointmentStyleSelector="{DynamicResource ScheduleViewStyleSelector1}"

Everything works fine and all appointments are displayed using the new selector.
But now, double clicking an appointment doesn't work anymore. The Edit appointment dialog is not displayed.

Why does it behave like this?
Lennart Bauer
Top achievements
Rank 1
 answered on 13 Oct 2012
1 answer
63 views
I implemented undo in my application, but when a cell is selected, pressing control+z starts editing the cell. Does someone know what is the best way to prevent this from happening?

Also, when in cell edit mode, control+z is not passed along, but performs undo within the textbox. Does anyone know the best way to pass on the control+z keypresses?
Erik
Top achievements
Rank 1
 answered on 13 Oct 2012
0 answers
61 views
Hello Telerik
I have a WPF application with UserControls. One UserControl contains a RdGridView (DataView/DataViewModel). The application can switch between some several UserControls
like this:

xaml:

<Window.Resources>
    <DataTemplate DataType="{x:Type local.viewmodels:WellcomeViewModel}">
        <local.views:WellcomeView />
    </DataTemplate>
    <DataTemplate DataType="{x:Type local.viewmodels:DataViewModel}">
        <local.views:CurrentDataView />
    </DataTemplate>
    â€¦
</Window.Resources>

 MainWindowViewModel C#:

CurrentPageViewModel = PageViewModels.Find(vm => vm.ToString() == "WPFPageApp.ViewModels.CurrentDataViewModel");

The RadGridView is bound to a QueryableEntityCollectionView property  (Suppliersof the DataViewModel using the EntityFramework. 
On one button in the MainWindowViewMode I set a Filter before switching to the DataView via MVVM Light messaging in the DataViewModel:

DateTime toDay = DateTime.Now.Date;
Suppliers.FilterDescriptors.Add(new FilterDescriptor("InsertDate", FilterOperator.IsGreaterThanOrEqualTo, toDay));

On another button (in the MainWindowViewMode ) I change the sort order before switching to the DataView:

Suppliers.SortDescriptors.Add(new SortDescriptor()
{
    Member = "Id",
    SortDirection = System.ComponentModel.ListSortDirection.Descending
});

With EventToCommand from MVVM Light I call a function RowLoaded in the DataViewModel to format the cells. 
So far so good.
The problem is that sometimes the RowLoaded even is not called, when I switch from one UserControl to the UserControl containing the RadGridView. It seems that something happened to the GridView when the UserControl is switching to another UserControl.

I hope I have explained it well enough to understand the architecture.

Thank you in advance Uwe
Uwe
Top achievements
Rank 1
 asked on 12 Oct 2012
14 answers
260 views
while adding camera extension in chart i get an error as "Object refrerence not set to an instance of object". ...even when i copied and paste your sample of bar chart in 3d galllery of wpf...first of all seriesextension comes undefined..and when i comment that code to run the project..i get an error in camera extension as "object reference....."..
Please help me out with this...
 Private Sub UserControl_Loaded(ByVal sender As ObjectByVal e As RoutedEventArgs)
            Dim cameraExtension As New CameraExtension()
            RadChart1.DefaultView.ChartArea.Extensions.Add(cameraExtension)  'getting error over here...
        End Sub


 Private Sub FillSampleChartData()
            Dim d As New Bar3DSeriesDefinition()
            d.ItemStyle = DirectCast(Me.FindResource("MyStyle"), Style)
            RadChart1.DefaultSeriesDefinition = d

            ' RadChart1.ItemsSource = SeriesExtensions.GetUserData(5, 0)  'commented code for debugging
        End Sub


Thanks,
kapil Garg
Petar Kirov
Telerik team
 answered on 12 Oct 2012
2 answers
108 views
Hi!

I have followed the example in the documentation for customizing the appointment style.
This works.However, with the new appointment style, I cannot longer double click on the appointment!
Nothing happens. If I remove the style, the editor appears when I double click on an appointment.

With the style applied, I can still doubleclick on an empty slot. The Editor appears as excpeted.

How do I solve this?

I'm using VS2010 and Expression blend 4.

Regards,
Lennart
Kshamesh
Top achievements
Rank 1
 answered on 12 Oct 2012
3 answers
529 views
Hi,

we use VS2008 and Telerik V2012.02.912.35 and I would like to know if it's possible to remove all animation in one shot!!! Actually we have an application with multiple DLL which contain RadWindow and others Telerik controls...

As an example, in my solution, I have a docking project and by removing the animation of the main window of my project reduce the display time by more than 50%.

Thank's
Boyan
Telerik team
 answered on 12 Oct 2012
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?