Telerik Forums
UI for WPF Forum
1 answer
96 views
Hi,

We have been using WPF GridView Q3 2012 version and today upgraded to Q1 2013 but getting many compilation errors. I am attaching the snapshot. Please suggest.

Thanks,
Sandeep
Dimitrina
Telerik team
 answered on 16 Apr 2013
1 answer
200 views
I have a problem where the edit mode is conflicting with the drag/drop. The problem happens because the cell goes into edit mode when the mouse is depressed rather than on a mouse up.

The scenario is that the user has clicked on a row. They happen to have clicked in some random cell. Now they want to drag that row. They click in the same cell expecting that they can drag the row but as soon as they press the mouse down, that cell goes into edit mode. So they can't drag.

Is there a way to tell the grid to use mouse-up rather than mouse-down when deciding whether to put it in edit mode.

Thank you,
Valerie
Nedyalko Nikolov
Telerik team
 answered on 16 Apr 2013
4 answers
290 views
I have a RadGridView populated with data. I have some input controls that allow the user to change the font of the text in the header rows. I tried the following in the code-behind, but it did not work. What is the correct way to do this?

System.Windows.Style headerStyle = new Style();
headerStyle.BasedOn = reportGrid.Columns[0].HeaderCellStyle;
headerStyle.TargetType = typeof(GridViewHeaderCell);
headerStyle.Setters.Add(new Setter(GridViewHeaderCell.FontSizeProperty, 25));
reportGrid.Columns[0].HeaderCellStyle = headerStyle;

Kind Regards,
Albert
Dimitrina
Telerik team
 answered on 16 Apr 2013
18 answers
1.1K+ views
Hi, 

I've found an example on how to change the theme at runtime with silverlight but I need to do it with WPF, is it possible ?

Also, I've applied a theme to the VS2010 controls like this:

        <Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource {telerik:ThemeResourceKey ThemeType=telerik:VistaTheme, ElementType=TextBox}}" />
        <Style TargetType="{x:Type ScrollViewer}" BasedOn="{StaticResource {telerik:ThemeResourceKey ThemeType=telerik:VistaTheme, ElementType=ScrollViewer}}" />
        <Style TargetType="{x:Type RadioButton}" BasedOn="{StaticResource {telerik:ThemeResourceKey ThemeType=telerik:VistaTheme, ElementType=RadioButton}}" />
        <Style TargetType="{x:Type ListBox}" BasedOn="{StaticResource {telerik:ThemeResourceKey ThemeType=telerik:VistaTheme, ElementType=ListBox}}" />
        <Style TargetType="{x:Type CheckBox}" BasedOn="{StaticResource {telerik:ThemeResourceKey ThemeType=telerik:VistaTheme, ElementType=CheckBox}}" />
        <Style TargetType="{x:Type Button}" BasedOn="{StaticResource {telerik:ThemeResourceKey ThemeType=telerik:VistaTheme, ElementType=Button}}" />
        <Style TargetType="{x:Type PasswordBox}" BasedOn="{StaticResource {telerik:ThemeResourceKey ThemeType=telerik:VistaTheme, ElementType=PasswordBox}}" />
        <Style TargetType="{x:Type RepeatButton}" BasedOn="{StaticResource {telerik:ThemeResourceKey ThemeType=telerik:VistaTheme, ElementType=RepeatButton}}" />

But I need their theme to follow the application's theme (and follow it too if it changes).

I hope you can help me.

Thanks.
Amin
Top achievements
Rank 1
 answered on 16 Apr 2013
2 answers
339 views
if you setup hierarchy and you want bind / display info in the child grid for the parent row it belongs to..in the xaml/bing how can you get reference to parent row from the child as part of databinding...

<telerik:RadGridView Name="gridView" ItemsSource="{Binding Person}">
    <telerik:RadGridView.ChildTableDefinitions>
                <telerik:GridViewTableDefinition />
    </telerik:RadGridView.ChildTableDefinitions>
    <telerik:RadGridView.HierarchyChildTemplate>
        <DataTemplate>
            <StackPanel>
            <TextBlock Text="{Binding ParentRow.SomeProperty}"/>
            <telerik:RadGridView ItemsSource="{Binding Children}" Name="childGrid" ShowGroupPanel="False" />
            </StackPanel>
        </DataTemplate>
    </telerik:RadGridView.HierarchyChildTemplate>
</telerik:RadGridView>
Dan
Top achievements
Rank 1
 answered on 15 Apr 2013
12 answers
344 views
Hi!

