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

I have a problem using the
  • GridViewCheckBoxColumn
  • GridViewComboBoxColumn
When I edit data in a "GridViewDataColumn" and execute my custom "UpdateItemCommand" I have no problems and my SelectedItem displays the changes which were entered in the "GridViewDataColumn".
However the problem occurs when I edit a "GridViewCheckBoxColumn" or "GridViewComboBoxColumn". The SelectedItem does not display the changes made by these Columns.

Thank you for your help!
Martin

<my:RadGridView x:Name="RadGridView" SelectedItem="{Binding SelectedItem, Mode=TwoWay}" ItemsSource="{Binding PLC_Items}>
        <my:RadGridView.Columns>
            <my:GridViewDataColumn Header="ID" DataMemberBinding="{Binding ID}" IsReadOnly="True"/>
            <my:GridViewDataColumn Header="ItemName" DataMemberBinding="{Binding Name}" Width="*"/>
            <my:GridViewComboBoxColumn Header="Function" ItemsSource="{Binding AllFunctions}" DataMemberBinding="{Binding Function}"/>
            <my:GridViewCheckBoxColumn Header="Auto Update" DataMemberBinding="{Binding AutoUpdate, Mode=TwoWay}"/>
            <my:GridViewColumn Width="Auto">
                <my:GridViewColumn.CellTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal" Margin="2">
                            <telerik:RadButton Command="{Binding DataContext.WriteItemCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type my:RadGridView}}}"/>
                            <telerik:RadButton Command="{Binding DataContext.UpdateItemCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type my:RadGridView}}}"/>
                            <telerik:RadButton Command="{Binding DataContext.ReadItemCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type my:RadGridView}}}"/>
                            <telerik:RadButton Command="{Binding DataContext.DeleteItemCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type my:RadGridView}}}"/>
                        </StackPanel>
                    </DataTemplate>
                </my:GridViewColumn.CellTemplate>
            </my:GridViewColumn>
        </my:RadGridView.Columns>
    </my:RadGridView>


Martin
Top achievements
Rank 1
 answered on 02 Feb 2011
1 answer
175 views

Hello

When the Grid View Data Column bound to date time,

If there is string format that show only the time it looks like bug.

We need that the filtering controls display the same date once.

Looks at the attach pictures.

How to resolve this problem?

Best regards

Ehud.

Ivan Ivanov
Telerik team
 answered on 02 Feb 2011
1 answer
185 views
Hello friends,

I am trying to implement the MouseLeftButtonDown-Event for some PanelBarItems. But the Event isn't fired. Could you please help me to find out why it isn't?

<telerik:RadPanelBar ExpandMode="Multiple" VerticalAlignment="Stretch" Name="pbarMain">
    <!-- Kapazitäten -->
    <telerik:RadPanelBarItem VerticalAlignment="Stretch" IsExpanded="True">
        <telerik:RadPanelBarItem.Header>
            <StackPanel Orientation="Horizontal" Margin="5 4 5 5">
                <Image Source="Images/kapazität.ico"
                       Style="{StaticResource style_image_20x20}"/>
                <Label Content="Kapazitäten" FontWeight="Bold"/>
            </StackPanel>
        </telerik:RadPanelBarItem.Header>
     
        <telerik:RadPanelBarItem MouseLeftButtonDown="RadPanelBarItem_MouseDown"
                                 Tag="KapaViewPage.xaml">
            <telerik:RadPanelBarItem.Header>
                <StackPanel Orientation="Horizontal" Margin="10 4 5 5">
                    <Image Source="Images/Document_search.ico"
                           Style="{StaticResource style_image_16x16}"/>
                    <Label Content="Anzeigen/Bearbeiten"/>
                </StackPanel>
            </telerik:RadPanelBarItem.Header>
        </telerik:RadPanelBarItem>


private void RadPanelBarItem_MouseDown(object sender, MouseButtonEventArgs e)
{
    if (sender != null)
    {
        RadPanelBarItem item = sender as RadPanelBarItem;
        if (item.Tag != null)
        {
            string ziel = item.Tag.ToString();
 
            if (ziel.Length > 0) mvm.Navigate(ziel);
        }
    }
}



Petar Mladenov
Telerik team
 answered on 02 Feb 2011
2 answers
160 views

Hi,
Previously I was using this code in WPF .net 4.0 framework and was working correctly.

Code at RowLoaded Event:
 

TreeListViewRow row = e.Row as TreeListViewRow; 
   
Binding binding = new Binding("IsExpanded") { Source = row.Item }; 
  
binding.Mode = BindingMode.TwoWay; 
  
row.SetBinding(TreeListViewRow.IsExpandedProperty, binding);

 

 

 

which indirectly calls the

RowIsExpandedChanging event somehow.
But now when I migrated to .net 3.5 framework, due to some limitations, the same code was not working.
Now it is not calling the RowIsExpandedChanging event.
Please suggest me how to overcome from this problem, is there any other way to do the same in .net 3.5.

Thanks in Advance.

 

 

 

Manishkumar
Top achievements
Rank 1
 answered on 02 Feb 2011
3 answers
128 views
Hi, I have a problem when populating stacked bar charts. My code is following:
XMAL:
<telerik:RadChart x:Name="chart" PaletteBrushesRepeat="False" telerik:Theming.Theme="Summer">
 </telerik:RadChart>

C#:
chart.SeriesMappings.Clear();
            chart.DefaultView.ChartArea.DataSeries.Clear();
            chart.DefaultView.ChartLegend.UseAutoGeneratedItems = true;
            chart.DefaultSeriesDefinition.LegendDisplayMode = LegendDisplayMode.SeriesLabel;
             
            for (int i = 0; i < model.Captions.Count; i++ )
            {
                SeriesMapping sm = new SeriesMapping();
                StackedBarSeriesDefinition dd = new StackedBarSeriesDefinition();
                 
                dd.StackGroupName = "Stack1";
                sm.SeriesDefinition = dd;
                sm.LegendLabel = "Stacked Bar " + i;
                sm.CollectionIndex = i;
                 
                ItemMapping im1 = new ItemMapping();
                im1.DataPointMember = DataPointMember.YValue;
                sm.ItemMappings.Add(im1);
                chart.SeriesMappings.Add(sm);
            }
 
            List<double[]> itemsSource = new List<double[]>();
            for (int i = 0; i < model.Children.Count; i++)
            {
                double[] d =  model.Children[i].Values.Select(s => s.AdjustedValue).ToArray();
                itemsSource.Add(d);
            }

I'm not sure where I'm going wrong here but I'd thought "sm.LegendLabel = "Stacked Bar " + i; " would provide my with legend items.

Best regards
Kristján.
Kristjan Einarsson
Top achievements
Rank 1
 answered on 02 Feb 2011
4 answers
102 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
166 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
176 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
74 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
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
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?