Telerik Forums
UI for WPF Forum
11 answers
2.3K+ views
I have a WPF radgridview with the first column being GridViewCheckBoxColumn. I have templated the header

        <telerik:RadGridView x:Name="WiresGV" AutoGenerateColumns="False" Grid.Row="1" ItemsSource="{Binding Wires}" ShowGroupPanel="False" ShowInsertRow="True" AlternateRowBackground="OliveDrab" clr:XWireAppCommands.DataGridDoubleClickCommand="{Binding TarunCommand}">
            <telerik:RadGridView.Columns>
                <telerik:GridViewCheckBoxColumn DataMemberBinding="{Binding IsSelected}" Name="CBCol" AutoSelectOnEdit="True" IsFilterable="False" Width="60">
                    <telerik:GridViewCheckBoxColumn.Header>
                                <CheckBox Content="Select" Name="HeaderItem" Click="Button6_Click" Foreground="White"></CheckBox>
                    </telerik:GridViewCheckBoxColumn.Header>
                </telerik:GridViewCheckBoxColumn>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding WireDate}" Header="Date" DataFormatString=" {0:dd, MMM, yyyy}" />
 
 
.....
When the user click on the checkbox in the header i want to udpate all checkboxes in the rows to checked or unchecked. I am trying to do that with this code by "cb is always nothing". Pls advise
For Each row As GridViewRow In Me.WiresGV.ChildrenOfType(Of GridView.GridViewRow)()
 
    If (TypeOf row Is GridViewNewRow) Then
        Continue For
    End If
 
    Dim cb As CheckBox
    cb = row.Cells(0).ChildrenOfType(Of CheckBox)().FirstOrDefault
      cb.IsChecked = True
 
 
Next

Pavel Pavlov
Telerik team
 answered on 17 Aug 2011
1 answer
167 views
I noticed in your watermark example, any change isn't saved on the undo stack.

Is there a way on a custom tool you can programmically add to the undo stack?

Thanks

-Matt
Iva Toteva
Telerik team
 answered on 17 Aug 2011
4 answers
136 views
I am new to the WPF RadGridView and have a simple question.   I need to implement a search which looks at all columns of all rows in a bound, virtualized,  WPF RadDataGrid.   After discovering that the "ChildrenOfType<GridViewRow>()" function only returns a list of visible rows,  I searched this forum for an appropriate technique.  

I say one technique involving the RadGridView's "Records" property.   The current RadGridView does not have a "Records" property.

I also saw a couple of hits recommending searching the underlying bound data source instead of searching the actual grid rows.   That's easy enough.

But once I find the desired row in the underlying bound data (in this case an ObservableCollection<T>), how do I determine the matching grid row - and move it into the visible set on the user's screen - in a way that still works if the grid is sorted in a different order from the underlying bound data source?  

Thanks!
-Bob
BRiddle
Top achievements
Rank 1
 answered on 17 Aug 2011
6 answers
189 views
I have a radgridview displaying in the rowdetail of another radgridview. a list of sublists. this works nicely. now i want to make sure that the columns of the sublists are all synchronised. to do this, i was thinking of registering the loaded inner lists and using the changing/changed events of the columns. I am currently still having difficulties, finding the right information within the events (changed column number, current width), but I am more concerned about other issues. how are these rowdetails handled, are they unloaded when closed? I guess i should then unregister the detail. what happens when scrolled out of visible area? as the radgridcontrol can handle a large amount of data, i can imagine i must take a few things into account i have not yet thought about.

<radgridview>
<RadGridView.RowDetailsTemplate>
<DataTemplate>
<radgridview ColumnWidthChanging="gridView_ColumnWidthChanging"
ColumnWidthChanged="gridView_ColumnWidthChanged"
Loaded="gridView_Loaded"/>
</DataTemplate>
</RadGridView.RowDetailsTemplate>
</radgridview>

I am fairly new to wpf and very new to the radcontrols, so be kind ;) ...
Vanya Pavlova
Telerik team
 answered on 17 Aug 2011
1 answer
118 views
Is there a way to fire the cellvalidating event when the cell is changed, instead of when it is commited? I want to validate after each character that the user enters into a cell. I thought setting to property changed instead of focus lossed would do it, but then the property is not really changed until it is commited is it..

Thanks!
Maya
Telerik team
 answered on 17 Aug 2011
3 answers
115 views
I would just like to know how many levels I can drill down to in a chart. I read something about a bug that only lets you define and use 2 or 3 objects of type ChartHierarchicalViewDescriptor, but that seems like it would only apply if you had a different data structure at each level of the drill down.

