Telerik Forums
UI for WPF Forum
4 answers
70 views
Guys, I notice that the navigation menu for the pane is not working as intended if there are 2 panes with the same name. They will appear in the menu as separate item but clicking on all of them will just focus/activate the first pane. For example, you have panes with header "A", "B","C", "A". They appear correctly in the menu but the A's focus are linked only to the first pane. How do I go about this?
Twistur
Top achievements
Rank 1
 answered on 08 Jul 2011
1 answer
82 views
Hi,
my ItemSource contains an ObservableCollection of Players, (taken from the GridViewComboBoxColumn-ChangeDataContext.zip)
where Player has an extra property, a class named CombinedID. It is defined as
public partial class CombinedID
          : INotifyPropertyChanged
          , IEquatable<CombinedId>
          , IComparable<CombinedId>
          , IEqualityComparer<CombinedId>
{
    private int DbIdField;
    private Guid GuidField;
 
    public CombinedID(int i, Guid guid){
        DbId = i;
        Guid = guid;
    }
 
    public int DbId {
        get {   return this.DbIdField; }
        set {
            if ((this.DbIdField.Equals(value) != true)) {
                this.DbIdField = value;
                this.RaisePropertyChanged("DbId");
            }
        }
    }
 
    public System.Guid Guid {
        get { return this.GuidField; }
        set {
            if ((this.GuidField.Equals(value) != true)) {
                this.GuidField = value;
                this.RaisePropertyChanged("Guid");
            }
        }
    }
 
    public event PropertyChangedEventHandler PropertyChanged;
    protected void RaisePropertyChanged(string propertyName) {
        PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
        if ((propertyChanged != null)) {
            propertyChanged(this, new PropertyChangedEventArgs(propertyName));
        }
    }
 
    public override string ToString() {
        return DbId.ToString();
    }
 
    public bool Equals(CombinedID other) { // for IEquitable<T>
        if (other == null) return false;
        return this.DbId == other.DbId;
    }
    public bool Equals(CombinedID a, CombinedID b) { // for IEqualityComparer<T>
        if(a != null && b != null)
            return a.DbId == b.DbId;
        if (a == null && b == null) return true;
        return false;
    }
     
    public int CompareTo(CombinedID other) { // for IComparable<T>
        if (other == null) return 1;
        return this.DbId.CompareTo(other.DbId);
    }
 
    public override int GetHashCode()   { // for IEquitable<T>
        return DbId.GetHashCode() ^ Guid.GetHashCode();
    }
 
    public int GetHashCode(CombinedID a)     { // for IEqualityComparer<T>
        return a.GetHashCode();
    }
}

So, Player has the following properties (excerpt):
  • public int SortID
  • public string Name
  • public CombinedID ID

Unfortunately, despite all the implemented interfaces, the DataGrid column containing this CombinedId refuses sorting. It just does nothing.
The XAML code for the extra column is
<telerik:GridViewDataColumn DataMemberBinding="{Binding ID}"/>
and I have tried SortMemberPath="DbId" and SortMemberPath="ID.DbId"
but nothing seems to work.
Can you please give me a hint why this column cannot be sorted?
hermann
Top achievements
Rank 1
 answered on 08 Jul 2011
2 answers
120 views
I'm trying to bind RadGridView SelectedItems property to a property on my ViewModel using the custom Behavior approach mentioned in the Vladimir Enchev's blog post and it works fine.
However, when gridview contains several thousands items and I try to select them all, the time necessary to select all items is tens of seconds, sometimes even minutes. This is not unacceptable by ours customers.
Can you help me solve this problem?

Thanks

David Renza

PS: I've prepared sample project to show this behavior but there is no way to post it.
David Renza
Top achievements
Rank 1
 answered on 08 Jul 2011
2 answers
90 views
Hi Telerik,

I have implemented something similar to the Tree to Grid Drag that you have posted as an example on the RadControls for WPF page in my own project.  I need to be able to resize the Column Widths on the RadGridView, but I can no longer do that once I begin to write my own Drag And Drop handlers for the RadGridView.  Your example does the same thing that mine does.  It doesn't allow you to change the Column Widths or re-order the columns in the middle portion labeled "Order".

Please let me know if you have found a solution to this problem.

Thanks,
Scott
Scott
Top achievements
Rank 1
 answered on 08 Jul 2011
1 answer
176 views
Hi,
i have a - maybe - stupid question. My Application uses Entity Framework 4.1 with DBContext. In the MainWindow is a RadGridView bound to a QueryableCollectionView (Customers) to display Data.

<telerik:RadGridView x:Name="uxCustomerGrid" ItemsSource="{Binding Customers,BindsDirectlyToSource=True}" IsReadOnly="True" EnableColumnVirtualization="True" EnableRowVirtualization="true" SelectionMode="Extended" RowIndicatorVisibility="Collapsed" AutoGenerateColumns="False" CanUserDeleteRows="False" CanUserInsertRows="False" GridLinesVisibility="None" IsFilteringAllowed="False" ShowGroupPanel="False" RowStyle="{DynamicResource CustomerRowStyle}">
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn DataMemberBinding="{Binding Kundennummer}" Header="Nummer"/>
<telerik:GridViewDataColumn DataMemberBinding="{Binding Kundenname}" Header="Name" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding Ort.Bezeichnung}" Header="Ort" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding Ort.PLZ}" Header="PLZ" IsVisible="False" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding Einwohneranzahl}" Header="Einwohner" IsVisible="False" />
</telerik:RadGridView.Columns>
</telerik:RadGridView>

        private QueryableCollectionView _customers;
 
        public QueryableCollectionView Customers
        {
            get { return _customers; }
            set
            {
                if (value != _customers)
                {
                    _customers = value;
                    OnPropertyChanged("Customers");
                }
            }
        }
 
