Telerik Forums
UI for WPF Forum
1 answer
154 views
I am working on a radgrid with ComboBox columns and I'm wanting to switch around the way the keyboard manipulates the dropdowns and the grid. I want to navigate through the cells with the arrow keys and when I get to the cell I want I want to hit Enter and that will open the dropdown list of that cell. After I navigate through the items of the dropdown list I want to hit Enter again and the cell no longer be in edit mode and the value i chose to be displayed. Currently I have it behaving similar to that except not exactly. The dropdown will open on Enter and I can cycle through the items, however, when I hit enter again the dropdown closes and the value is selected but the cell is still active and when I use the arrow keys it still sorts through the dropdown items so I have to hit Enter again to commit the data. And when I hit Enter the second time the data is committed and the cell under the cell I just changed is now the selected cell....I don't want Enter to move down. How can I accomplish this. I realize this is kind of confusing so any help would be appreciated thanks.
Dimitrina
Telerik team
 answered on 24 Jun 2013
1 answer
73 views
Hi,

I am creating an application using WPF, MVVM , C#.
I am just wondering if there is a way to save each tile of a RadTileView as image.

So far I manage to save the whole tileview by using the following code:

 private void SaveTileView()
        {
            var imagePath = "C:\\Users\\" + "TestSciChart" + Random.Next(200) + ".png";

            using (Stream stream = new FileStream(imagePath, FileMode.Create))
            {
                var encoder = new TiffBitmapEncoder();
                Telerik.Windows.Media.Imaging.ExportExtensions.ExportToImage(
                    ChartTileView, stream, encoder);
            }
        }

but I haven been able to save each tile separately? Can someone help me please?

this is my tileview declaration:

<telerik:RadTileView    x:Name="ChartTileView"
                                    telerik:PersistenceManager.StorageId="ChartTileView"
                                    Margin="0" Padding="0"
                                    VerticalContentAlignment="Top"
                                    VerticalAlignment="Stretch" 
                                    HorizontalAlignment="Stretch"
                               ColumnsCount="1"
                               IsAutoScrollingEnabled="True"
                               IsDockingEnabled="True"
                               IsVirtualizing="True"
                               ItemsSource="{Binding Views}"
                               ItemTemplate="{StaticResource HeaderTemplate}"
                                    ColumnWidth="*"
                                    RowHeight="250"   
                                    MaximizeMode="Zero" 
                               TileStateChangeTrigger="SingleClick">
            </telerik:RadTileView>


Thanks so much.

Sandra
Pavel R. Pavlov
Telerik team
 answered on 24 Jun 2013
1 answer
178 views
I'm using the RadGridView GridViewMaskedInputColumn with a mask for a phone number "(###) ###-####", and I would like to have the phone number display with the mask when not being edited in the grid.  I can seem to get the "DataFormatString to work.  I've tried DataFormatString="{}{0:(###) ###-####}" with no luck.  Thanks!
Lawrence
Top achievements
Rank 1
 answered on 23 Jun 2013
0 answers
191 views
Hi,
<UserControl>
     <telerik:RadGridView.ColumnGroups>
                            <telerik:GridViewColumnGroup Name="CommonID" Header="{Binding DataContext.ID, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}/>  
     </telerik:RadGridView.ColumnGroups>
  <telerik:RadGridView.Columns>
               <telerik:GridViewDataColumn
Header="{Binding DataContext.ID, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}
DataMemberBinding="{Binding CID}" ColumnGroupName="CommonID"/>

</telerik:RadGridView.Columns>
</UserControl>

ViewModel
=========
public string ID {get; set;}

Model
=====
public string CID {get; set;}

Output
=======
RadGrid :
------------------------------------------
       CommonID // but i need E001 here  [Column Group Header]
-----------------------------
E001       // column header
------------
c101



The binding is not working for ColumnGroup header. I have faced the same issue on Column header, but it is resolved using Datacontext.ID,relativesource....and Data is showing properly

Can anyone help me out to resolve this ?


Sivakumar
Top achievements
Rank 1
 asked on 23 Jun 2013
1 answer
88 views
Here is what I've been given:  The logic is bound to the grid as a conditional formatting.  On the RowLoaded Event the logic will see if the equipment is in use already.  If it is, it marks the entire row red with white forground.  However there are two editable cells that must be marked readonly.  If not this form will fail the QA testing.

So with only the RowLoadedEventArgs being passed, how do I get to the object to bind to the edit event to bind an event handler that cancels any edit???
Michael
Top achievements
Rank 1
 answered on 21 Jun 2013
