Telerik Forums
UI for WPF Forum
2 answers
307 views
Good day!
I have such a form:

<Grid x:Name="LayoutRoot">
<StackPanel x:
Name="spQuestions" Orientation="Vertical" Grid.Column="1" Grid.Row="8" Grid.ColumnSpan="3" HorizontalAlignment="Left">
</StackPanel>
<
/Grid>


and I put there a RadGridView using xaml.cs file:

RadGridView gridView = new RadGridView();
gridView.ItemsSource = 
question.Answers;
gridView.AutoGenerateColumns = false;
gridView.ScrollMode
 = Telerik.Windows.Controls.GridView.ScrollUpdateMode.RealTime;gridView.ShowGroupPanel = false;
spQuestions.Children.Add(gridView);

So I make my xaml dynamically.

Is it possible to make someting like such structure usin dinamic xaml
<telerikGridView:GridViewDataColumn Header="Варианты ответа" UniqueName="Name" MinWidth="300" MaxWidth="2000">
   <telerikGridView:GridViewDataColumn.CellTemplate>
       <DataTemplate>
          <RadioButton Content="{Binding Text}" FontFamily="Verdana" FontSize="13" Foreground="#FF170000" />
       </DataTemplate>
   </telerikGridView:GridViewDataColumn.CellTemplate>
</telerikGridView:GridViewDataColumn>


?
lina fetisova
Top achievements
Rank 1
 answered on 17 Jun 2010
5 answers
841 views
I have my data shown correctly in the gridview. Now I want to have them sorted by "Name" by default. How could I do that?

Thanks,
Yang
Yang Lu
Top achievements
Rank 1
 answered on 17 Jun 2010
6 answers
295 views

I recently downloaded the WPF Trial package 2010 Q2 SP2 since we’ll probably be using that at work. I did with a separate branch of our code that is currently in development and is currently using a WPF Toolkit grid with row details which the customers don’t really like since they want a nice looking “tree grid”.

I very quickly replaced the grid with a RadGridView using a HierarchicalChildTemplate and got it up and running very nice in less than 30 minutes. We showed it to our customers to show them what might be possible and they got really impressed both by the looks, the child level functionality and especially the grouping/filtering/sorting that existed out of the box.

When showing/testing it we only used already existing data and didn’t change the data.

So I happily started yesterday with changing a couple of more grids and then started to run the application and immediately got stuck with rows not getting unselected after being edited by code.

After spending almost a day without understanding what I do wrong even with the smallest example without hierarchy I thought I should try to ask for an explanation here.

What I have in my small sample app is an Order entity that implements INotifyPropertyChanged for its properties.

A PresentationModel class also implementing INotifyPropertyChanged that pretty much consists of an ObservableCollection<Order>.

In the code behind of the xaml window I set the DataContext of the window to a new instance of the PresentationModel and create a list with four orders (with different data that makes both the Equals and GetHashCode return different values for each order).

Then I create a RadGridView in XAML and bind it like this:

<telerik:RadGridView x:Name="orderGrid" ItemsSource="{Binding Orders}"/>

I also added a button to the XAML file where I loop through the SelectedItems like this:

foreach (Order order in orderGrid.SelectedItems)

{

    order.Customer = "Kalle";

}

 

When run the application select a row and press the button the Customer column gets nicely updated to Kalle, but when I select another row the first one stays selected and I can’t find any way to get it out of the SelectedItems collection. If I Ctrl-click the row to unselect it and select another row it looks like just the other row is selected, but the SelectedItems still contains also the changed row no matter what I do. If I select yet another row and press the button also both of the rows gets set to Kalle and then both are stuck selected.

 

I guess I must be doing something completely stupid or missing something obvious because I don’t find anyone else on the forums that are experiencing this and binding to an ObservableCollection with custom entities and changing data by code can’t be an uncommon scenario.

Milan
Telerik team
 answered on 17 Jun 2010
3 answers
127 views
Has anyone else found the level of changes to public members in each new release very frustrating?

Check out the attached screenshot of the calendar after upgrading to the 2010.1 603 release. It's basically non functional because we had a custom style and template that is no longer valid.