I have a TileView and TileConfigView UserControls and I would like to show pre-designed TileView (TileView.xaml) as RadFluidContentControl.Content and pre-designed TileConfigView (TileConfigView.xaml) as RadFluidContentControl.LargeContent.

I Was able to bind TileView to .Content using {Binding TileContent} but for some reason the tile's size is not the same as the TileView UserControl's size. In addition I needed to make property to TileView's codebehind for it to work because I don't know how to get the view from the viewmodel:

// in TileView.xaml.cs
public TileView TileContent
{
    get { return this; }
}

But if I want to have different view for .LargeContent this seems like not the way to do it.

This is my contentTemplate for RadTileView (Width="Auto" and Height="Auto" didn't help with getting the tile's size match that of the actual view):

<DataTemplate x:Key="contentTemplate">
            <telerik:RadFluidContentControl ContentChangeMode="Manual"
                                            State="Normal"
                                            TransitionDuration="0:0:.5"
                                            DataContext="{Binding}">
                <telerik:RadFluidContentControl.Content>
                    <ContentControl Content="{Binding TileContent}"
                                    Width="Auto"
                                    Height="Auto"
                                    HorizontalContentAlignment="Center"
                                    />
                </telerik:RadFluidContentControl.Content>
                <telerik:RadFluidContentControl.LargeContent>
                    <ContentControl Content="{Binding ConfigContent}"
                     HorizontalAlignment="Stretch"
                     HorizontalContentAlignment="Stretch"
                     VerticalAlignment="Stretch"
                     VerticalContentAlignment="Stretch" />
                </telerik:RadFluidContentControl.LargeContent>
            </telerik:RadFluidContentControl>
        </DataTemplate>

Is there a proper way to do this so that I can have pre-designed TileView and TileConfigView per Tile and have those used as .Content and .LargeContent?

Br,

Kalle
Pavel R. Pavlov
Telerik team
 answered on 15 Apr 2013
2 answers
126 views
Hey Telerik,

The ZIndex of the Special Slots is set to 1 hard coded instead of using the Canvas.ZIndex property of the style of the special slot. This way it's hard to do the correct layering of the slots (in the case there are multiple types). I resolved the issue by one way binding and letting it reevaluate ontargetupdated. The binding result always returns the correct ZIndex property of the type of slot. Just a small bug, however due to the recycling of slots it has some perfomance penalties.

Cheers,
Nico
Shawn Shaddock
Top achievements
Rank 1
 answered on 15 Apr 2013
1 answer
633 views
I thought the Loaded event should only fire when the control is just about to render?

When I programmatically add a tab to the TabControl with a UserControl on it, the Loaded event of the UserControl fires although the tab isn't selected and thus the UserControl shouldn't be rendered.

I'm also asking because I then have the problem that when I set the SelectedItem of the TabControl to be the newly added Tab, the Loaded event of the UserControl gets fired yet again.

So in the process of adding and selecting the tab, the Loaded event of the UserControl gets fired twice which isn't desirable.

Edit: It does only seem to happen if the first tab is added to the TabControl for the first time.

Why is that, and is there a better way to prevent this from happening without resorting to some sort of boolean flag testing solution in the Loaded event handler?
Pavel R. Pavlov
Telerik team
 answered on 15 Apr 2013
1 answer
72 views
Hi,

I have a user control that is used in a listbox. This UC is drag and drop enabled to move it from one list to another. This works. I have list boxes in the UC that are DND enabled to drag data into. I have this working as well. My next step is to be able to drag the item in the UC child list to another list. Right now the whole UC wants to move as part of it's normal process but I only want to move the child list item. Can this be done? Example please.

Thanks.
George
Telerik team
 answered on 15 Apr 2013
1 answer
179 views
Hello,

I am using version 2012.3 and am trying to export a RadGridView to excel. The data table is very large, over 1bil cells, and when I try to export to excel I get an out of memory exception.

The project can only be deployed as an x86 platform application. I included the code below, how can I export a large table in this application?


Thank you,
Eli

SaveFileDialog dialog = new SaveFileDialog();
string extension = "xml";
dialog.DefaultExt = extension;
dialog.Filter = string.Format("{1} files (*.{0})|*.{0}|All files (*.*)|*.*", extension, "ExcelML");
dialog.FilterIndex = 1;
if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
string exportString = radGridView.ToExcelML();

using (Stream stream = dialog.OpenFile())
{
byte[] bytes = Encoding.UTF8.GetBytes(exportString);
stream.Write(bytes, 0, bytes.Length);
}
}
Dimitrina
Telerik team
 answered on 15 Apr 2013
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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?