....
 
this._context = new MiexUnitOfWork();
_context.Kunde.ToList();
this.Customers = new QueryableCollectionView(_context.Kunde.Local);

The user changes a single row of the grid via a ModalWindow. The Window has it's own dbcontext. After the user has closed the ModalWindow (and the changes are saved to the database) i wan't to refresh the grid in the parent's window.
I tried the following:
_context.Entry(_context.Kunde.Find(Key)).Reload()

This code forces the dbcontext to update the changed entry. But the changes are not reflected in the grid. I tried to call the Refresh() method of the QueryableCollectionView, but the grid still show's the old values.

How can i force the grid to show the changes made in the dbcontext?
Mike
Top achievements
Rank 2
 answered on 08 Jul 2011
4 answers
335 views
Hello,

I have in ribbon a RadRibbonDropDownButton which contains a usercontrol with tabcontrol and RadColorSelector. (to program predefined and personnalized color control).
Some where else i use a RadDropdownButton which contains the same color control.

I see some difference between the both :
   - in RadRibbonDropDownButton, when i choose a color on the colorselector, it close the dropdowncontent, not for RadDropdownButton.
   - in RadRibbonDropDownButton, when i click on tabitem, it will close the dropdowncontent until i add this code . For RadDropdownButton, even with the same code it always close the dropdowncontent.
<TabControl x:Name="tabcontrol" MouseDown="MousedownHandled" SelectionChanged="test">
private void MousedownHandled(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
      if (tabcontrol.SelectedIndex == 1) e.Handled = true;
}
 
private void test(object sender, SelectionChangedEventArgs e)
{
       if (e.OriginalSource == tabcontrol)   e.Handled = true;
}

the function "test" is called elsewhere i click on the control (if i click on a color in ColorSelector also ?!?)


Well, could you explain me
  • the difference of the both components
  • and also when should close the dropdowncontent, and how prevent from closing ?

Thanks
Aurore
I use 2011.1.419.35 dll
Petar Mladenov
Telerik team
 answered on 08 Jul 2011
6 answers
153 views
I think it’s very courageous of you to start with a “msWord-alike” RichTextBox.
You came with a very fine “word” example in the Demo with a lot of functionality. Great!
But of course, starting with this you can expect more questions and more wishes. We are never satisfied!  8-)
Questions like this:
- What about merging? 
- What about Header and Footer?
Iva Toteva
Telerik team
 answered on 08 Jul 2011
3 answers
146 views
My data items look like this:
Public Class ExportData
    Public Property MyDate As Date
    Public Property ItemType As String
 End Class
Now I'd like to get a stacked bar chart that groups the items by month and stacks the count of the different item types. For each month I would have a stacked bar that says for example  "Jan 11 = 3 items of type A, 4 items of type B, 5 items of type C".
Is this possible?

I tried to with the following XAML code to configure the chart:
<telerik:RadChart.SeriesMappings>
    <telerik:SeriesMapping x:Name="DataMapping" LegendLabel="Sales">
 
        <telerik:SeriesMapping.SeriesDefinition>
            <telerik:StackedBarSeriesDefinition ShowItemLabels="True" ShowItemToolTips="True" ItemToolTipFormat="#Y">
                <telerik:StackedBarSeriesDefinition.InteractivitySettings>
                    <telerik:InteractivitySettings HoverScope="Series" SelectionScope="None" />
                </telerik:StackedBarSeriesDefinition.InteractivitySettings>
            </telerik:StackedBarSeriesDefinition>
        </telerik:SeriesMapping.SeriesDefinition>
 
        <telerik:SeriesMapping.ItemMappings>
            <telerik:ItemMapping FieldName="ItemType" DataPointMember="YValue" AggregateFunction="Count" />
            <telerik:ItemMapping FieldName="MyDate" DataPointMember="XCategory" />
        </telerik:SeriesMapping.ItemMappings>
 
        <telerik:SeriesMapping.GroupingSettings>
            <telerik:GroupingSettings StackGroupFieldName="ItemType" ShouldFlattenSeries="True">
                <telerik:GroupingSettings.GroupDescriptors>
                    <telerik:ChartYearGroupDescriptor />
                    <telerik:ChartMonthGroupDescriptor />
                    <telerik:ChartGroupDescriptor Member="ItemType" />
                </telerik:GroupingSettings.GroupDescriptors>
            </telerik:GroupingSettings>
        </telerik:SeriesMapping.GroupingSettings>
 
    </telerik:SeriesMapping>
</telerik:RadChart.SeriesMappings>
Thanks for any ideas...
Nikolay
Telerik team
 answered on 08 Jul 2011
1 answer
88 views
Hi !

I have the ScheduleView with a WeekViewDefinition.

My Problem is, the Appointment with is about 98% of the width of a slot in the week.

So if i have 2 appointments e.g. one one monday and one one tuesday at the same time, the space between
the two appointments is very small and it will be hard to select the slot on eg, monday on the same time.

See attached screenshot.

Is there any chance to recude the width of the appointments to eg.: just 70% of the width of a slot for a day ?
Konstantina
Telerik team
 answered on 08 Jul 2011
5 answers
235 views
Hi

I would be great if someone can post an sample project, of Add, Edit, Delete Dataform,using the Entity Frame work, I have all sort of trouble getting it to work

cheers

Jason
Milan
Telerik team
 answered on 08 Jul 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?