1 answer
337 views
I've seen in several forum posts (like here: http://www.telerik.com/community/forums/wpf/gridview/binding-to-cell-of-gridview-and-datacontext-says-datarow.aspx) that the Data Context for a cell is the entire object, not just the bound property. Is there a way to change this behavior so the data context is only what the column is bound to? We are binding to complex objects that are all the same type (called ValueWithFormat) and would like to set cell properties based on this type. Here's my example cell template.
<DataTemplate x:Key="ValueWithFormatCellTemplate">
        <Grid Background="{Binding BackgroundBrush}">
            <Border BorderBrush="{Binding BorderBrush}" BorderThickness="1">
                <TextBlock FontWeight="{Binding FontWeight}"
                           Foreground="{Binding ForegroundColor}"
                           Text="{Binding}"
                           ToolTip="{Binding ToolTip}" />
            </Border>
        </Grid>
    </DataTemplate>
Geoffrey
Top achievements
Rank 1
 answered on 21 Jun 2013
4 answers
176 views
I want to use FilteringControl(which appears on radgridview/radtreelistview coloumn filters) independently in my user control. Is it possible to use it independently, if yes can some one guide me with some examples...
Vamshi
Top achievements
Rank 1
 answered on 21 Jun 2013
3 answers
276 views
I just upgraded from the Q1 2013 WPF controls to Q2. I had already converted my app to the new DragDropManager and it was working. After upgrading however my drop handler was never called. My drop target is a RadTreeView, my source is a RadGridView (but I don't think that matters). In addition only certain nodes in my heterogeneous tree are drop targets. I register DragEnter/Leave and Drop handlers in the Loaded event for the data template of the valid tree nodes. Hence when a drag enters the valid node I update the visual cue, when it leaves I update it, and of course when you drop it handles the drop (or it did before Q2).  

After upgrading the drop handler was never called (although the DragEnter and Leave handlers worked fine). I tried all combinations of AllowDrop, IsDragDropEnabled, TreeViewSettings.DragDropExecutionMode = true, and everything else I could find. After MUCH experimentation I found that if I register a DragOver handler on the RadTreeView with exactly one line of code in it (e.Handled = true;) the Drop handler will get called. 

I am just curious if there is an easier way or if I missed something.

Regards
Dave Goughnour
Tina Stancheva
Telerik team
 answered on 21 Jun 2013
3 answers
139 views
Hello,
In my project I'm using a custom collection which derrives from ObservableCollection, ex. CustomGanttCollection : ObservableCollection<CustomGanttTask>
This gives me the possibility to add some extra methods...

The same way as I declared my CustomGanttCollection
, I declared my custom gantt task as: CustomGanttTask : GanttTask

Now I thought using my CustomCollection as the Collection where the ChildTask are stored in by overriding the Children property of GanttTask in my CustomGantTask like:

private <span style="font-size: 14px;">CustomGanttCollection _children</span><br>public <span style="font-size: 14px;">CustomGanttCollection Children<br></span>{<br><span class="Apple-tab-span" style="white-space:pre"> </span>get<br><span class="Apple-tab-span" style="white-space:pre"> </span>{<br><span class="Apple-tab-span" style="white-space:pre">       </span>return _children;<br><span class="Apple-tab-span" style="white-space:pre">   </span>}<br>}


Offcourse I do add some tasks in my ViewModel to the children...

Although this works (no compile errors, when I take a look at the Children property everything looks fine,...)  the GanttView Component won't show me the childtasks.

Is there a way that I can use my custom collection as the children's collection? The GanttView must be able to use the collection as it already uses one for the top-level tasks...
Kenny
Top achievements
Rank 1
 answered on 21 Jun 2013
10 answers
1.0K+ views
How do I set the ToolTip of a data cell to the content of the cell or at least to a string based content, if the cell has a string-based content?
This would be useful, if the cell width is to small to display the whole content.

I already have this style:

<Style x:Key="CellStyle1" TargetType="{x:Type tk:GridViewCell}">
                <Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Mode=Self}, Path=Content.Text}" />
            </Style>

(I have labels as content in all my cells).

This works in principle, but I always get lots of data errors in the debug window output, because there seem to be some automatically generated cells who don't have my Label in it.

"
System.Windows.Data Error: 40 : BindingExpression path error: 'Text' property not found on 'object' ''String' (HashCode=757206908)'. BindingExpression:Path=Content.Text; DataItem='GridViewCell' (Name=''); target element is 'GridViewCell' (Name=''); target property is 'ToolTip' (type 'Object')
"

Any way to get rid of these errors?

Is there a better way to set the ToolTip of data cells to the content of cells?

Thanks
ClausDC
Top achievements
Rank 1
Iron
Iron
Iron
 answered on 21 Jun 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
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
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
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?