Telerik Forums
UI for WPF Forum
9 answers
433 views
HI.

I am building a grid in code, and needs to add rows ( and populate theirs cells ) in runtime.

Creating the columns was easy, but I battle to edit the cell values.

This is what I have tried.

grid.Items.AddNew()  creates a new row in the grid. I would now like to assign a value to cell[0] in the new row.
grid.Items[0] does not contain a method to access the cells.

How do I get to the cells?

I know that binding the grid to a datatable will be much easier, but I was hoping to access the cells directly, without having to create a table for the data first.

Thx!

 

 

Pavel Pavlov
Telerik team
 answered on 26 Aug 2010
1 answer
183 views
I am unable to centre a child dialog window of type RadWindow. I create the window as following:

NewGoalWindow view = new NewGoalWindow();
view.WindowStartupLocation = WindowStartupLocation.CenterOwner;
view.Owner = WindowHelper.MainWindow;
NewGoalViewModel model = new NewGoalViewModel();
model.RequestClose += delegate
{
  view.Close();
};
view.DataContext = model;
view.ShowDialog();

The window is always located in the top left corder. WindowHelper.MainWindow is a reference to a RadWindow, which I have checked is the main window of the application.

I need help. Am I overlooking something?
David
Top achievements
Rank 1
 answered on 25 Aug 2010
2 answers
120 views
I've got a RadPanelBar with the Vertical/Horizontal Visibility properties set to Auto, which has been working initially when I display a user-control, but has some issues with resizing:

If I increase the height of my window, the vertical scrollbar's height seems to be aware of the increased height, and accounts for this, however, when I decrease the height of the window, the vertical scrollbar remains at the largest height it had reached previously. 

I recall some properties in WinForms you had to set in order to resize for grow-and-shrink, but I don't see anything like this in the WPF stack.  Is this resize behavior a known issue, or have I missed a setting that would make the scrollbar work as expected?

BTW - we're using version 2010.1.515.35 currently

Thanks,
Tony
Tony Mocella
Top achievements
Rank 1
 answered on 25 Aug 2010
6 answers
306 views
Hi:
I need to design a cell template only for one column of the radgridview, How can do that? and
the cell template change depending the value of other column of the radgridview (in code behind).

please help me!
my Best Wishes
Oscar Zapata.
 

Daniel Meland
Top achievements
Rank 1
 answered on 25 Aug 2010
3 answers
111 views
The RadTimePicker doesn't work correctly when it is placed inside a listbox. When you select a time from the dropdown, then the dropdown closes, but the binding is not updated.

The following snippet shows the problem:
<ListBox x:Name="multipleItemsPresenter" ItemsSource="{Binding}">
 <ListBox.ItemTemplate>
  <DataTemplate>
   <StackPanel Orientation="Horizontal">
    <telerik:RadTimePicker Width="80" SelectedTime="{Binding Path=Time, Mode=TwoWay}"/>
    <TextBlock Margin="20,0,0,0" Text="{Binding Path=Time, Mode=OneWay}">
   </StackPanel>
  </DataTemplate>
 </ListBox.ItemTemplate>
</ListBox>

I guess the ListBox and/or ListView intercepts the click, because it does work fine with an ItemsControl.
Konstantina
Telerik team
 answered on 25 Aug 2010
1 answer
248 views
Is it possible to sort a GridViewDataColumn by the result of the converter rather than the object the column is bound to?
Maya
Telerik team
 answered on 25 Aug 2010
3 answers
190 views
Hi,

I'm having memory issues with TileView control. Basically, I have a dialog with a TileView inside and when this dialog is popped up and closed I expect all the objects to be cleaned up from the memory. I do trigger Garbage Collection and looks like it is guaranteed that there are nothing in my application that holds those objects in the memory.

I used ANTS Memory profiler and it shows there are 3 "things" referencing TileView control:
1) some WeakHashTable.
2) some WeakEventTable.
3) and another Hashtable in ReflectTypeDescriptionProvider class.