This experience holds true for the Calendar, GridView and Charts. We find ourselves constantly recreating styles with each new release and investing far too much time just to get these elements to look the way we want them to.

Unfortunately, the official answer from Telerik is "recreate the template" and "we cannot stop the development just to prevent the custom themes from breaking".

I'm concerned about the level of changes and the effort that goes into fixing styles with each upgrade. Is anyone else? Changing public members is just unreasonable.

See this post specifically for the Calendar:

--Mike

Vlad
Telerik team
 answered on 17 Jun 2010
2 answers
200 views
I think I've got myself in a Catch 22. I need a Carousel with both reflection and a horizontal scrollbar.

- It seems that the RadCarouselPanel doesn't support reflection, so I would have to use a RadCarousel control instead.
- It seems the best way to get a horizontal scrollbar underneath the carousel control is to use a ScrollViewer control around a RadCarouselPanel, however, then I'd lose the reflection that is required by the design comps. 

I've created a CustomItemTemplate to match the design from the designers below:

    <Grid Name="SceneCarouselGrid"
        <Grid.Resources> 
            <DataTemplate DataType="{x:Type local:Scene}"
                <Grid Width="285" Height="315"
                    <StackPanel> 
                        <Grid Name="ItemGrid"
                            <Grid.RowDefinitions> 
                                <RowDefinition Height="30" /> 
                                <RowDefinition Height="60*" /> 
                            </Grid.RowDefinitions> 
                            <Label Grid.Row="0" Content="{Binding Path=Title}" HorizontalAlignment="Center" HorizontalContentAlignment="Center" VerticalAlignment="Center" VerticalContentAlignment="Center" Margin="0" Name="SceneLabel" FontFamily="HelveticaNeue" FontWeight="Bold" FontSize="15" Background="#00000000" Foreground="White" /> 
                            <Border Grid.Row="1" x:Name="CarouselItemMainBorder" Margin="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" MinHeight="285" MinWidth="285" BorderThickness="3"
                                <Border.BorderBrush> 
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"
                                        <GradientStop Color="#FFE8A13C" Offset="0" /> 
                                        <GradientStop Color="Transparent" Offset="1" /> 
                                    </LinearGradientBrush> 
                                </Border.BorderBrush> 
                                <Border.Background> 
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"
                                        <GradientStop Color="#FFC1DCFF" Offset="0"/> 
                                        <GradientStop Color="#FF7EB8F8" Offset="1"/> 
                                    </LinearGradientBrush> 
                                </Border.Background> 
                                <Image Source="{Binding Path=Image}" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="285" Width="285" /> 
                            </Border> 
                        </Grid> 
                    </StackPanel> 
                </Grid> 
            </DataTemplate> 
        </Grid.Resources> 

Can you advise me on the best way to approach this? 

Thanks,
Scott
Scott
Top achievements
Rank 1
 answered on 16 Jun 2010
6 answers
305 views
I have a GridViewImageColumn databound to a string column in a datatable which contains a fully qualified http URL. I was hoping this would download and display the image in the grid, but it leaves the cell blank.

Should this work? If not, what is the simplest way to programmatically bind an image, via a URL, to a column?

Thanks.
jwhitley
Top achievements
Rank 1
 answered on 16 Jun 2010
3 answers
113 views
Hi,

Does the telerik controls in WPF support "shy toolbar"?

Thanks.
Valentin.Stoychev
Telerik team
 answered on 16 Jun 2010
7 answers
143 views
Hi,

We have an application using dock groups and the radpane control.

Whenever we change the tab in the dockgroup all the datacontexts for the controls in the radpane are being changed to a datacontext of one of the other tabs, so all the data is corrupted.

None of our code is changing the datacontext but the RadTabcontrol appears to be doing this. Only the datacontext for the controls is getting changed but not the radpanes datacontext!!!!

