Telerik Forums
UI for WPF Forum
4 answers
100 views
Hi There

I have a menu which contains a gridview, I cant seem to drag column headers to the group header though when in that menu. The menu just dissappears. Code for the grid below:

<telerikGridView:RadGridView x:Name="radGridAssets" Grid.Column="0" Grid.Row="0"
                                             Margin="0" ShowGroupPanel="True" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
                                             ShowInsertRow="False" RowIndicatorVisibility="Collapsed"
                                             AutoGenerateColumns="False"
                                             ItemsSource="{Binding FullAssetList}">
 
            <!--<telerikGridView:RadGridView.GroupDescriptors>
                <telerikData:GroupDescriptor Member="SiteName" />
            </telerikGridView:RadGridView.GroupDescriptors>-->
            <telerikGridView:RadGridView.SortDescriptors>
                <telerikData:SortDescriptor Member="SiteId" SortDirection="Ascending" />
                <telerikData:SortDescriptor Member="OrderByProcessType" SortDirection="Ascending" />
            </telerikGridView:RadGridView.SortDescriptors>
            <telerikGridView:RadGridView.Columns>
                <telerikGridView:GridViewDataColumn Header="" Width="Auto">
                    <telerikGridView:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <CheckBox x:Name="chkSelectedAsset" IsChecked="{Binding IsSelected, Mode=TwoWay}"
                                      Unchecked="chkSelectedAsset_Unchecked" Checked="chkSelectedAsset_Checked" />
                        </DataTemplate>
                    </telerikGridView:GridViewDataColumn.CellTemplate>
                </telerikGridView:GridViewDataColumn>
                <telerikGridView:GridViewDataColumn Header="Site" DataMemberBinding="{Binding SiteName}" IsReadOnly="True">
                    <telerikGridView:GridViewDataColumn.GroupHeaderTemplate>
                        <DataTemplate>
                            <StackPanel Orientation="Horizontal" >
                                <TextBlock Text="{Binding Group.Key}" />
                                <Button x:Name="buttAssetGridSelectAll" Margin="5,0,0,0" Content="All" FontSize="10" Tag="{Binding Group}" Click="buttAssetGridSelectAll_Click"  />
                                <Button x:Name="buttAssetGridSelectNone" Content="None" FontSize="10" Tag="{Binding Group}" Click="buttAssetGridSelectNone_Click" />
                            </StackPanel>
                        </DataTemplate>
                    </telerikGridView:GridViewDataColumn.GroupHeaderTemplate>
                </telerikGridView:GridViewDataColumn>
                <telerikGridView:GridViewDataColumn Header="Asset Name" DataMemberBinding="{Binding AssetName}" />
                <telerikGridView:GridViewDataColumn Header="Process" DataMemberBinding="{Binding ProcessType}" />
                <telerikGridView:GridViewDataColumn Header="SiteId" DataMemberBinding="{Binding SiteId}" IsReadOnly="True" IsVisible="False" />
                <telerikGridView:GridViewDataColumn Header="OrderBy" DataMemberBinding="{Binding OrderByProcessType}" IsReadOnly="True" IsVisible="False" />
            </telerikGridView:RadGridView.Columns>
        </telerikGridView:RadGridView>
Tsvyatko
Telerik team
 answered on 02 Feb 2011
1 answer
95 views
Hello everybody,

Is is possible to drag and drop PinPoints in the map?

Thank you,
Esther
Andrey
Telerik team
 answered on 02 Feb 2011
4 answers
155 views
Hello,

in my scenario i try to visualize the variance of a production cyle within a radgridview. For this i want to show a warning/error range.

<telerik:RadHorizontalBulletGraph Width="150" Height="20"
                                  QuantitativeScaleVisibility="Collapsed"
                                  FlowDirection="LeftToRight"
                                  FeaturedMeasure="{Binding Input0TimeLast}"
                                  ComparativeMeasure="{Binding Auftrag.ZyklusIstSoll}">
     
    <telerik:RadHorizontalBulletGraph.QualitativeRanges>
        <telerik:QualitativeRange Brush="Red" Value="{Binding ZyklusErrorBound}" />
        <telerik:QualitativeRange Brush="Yellow" Value="{Binding ZyklusWarningBound}" />
        <telerik:QualitativeRange Brush="Green" Value="{Binding ZyklusOkBound" />
    </telerik:RadHorizontalBulletGraph.QualitativeRanges>
</telerik:RadHorizontalBulletGraph>

public int ZyklusErrorBound
{
    get
    {
        var x = this.Auftrag.ZyklusIstSoll - this.Auftrag.ZyklusIstToleranz;
         
        return x;
    }
}
public int ZyklusWarningBound
{
    get
    {
        var x = this.Auftrag.ZyklusIstSoll - (this.Auftrag.ZyklusIstToleranz / 2);
         
        return x;
    }
}