Please take a look to the following object retention graph -  http://rubenhak.com/TileViewMemoryLeak.png
Looks like ReflectTypeDescriptionProvider does not let objects to be garbage collected.

What you think?

Thanks,
Ruben
Tina Stancheva
Telerik team
 answered on 25 Aug 2010
1 answer
82 views
I have a GridView with some column footers. I'm finding in some situations (which I have difficulty repeating) that the controls in the column footers do not display. I run Snoop and can see that the controls are in the control tree but they are not visible. If I select the item in the Snoop tree, the item displays. Sounds like a bug to me.
Maya
Telerik team
 answered on 25 Aug 2010
2 answers
238 views
Hello All,

We have a RadMenu which we do not need or want icons on.  I successfully set the IconColumnWidth="0" and this hides the icon column just fine.  However, the <telerik:RadMenuItem IsSeparator="True" /> menu item doesn't seem to respect this.  The separator bar is moved over to the right for the width of the icon column used to be.

Not sure if this is a bug, working as designed, or there is a workaround for this.  Has anyone else run across this behavior?
Dani
Telerik team
 answered on 25 Aug 2010
1 answer
60 views
Hello

We are developing WPF aplication with telerik controls ver.2010.1.603
Now we bought licence for your controls ver 2010.2.0812.
And application stopped to work properly.

Here is code causes problem.

Here is our control, that is binded to two DateTime Objects. With ver. 2010.1.603
it was working fine, but with new one we have null exception, when we want to get
MarketDepthFrom, or MarketDepthTo

 

 

 

<
controls:PeriodControl From="{Binding Path=MarketDepthFrom, Mode=TwoWay}" To="{Binding Path=MarketDepthTo, Mode=TwoWay}" />


Here is XAML of our control:

 

<UserControl x:Class="LT.Desk.Controls.PeriodControl"
    xmlns:trans="clr-namespace:LT.Language;assembly=LT.Language"
    xmlns:telerikRibbonBar="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.RibbonBar"
    xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
    xmlns:telerikInput="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input">
  
    <StackPanel Orientation="Horizontal">
        <Grid Name="PeriodGroup">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
  
            <TextBlock Text="{Binding Source={x:Static trans:LanguageManager.Instance}, Path=Dict[Period]}" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="2,0,2,0"/>
            <telerik:RadComboBox HorizontalAlignment="Stretch" x:Name="PeriodTypeCombo" Margin="3,0,0,0"
                                  Grid.Row="0" Grid.Column="1" Height="15" Width="100" SelectionChanged="PeriodTypeCombo_SelectionChanged">
                <telerik:RadComboBoxItem Content="{Binding Source={x:Static trans:LanguageManager.Instance}, Path=Dict[Day]}" />
                <telerik:RadComboBoxItem Content="{Binding Source={x:Static trans:LanguageManager.Instance}, Path=Dict[Week]}" />
                <telerik:RadComboBoxItem Content="{Binding Source={x:Static trans:LanguageManager.Instance}, Path=Dict[Month]}" />
                <telerik:RadComboBoxItem Content="{Binding Source={x:Static trans:LanguageManager.Instance}, Path=Dict[Quarter]}" />
                <telerik:RadComboBoxItem Content="{Binding Source={x:Static trans:LanguageManager.Instance}, Path=Dict[Year]}" />
            </telerik:RadComboBox>
  
            <TextBlock Text="{Binding Source={x:Static trans:LanguageManager.Instance}, Path=Dict[From]}" Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="2,0,6,0"/>
            <telerik:RadDatePicker Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" Width="100" Name="fromDP" SelectionChanged="fromDP_SelectionChanged"/>
  
            <TextBlock Text="{Binding Source={x:Static trans:LanguageManager.Instance}, Path=Dict[To]}" Grid.Row="2" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="2,0,6,0" />
            <telerik:RadDatePicker Grid.Row="2" Grid.Column="1" HorizontalAlignment="Right" Width="100" Name="toDP" SelectionChanged="toDP_SelectionChanged" IsReadOnly="False" IsEnabled="True" />
        </Grid>
  
        <Grid>
            <StackPanel Orientation="Horizontal">
                <telerikRibbonBar:Separator Width="2"/>
                <telerikRibbonBar:RadRibbonButton Size="Large" VerticalAlignment="Center" HorizontalAlignment="Center" x:Name="Previous" Click="Prevoius_Click">
                    <StackPanel Name="PreviousButton" Orientation="Vertical">
                        <Image VerticalAlignment="Top" Height="38"  Source="/LT.Desk;component/Resources/back-icon32.png"/>
                        <TextBlock VerticalAlignment="Top" FontSize="12" HorizontalAlignment="Center" Margin="0,6,0,0" Text="{Binding Source={x:Static trans:LanguageManager.Instance}, Path=Dict[Previous]}"/>
                    </StackPanel>
                </telerikRibbonBar:RadRibbonButton>
                <telerikRibbonBar:Separator Width="1"/>
                <telerikRibbonBar:RadRibbonButton Size="Large" VerticalAlignment="Center" HorizontalAlignment="Center" x:Name="Next" Click="Next_Click">
                    <StackPanel Name="NextButton" Orientation="Vertical">
                        <Image VerticalAlignment="Top" Height="38" HorizontalAlignment="Right" Source="/LT.Desk;component/Resources/next-icon32.png"/>
                        <TextBlock VerticalAlignment="Top" FontSize="12" HorizontalAlignment="Center" Margin="0,6,0,0" Text="{Binding Source={x:Static trans:LanguageManager.Instance}, Path=Dict[Next]}"/>
                    </StackPanel>
                </telerikRibbonBar:RadRibbonButton>
                <telerikRibbonBar:Separator Width="2"/>
            </StackPanel>
        </Grid>
    </StackPanel>
  