Below is the call stack? Any ideas why this is happening?

  PresentationFramework.dll!System.Windows.FrameworkElement.DataContext.set(object value) + 0x24 bytes
  Telerik.Windows.Controls.Navigation.dll!Telerik.Windows.Controls.RadTabControl.UpdateSelectedElementDataContext() + 0xc5 bytes
  Telerik.Windows.Controls.Navigation.dll!Telerik.Windows.Controls.RadTabControl.UpdateSelectedContainer(bool shouldFocus, Telerik.Windows.Controls.RadTabItem selectedItemContainer) + 0x5a bytes
  Telerik.Windows.Controls.Navigation.dll!Telerik.Windows.Controls.RadTabControl.UpdateSelectedContent(int newIndex) + 0x13b bytes
  Telerik.Windows.Controls.Navigation.dll!Telerik.Windows.Controls.RadTabControl.OnSelectedIndexChanged(int oldIndex, int newIndex) + 0x25a bytes
  Telerik.Windows.Controls.Navigation.dll!Telerik.Windows.Controls.RadTabControl.OnSelectedIndexChanged(System.Windows.DependencyObject sender, System.Windows.DependencyPropertyChangedEventArgs e) + 0x98 bytes
  WindowsBase.dll!System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs e) + 0x4c bytes
  PresentationFramework.dll!System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs e) + 0x50 bytes
  WindowsBase.dll!System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs args) + 0x3c bytes
  WindowsBase.dll!System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex entryIndex, System.Windows.DependencyProperty dp, System.Windows.PropertyMetadata metadata, System.Windows.EffectiveValueEntry oldEntry, ref System.Windows.EffectiveValueEntry newEntry, bool coerceWithDeferredReference, bool coerceWithCurrentValue, System.Windows.OperationType operationType) + 0x723 bytes
  WindowsBase.dll!System.Windows.DependencyObject.SetValueCommon(System.Windows.DependencyProperty dp, object value, System.Windows.PropertyMetadata metadata, bool coerceWithDeferredReference, bool coerceWithCurrentValue, System.Windows.OperationType operationType, bool isInternal) + 0x2eb bytes
  WindowsBase.dll!System.Windows.DependencyObject.SetValue(System.Windows.DependencyProperty dp, object value) + 0x35 bytes
  Telerik.Windows.Controls.Navigation.dll!Telerik.Windows.Controls.RadTabControl.SelectedIndex.set(int value) + 0x4d bytes
  Telerik.Windows.Controls.Navigation.dll!Telerik.Windows.Controls.RadTabControl.NotifyChildIsSelectedChanged(Telerik.Windows.Controls.RadTabItem child) + 0x7c bytes
  Telerik.Windows.Controls.Navigation.dll!Telerik.Windows.Controls.RadTabItem.OnIsSelectedChanged(bool oldValue, bool newValue) + 0x46 bytes
  Telerik.Windows.Controls.Navigation.dll!Telerik.Windows.Controls.RadTabItem.OnIsSelectedChanged(System.Windows.DependencyObject sender, System.Windows.DependencyPropertyChangedEventArgs e) + 0x9b bytes



Tina Stancheva
Telerik team
 answered on 16 Jun 2010
2 answers
156 views
We use the dll's from 28.05.2010, version 2010.1.0528.35.

It seems like the e.NewData in the CellEditEnded always is null. 
Rieni De Rijke
Top achievements
Rank 1
 answered on 16 Jun 2010
1 answer
132 views
I'm trying to style my Y-Axis striplines (eventually to be bound), but I can't seem to do so correctly. Declaritvely, I can set a single chart's ChartArea.AxisY.StripLinesVisibility to Collapsed, but everything I have tried makes it seem as if these guys were impervious to styles. So basically: how to:
  * Declare the style correctly in XAML
  * Set the style correctly in C#, at the time of Chart creation (I must do it like this, as the charts are created at run time)

Currently, I have in my XAML:
<UserControl.Resources> 
    <Style TargetType="Rectangle" x:Key="StripLinesYStyle
      <Setter Property="Visibility" Value="Collapsed" /> 
    </Style> 
</UserControl.Resources> 

and where I'm creating the chart I have

var stripLineStyle = this.Resources["StripLinesYStyle"as Style; 
myChart.DefaultView.ChartArea.AxisY.AxisStyles.StripLineStyle = stripLineStyle; 



Sia
Telerik team
 answered on 16 Jun 2010
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
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
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
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?