I'm binding a chart to data built from an self-join in a database, so each level is the same as the previous. Will I be able to create one ChartHierarchicalViewDescriptor that works for as many levels as I have?

Thanks!

Eric
Giuseppe
Telerik team
 answered on 17 Aug 2011
1 answer
100 views
Hi guys i'd like to know on how to add empty cells at the bottom of the grid where the the user can add. It could be textbox or combo box. THanks!


Ayana
Maya
Telerik team
 answered on 17 Aug 2011
7 answers
445 views
I am testing the demo version of the GridView control (Q2 2011 version) and by integrating it into my current project. I am running into an issue though, because my current implementation makes heavy use of TypeConverters to display data in WPF controls. To help explain my question, lets assume a couple of things:

First, we have a generic superclass called Super, which has a property that is an ObservableCollection<Super> which is called Stuff. 

In another assembly, we have some generated code that defines subclasses of Super, each with their own set of properties. Some of the properties of this subclass have custom type converters also defined in the same file (these type converters are automatically generated). For example:
public class Person : Thing
{
  [Browsable(true)]
  [TypeConverterAttribute(typeof(JobIDTypeConverter))
  public Int64 JobID
  {
    get; set;
  }
  private class JobIDTypeConverter : TypeConverter
  {
    public override bool GetStandardValuesSupported(ITypeDescriptorContext context)
    {
      return true;
    }
    public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
    {
      //jobIDDisplayNames is an array of strings
      return new StandardValesCollection(jobIDDisplayNames);
    }
    public override CanConvertFrom(...) { ... }
    public override ConvertTo(...) { ... }
    public override ConvertFrom(...) { ... }
  }
}

I abbreviated some of the methods but assume that they convert Int64s to Strings and vice-versa.

In addition, these subclasses fill the Stuff collection with some elements. Now, in my application we only refer to these subclasses by loading the assembly programmatically and using reflection.

When we pop up a GridView and bind it to the Stuff collection like so: 
RadGridView grid = new RadGridView();
grid.ItemsSource = mySuper.Stuff;
We get what we wanted to see, all the properties of the subclass are reflected on and columns are automatically generated for them. We can edit them and ones that were not Browsable don't show up, ones that are ReadOnly can't be edited, etc. The only downside is that our custom type converters do not appear to work, and in fact it seems that they are never called by the GridView. We know that the TypeConverter code does work, as we have used them with other WPF controls for quite some time now without issue.

We are willing to change the way we define our TypeConverters if necessary (given that the WPF PropertyGrid that you provide would also support the TypeConverters given the same change), but we can not feasibly change to using IValueConverters, as that only provides us with ConvertTo and ConvertFrom methods, and what we really want is to be able to use the StandardValuesCollection (or something similar) that TypeConverter provides us, to avoid writing a lot of extra code in order to handle this conversion ourselves.

I saw a thread that somewhat pertained to this issue here, which claimed that TypeConverter support was added in the latest release but the author never wrote back to confirm if the changes worked for him or not. Please let me know what steps we should take to solve this issue. We are very interested in purchasing your product because everything else about the GridView seems to work perfectly for us, but this is a problem which must be solved. Thanks in advance.
Evan
Top achievements
Rank 1
 answered on 16 Aug 2011
3 answers
115 views
Hi all
RadColorPicker does not work fine in the collasped state of RadRibbonGroup.
Thanks
Deepak
Petar Mladenov
Telerik team
 answered on 16 Aug 2011
1 answer
375 views
I have an application menu with a RadRibbonDropDownButton(expands to the right). The content of the RadRibbonDropDownButton are a couple of RadRibbonButtons and then another RadRibbonDropDownButton(also expands to the right). In other words I have a RadRibbonDropDownButton within another RadRibbonDropDownButton.

This somehow makes the small arrow on the inner RadRibbonDropDownButton("direction arrow") to point downwards. I have tried to set the DropDownPlacement="Right" and the DropDownButtonPosition="Right" but still the direction arrow is pointing downwards... Shouldn't the the direction arrow be pointing right? Is this somehow a bug caused by the fact that I'm having one RadRibbonDropDownButton within another RadRibbonDropDownButton?
(I have also tried to replace the inner RadRibbonDropDownButton with a RadDropDownButton)

The "direction arrow" on the outer RadRibbonDropDownButton is correctly pointing to the right...

Petar Mladenov
Telerik team
 answered on 16 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
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?