</UserControl>

 

 

 

 

####################################################

And here is code behind for it:

 

 

 

 

public partial class PeriodControl 
  
   
  
  
{
  
 public DateTime? From 
  
{
  
  
get { return (DateTime)GetValue(FromProperty); } 
  
  
set { SetValue(FromProperty,value); } 
  
}
  
   
  
  
public DateTime? To 
  
{
  
  
get { return (DateTime)GetValue(ToProperty); } 
  
  
set { SetValue(ToProperty, value); } 
  
}
  
   
  
  
public PeriodTypeEnum PeriodType 
  
   
  
{
  
  
get { return (PeriodTypeEnum)GetValue(PeriodTypeProperty); } 
  
  
set { SetValue(PeriodTypeProperty, value); } 
  
}
  
  
public static DependencyProperty FromProperty = DependencyProperty.Register("From", typeof(DateTime?), typeof(PeriodControl)); 
  
  
public static DependencyProperty ToProperty = DependencyProperty.Register("To", typeof(DateTime?), typeof(PeriodControl)); 
  
  
public static DependencyProperty PeriodTypeProperty = DependencyProperty.Register("PeriodType", typeof(PeriodTypeEnum), typeof(PeriodControl)); 
  
   
  
   
  
  
public PeriodControl() 
  
   
  
{
  
InitializeComponent();
  
fromDP.SelectedDate = 
  
  
DateTime.Today; 
  
   
  
toDP.SelectedDate = DateTime.Today; 
  
From = DateTime.Today; 
  
To = DateTime.Today; 
  
PeriodTypeCombo.SelectedIndex = 0;
  
}
  
  
private void fromDP_SelectionChanged(object sender, SelectionChangedEventArgs e)............ 
  
private void toDP_SelectionChanged(object sender, SelectionChangedEventArgs e)............. 
  
  
private void Next_Click(object sender, RoutedEventArgs e)................. 
  
  
private void PeriodTypeCombo_SelectionChanged(object sender, SelectionChangedEventArgs e)............. 
  
}



Please help me if you know the answer
we have 2 days left to deadline so it is
quite urgent

Regards
Michal

Kaloyan
Telerik team
 answered on 25 Aug 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
Cynthia
Top achievements
Rank 1
Iron
Jesse
Top achievements
Rank 2
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Jesse
Top achievements
Rank 2
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?