Telerik Forums
UI for WPF Forum
3 answers
310 views
We are using a RadGridView and we have 2 columns and the empty space to the right of the header columns has this white border color that I'm not finding a way to remove it by styling or control templating.

In styling I've tried:

<Style TargetType="{x:Type telerikGridView:RadGridView}">
    <Setter Property="telerikControls:StyleManager.Theme" Value="Transparent"/>
    <Setter Property="HeaderRowStyle">
        <Setter.Value>
            <Style TargetType="{x:Type Control}">
                <Setter Property="Background" Value="{DynamicResource GridHeaderBrush}"/>
                <Setter Property="BorderThickness" Value="0,0,0,0"/>
            </Style>
        </Setter.Value>
    </Setter>
</Style>

I've also tried re-templating the control and doing the following:

<telerik:GridViewScrollViewer.HeaderRow>
    <telerik:GridViewHeaderRow x:Name="PART_HeaderRow" IsTabStop="False" IndentLevel="{TemplateBinding GroupCount}" Background="{DynamicResource GridHeaderBrush}" BorderThickness="0,0,0,0" BorderBrush="Transparent">
    </telerik:GridViewHeaderRow>
</telerik:GridViewScrollViewer.HeaderRow>

There still remains a white border around the empty space where the header column cells don't occupy. When I inspect the visual tree via WPF Snoop I see the white border belongs to a Border visual that is in the visual tree however when I copy the control template in Blend so I can edit it I don't see this border anywhere. Is this border being added by code instead of XAML?

I would appreciate any help on changing this border color.

Thanks
Vanya Pavlova
Telerik team
 answered on 25 Aug 2011
2 answers
164 views
I have RadGridView to which I am dynamically adding bound data columns.  I can successfully add columns as necessary, however, when I try to define a column with a CellTemplateSelector specified the selected CellTemplate is not applied to the column.  Through debugging the CellTemplateSelector I know that it is getting called and resolving the correct CellTemplate when the column is added, and the template applies correctly if used in the RadGridView XAML layout.  The pertinent code related to adding the column is as follows:
GridViewColumnCollection columns = this.gridView.Columns;
 
 ...elided...
 
    var col = (new GridViewDataColumn()
    {
        DataMemberBinding = new Binding(menuItem.BindingPath),
        Header = menuItem.Caption,
        CellTemplateSelector = new MemberCellTemplateSelector(),
    });
    columns.Add(col);

and the template is:
<local:MemberCellTemplateSelector.PhoneNumberList>
    <DataTemplate>
        <ItemsControl ItemsSource="{Binding MemberPhoneNumber}">
            <ItemsControl.ItemsPanel>
                <ItemsPanelTemplate>
                    <StackPanel Orientation="Vertical"/>
                </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel>
            <ItemsControl.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
                        <TextBlock Text="{Binding PhoneNumber}"/>
                        <TextBlock Text="{Binding PhoneNumberTypeKey, StringFormat='({0})'}"/>
                    </StackPanel>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </ItemsControl>
    </DataTemplate>
</local:MemberCellTemplateSelector.PhoneNumberList>


I have tried rebinding the grid, and calling ApplyTemplate() on both the grid, after adding the column, and on the cell passed to DataTemplateSelector.SelectTemplate() to no avail.  Am i missing something? How can I get the template to be applied to the column.




  
Pavel Pavlov
Telerik team
 answered on 25 Aug 2011
3 answers
140 views
Hello everyone,

I have a chart named chart1 and I am trying to export the chart as a png file, This is my code:


            var dialog = new SaveFileDialog();
            dialog.DefaultExt = ".png";
            dialog.Filter = string.Format("*.{0} | {1} File", "png", "PNG");

            if (!(bool)dialog.ShowDialog())
                return;

            this.Chart1.Save("Test.png", 96d, 96d, new PngBitmapEncoder());

The dialog box opens correctly and allows me to select a location and a name for the file, but then the file does not save. Any ideas?
chris
Top achievements
Rank 1
 answered on 25 Aug 2011
2 answers
175 views
How can I, in the RadScheduleView, disable it that the user can select a timespan via the mouse. 
In Day-view or in Timeline-view, the user can select a timespan by dragging the mouse from the start-time to the end-time. The selected timespan is marked in yellow by default. I want to disable that. 
Konstantina
Telerik team
 answered on 25 Aug 2011
3 answers
244 views
Is there a way to get a DataFormComboBoxFields currently selected item?
Pavel Pavlov
Telerik team
 answered on 25 Aug 2011
1 answer
34 views
Hi,
I have 2 question
1. In Telerik grid how to add GridViewCheckBoxColumn ?
2. How to set column background color in Telerik Grid?

Thanks
Saurabh
Maya
Telerik team
 answered on 25 Aug 2011
1 answer
117 views
Hello, I have data in the form of what can be considered part of of an esri shape file, I have just the byte arrays for the shapes themselves and not the other parts of the shape file such as the file header. I believe the methods to decode the byte array into a MapShape exist internally within the telerik dll, but is there a good way to access them directly?

Thanks
Andrey
Telerik team
 answered on 25 Aug 2011
2 answers
131 views
When should we expect the next Roadmap for WPF to be released?

Thanks very much.
Robert
Top achievements
Rank 1
 answered on 25 Aug 2011
4 answers
211 views
Hi, I have some questions about how to style RadChart when it's displaying data in candlestick format.

As you can see from this image, some of our charts are quite small. There's a very significant chunk of the chart area, which I've outlined in red, that isn't currently being used. I'd like to reduce this as much as possible, ideally so that the chart fills the entire area. Could you please advise me on how to do this? The ranges of both chart axes seem to extend past the min and max values of the source data, even when I specify those values explicitly. I have tried adding ExtendDirection="None" to the my chart's AxisY, but this hasn't had an effect on the range. I have also tried specifying the DateTime values along my chart's AxisX as OLE Automation values and setting IsDateTime to true, to no avail.

Also, while I've managed to change the fill colours of the bars from their defaults to red and green (thanks to another helpful forum post), I haven't managed to find a way to change the colour of the candlestick outlines. They're currently light blue, and I'd like them to be black.

Any help with either of these issues would be much appreciated.

Thanks,
- Chris M.
Evgenia
Telerik team
 answered on 25 Aug 2011
1 answer
77 views
Hi

What's the best way to open a pop window (with a datatemplate inside it), so that we can edit the contents of a cell ?

In my scenario I want the user to be able to edit some HTML, so want to popup a window to display when they enter celledit mode. This will then display a RadWindow with a full screen RichText Editor.

Cheers
Mark


Maya
Telerik team
 answered on 25 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?