Telerik Forums
UI for WPF Forum
2 answers
199 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
184 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
234 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
291 views
Is there a way to get a DataFormComboBoxFields currently selected item?
Pavel Pavlov
Telerik team
 answered on 25 Aug 2011
1 answer
64 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
170 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
167 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
255 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
121 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
1 answer
136 views
I have implemented the ScheduleViewDragDropBehavior class but I cannot find any method, property etc. which will allow me to auto scroll the Schedule View when a user is dragging an appointment. I have tried to implement a ScrollIntoView in the CanDrop method but this works only when dragging down the screen but not up. Also when dragging to the left at the beginning of the day the view flickers and keeps altering to a few hours later in the day. Is there an easy solution that I am completely missing?


I am using a Day view definition with Orientation set to Horizontal.


Would appreciate any help you can give me.
Valeri Hristov
Telerik team
 answered on 25 Aug 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
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
InlineAIAssistant
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?