Telerik Forums
UI for WPF Forum
4 answers
312 views
I am having a grid inside a grid scenario, I am going to show code for hierarchical template, which is cut to essential parts (and showing only two columns):

<telerik:RadGridView.HierarchyChildTemplate>
    <DataTemplate>
        <telerik:RadGridView AutoGenerateColumns="False"
                               IsSynchronizedWithCurrentItem="True"
                               ItemsSource="{Binding Items}"
                               RowStyleSelector="{StaticResource CycleActivityProductRowStyleSelector}">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Speed}"
                           Header="Speed" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Output}"
                           Header="{Binding Output}" />
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
    </DataTemplate>
</telerik:RadGridView.HierarchyChildTemplate>

This grid is binded to a collection of items, which is a property on the entiy from the main grid (remember this is a grid inside hierarchical template). Each item has a property Type. Based on the type I am painting the row using RowStyleSelector. So far no problems. Now I need to have different cell style / template based  on the item Type.

Item name:             Speed:         Output:
Item 1                      50                1000            Type.A
Item 2                                            300            Type.B
Item 3                      25                  600            Type.A

As you can see, I do not want even show the value for Speed column for Type.B (currently it is showing 0). Also, Speed column is editable for TypeA items, should not be for Type.B items

What is the cleanest / best way to achieve this?

Regards,
Goran
Maya
Telerik team
 answered on 20 Aug 2012
1 answer
65 views
We have a custom lookup column that performs searches after the user has typed a few characters and paused. It is easy to do this synchronously, since it is simply a matter of overriding GetNewValueFromEditor() and returning the value. Unfortunately this doesn't provide an easy way for us to implement an asynchronous search and update of the cell. We need to allow users to perform a partial edit and then move on to other cells while the asynchronous search/update of the previous cell proceeds.

It's a subclass of GridViewDataColumn, so I have access to BindingTarget and DataMemberBinding. I could spawn from GetNewValueFromEditor() an async delegate that performs the lookup and uses BindingTarget and DataMemberBinding to set the value. Do you see any problems with this approach? Any suggestions on how to better address this?
Nedyalko Nikolov
Telerik team
 answered on 20 Aug 2012
3 answers
159 views
When a row is selected using row.IsSelected = true;  The selection changes in the gridview, but the row indicator does not change.  Is there a way to force the row indicator to change?  I do have IsSynchronizedWithCurrentItem = true.
Vlad
Telerik team
 answered on 20 Aug 2012
1 answer
143 views
Hi,

I have been trying to implement drag and drop from a treeview to a gridview using DragDropManager. It looks like I got it to working, with a drag cue created from a datatemplate defined in treeview resources in DragInitialize event fired by the treeview. What I would like to do, is to change the dragcue when the mouse enters inside the borders of the gridview, and switch it back when it leaves the gridview borders.

I went through the BugTracker demo source, and this concept has been done by creating a template, and controlling the image path and other textblocks with a binding property. Is this the only way to accomplish this? Is it possible to define two different datatemplates and select the appropriate one in the DragEnter and DragLeave event of the gridview?

Can someone please clarify? A small sample code would help a lot.

Thanks.
Dimitrina
Telerik team
 answered on 20 Aug 2012
1 answer
258 views
Hi,

In your MVVM binding example from the Demos you create tabs using data templates. If you add desrtructor for TabViewModel, it will not fire until application is closed, even if you call GC.Collect(). Why is this happening and what is holding the resources from being freed.

If you fo the same for the regular view, and close it, destructor for ViewModel will fire normally.

The example I am referring is called DataBinding, under TabControl.

Regards,
Goran
Hristo
Telerik team
 answered on 17 Aug 2012
5 answers
180 views
Hi,
From your demo project I change the background but...

<pivot:QuickStyle.HeaderRow>
                            <pivot:ElementProperties Background="#FF683C20" BorderThickness="0 2" BorderBrush="#FF472816" />
                        </pivot:QuickStyle.HeaderRow>

This is dark background. Not see how to add something like a Foreground="White"  to have a white color on the text over dark background?

Same for Columns, Totals, Subs... etc...

Regards,
Saykor
Rosen Vladimirov
Telerik team
 answered on 17 Aug 2012
2 answers
212 views
I have noticed a severe performance issue when adding a GridViewImageColumn to my GridView. Scrolling gets very sluggish. I'm using
DataMemberBinding="{Binding ImageUrl}"
and the actual value is ../images/warning.ico. The same happens with other formats like png as well. Any suggestions on improving the performance?

Geoffrey
Top achievements
Rank 1
 answered on 17 Aug 2012
1 answer
160 views
Is there a simple way to increase the width on a metro themed scrollbar?
Yoan
Telerik team
 answered on 17 Aug 2012
1 answer
136 views

I have written this simple lines of code



But i keep getting the same error, I recently installed RadControls for WPF Q2 2012 SP1, I've added the DLL's needed.
Not sure if I'm retarded, but I can't find the solution atm.



Error





Regards
Joachim
Todor
Telerik team
 answered on 17 Aug 2012
5 answers
159 views

I am using the RadGridView to display system events. As new events are observed they are added to the grid's data context. After the data context grows to a particular number of items the oldest items begin to be removed as new items are added. This creates a constantly scrolling view of the items after it reaches maximum size. The number of events occurring in the system make this view unreadable. To correct this problem the visible rows of the grid should be fixed if the scroll bar is not at position zero. Any suggestion on how I could accomplish this would be appreciated.

Thanks,

Matt

Vlad
Telerik team
 answered on 17 Aug 2012
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
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?