When i bind the three QualitativeRange`s i get a exception "Sequence contains no elements". If i set instead of ZyklusOkBound a fixed value for example, no exceptions is thrown. But the two other values are not called from my Itemssource (i´ve checked that by setting a breakpoint on my getters). Instead of a message shows up in my console:

System.Windows.Data Error: 2 : Cannot find govening FrameworkElement or FrameworkContentElement for target element. BindingExpression:Path=ZyklusWarningBound; DataItem=null; target element is 'QualitativeRange' (HashCode=7579691); target property is 'Value' (type 'Double')
System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:Path=ZyklusErrorBound; DataItem=null; target element is 'QualitativeRange' (HashCode=7579691); target property is 'Value' (type 'Double')

What is absolutely remarkable, if i bind ZyklusErrorBound or ZyklusWarningBound to FeaturedMeasure the value is retrieved..

Thanks in advance for your help.
Yavor
Telerik team
 answered on 02 Feb 2011
2 answers
169 views
Hi,
I'm testing RadMap. I build a window with a radmap and a listbox with locations (based on your samples).
After a few changes in the listbox, the window freezes. I must then stop the process from visual studio.
Bassically, i had a code like this:
private void listBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
       {
           ListBox lista = sender as ListBox;
           if (lista.SelectedItem == null) return;
           destino = (Location)lista.SelectedItem;
           this.radMap1.Center = destino;
       }
 
I tried in debug and in release modes.
I tried with both providers, bing and open.
If I use a 'zoom effect' like in your samples (changing the last line to "ZoomOut();") the freezes occurs after 5-10 changes in the listbox. If I use the showed code, the freezes occurs after 10-50 changes.

Thanks in advance, and excuse me if my english is not good.

Andrey
Telerik team
 answered on 02 Feb 2011
1 answer
72 views
we used to have

ShowsConfirmationWindowOnDelete

 property in RadScheduler, what is the counterpart of that property in ScheduleView? I noticed that Deleting events gets fired AFTER confirmation dialog is shown, so I cannot override it by e.Cancel=true...

Please advise
Miroslav Nedyalkov
Telerik team
 answered on 02 Feb 2011
1 answer
72 views
Hi,

We are using a GridView, and I am having difficulty getting the column widths to work how I think they should.  It seems like it should be simple.

I am reading the widths from a config file as a double and calling a converter, and want to save them out there when the app closes.  This is pretty simple.  The issue is that if I bind the column width to the config setting, it gets overwritten as soon as resize happens (but I do get the calls to resize), I believe because ColumnWidth  is set to sizeToHeader for the grid. If I put the binding on the header, I don't seem to get a notification (my converter isn't called) when the column is resized.  I am simply looking for the correct method of setting this up so that when the column is resized, I get notified, and my headers and columns stay in sync.  Let me know if a code sample would help.

Thanks,

Anthony.
Vlad
Telerik team
 answered on 02 Feb 2011
1 answer
204 views
Hi,
I'm using a RadTreeView, with the default theme, but now as per the requirement i need to change the style, i.e Mouse over color, selected color, etc. So for that i need to define a custom style for RadTreeViewItem.

I tried alot to get to the solution,but failed.

So, please provide the working custom style for RadTreeViewItem in WPF which I can bind to ItemContainerStyle Property of RadTreeview.

Thanks.
Petar Mladenov
Telerik team
 answered on 01 Feb 2011
1 answer
65 views
There is 10 pages in the book. Is it possible to hide bookitems (for example 3rd and 4th items)? I set visibility to collapsed/hidden, but I can turn the page from 2nd page to 3rd. Thank you!
Tina Stancheva
Telerik team
 answered on 01 Feb 2011
3 answers
194 views

I've got a ribbon with the standard Copy, Paste, Cut buttons on them. .

<telerik:RadRibbonButton Text="Cut" Size="Medium" />  
 


As soon as I assign a command the buttons disable. I would have expected it to simply use the built-in Cut command.  

<telerik:RadRibbonButton Text="Cut" Size="Medium" Command="ApplicationCommands.Cut"/> 

What I get however is a disabled Cut button. What am I missing?

Tina Stancheva
Telerik team
 answered on 01 Feb 2011
4 answers
121 views
I am new to wpf and have most of my experience in programing windows forms.  I am looking for some help achieving a solution.  I have a main control panel window i have created for my company.  What i am looking for is to be able to click on a button on this UI and have a new window slide out from behind it containing a new window that have created with different controls on it.  Both these files are their own xaml files.  
George
Telerik team
 answered on 01 Feb 2011
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?