Telerik Forums
UI for WPF Forum
1 answer
105 views
Hello,

could somebody guide me how to bind chart to data from web services in WPF. It seems that standard WS binding is not working.

Thanks in advance.

F.
Giuseppe
Telerik team
 answered on 19 Mar 2009
3 answers
144 views
Hi,

I was looking through your documentation searching for a way to have RadGrid Checkboxes with bool columns (a thing the MS DataGrid does out of the box).

And by this is stumbled over the topic Insert/Update/Delete...Data Editors.
What I saw there was really interesting.
There is a sample for a ComboBox column.
No XAML at all - but interesting code behind.
ComboBoxEditorSettings comboBoxEditorSettings = new ComboBoxEditorSettings();  
       comboBoxEditorSettings.ItemsSource = GetCountries();  
       ((GridViewDataColumn) this.radGridViewEditors.Columns[2]).EditorSettings = comboBoxEditorSettings
.....Columns[2].EditorSettings....
This looks extreme like ASP.NET where I have to access some unnamed HTML things and change values.
I just think about the co worker who decides to change the column order for some reason :=

And what I see here (beside the unsafe and "design == extremely code bound" thing) looks like a windows form application where I had to do it this way.

The "XAML Way" would be a column whit some kind of a template (style, datatemplate, whatever) where the databinding is defined to some source.
This Is what I do, if I build something in "native XAML" (without third party controls).

For RAD controls I would expect - something like a "RadGridComboColumn".
Yes - I found something by accident - GridViewComboboxEditor.
I'm not sure if this is what I think about because the documentation is a bit short.
>>Represents ComboBox editor for GridViewCell

I'm (after the fun with editing) not willing to find this out by trial and error (I'm tired) - but maybe tomorrow I can find an example about it.

Regards

Manfred
Vlad
Telerik team
 answered on 19 Mar 2009
2 answers
104 views
Hi Guys,

After installing your lastest WPF demo on my machine. I am unable to run up the GridView demo, something to do SQL server not found,
This produced a 'fatal error!'

P
Paul Gallen
Top achievements
Rank 1
 answered on 19 Mar 2009
6 answers
186 views
Problem with single column binding. I am using RadtreeView binding it with XML (generated from web service on the fly) Like this:
...
webServices.WebService ws = new webServices.WebService();
this.trvNames.ItemsSource = ws.getNames();
...

my result row contains with 3 columns (NameId, Name, NameValue) and in tree view I see one value merged with 3 different values, I need that tree view will show me only Name. How to set to RadTreeView control to bind only from column / element Name value from code behind?.

Thanks in advance for a help.

F.
Forumai
Top achievements
Rank 1
 answered on 19 Mar 2009
1 answer
133 views
Hi,

I'm used to work with the keyboard - especially with multiple changes.

So I do what:
a.) Scroll to the row where I want to make changes - (selecting the cell of course with double click)
b.) Edit the value
c.) Press enter
d.) Press key down (optional MS Datagrid changes the cell / row on enter)
e.) Press F2
f.) Change the value
g.) Press enter.....
....
m.) Press F2
n.) Find out that I don't need to change (F2 was a mistake)
o.) Press Enter

Alternative Method (need to change different cells).
a.) Scroll to the row where I want to make changes - (selecting the cell of course with double click)
b.) Edit the value
c.) Press enter
d.) Press down key -- maybe multiple times
e.) Press left / right key to select the correct column
f.) Press F2
....

So - this was what's going on with the MS Datagrid.

What's with RadGrid?
a.) Scroll to the row where I want to make changes - (selecting the cell of course with double click)
b.) Edit the value
c.) Press enter
--works :)
d.) Press down key -- maybe multiple times
--new row gets selected
e.) Press F2 --- nothing happens - the focus rectangle moved to the header of the first column in the first row.

The only way to get it down from there (without mouse) is pressing tab (while the focus moves from cell to cell - after the last cell to the next row......)

The other thing:
m.) Press F2
n.) Find out that I don't need to change (F2 was a mistake)
o.) Press Enter
--nothing happens as long as you don't change the value in the cell.

WPF is mend to build client applications. FAST applications - the thing should make dataentry (in case of grid) easy.
Of course it is nice when it binds to XXXX Million records extremely fast.
---(I would more say if you bind to that much records you should rethink your application design :)).
But that helps nothing when editing cells means using the mouse instead of intuitive typing.

Of course these things could be handled via "Cell.EditEnded" code behind things - but that's not the reason why I buy third party controls. I do this because I want to have RAD.

Regards

Manfred
Pavel Pavlov
Telerik team
 answered on 19 Mar 2009
4 answers
370 views
I've been using various Telerik controls for a few years now. I've used the ASP.Net/Ajax controls, the WinForms Controls, the Reporting library, and now as my latest application is based on WPF, I've been trying out some of the WPF controls. I've been fairly happy with Telerik controls in the past on other platforms with minor exceptions here and there.

Using the WPF controls though, I find myself getting frustrated and not finding much use for them. I know WPF is still young, but somethings I'm running into that I would expect better results on are listed below.

1. The documentation is poor. Compared to other control sets here at Telerik, I often find myself unable to find how to do something other than by trial and error. The documentation samples are minimal and features are given very cursory overviews. Usually I end up having to just plop a control in my xaml and start playing with intellisense options to figure out anything.

2. DataBinding in WPF is much more powerful than in WinForms. However, it appears in many cases when building up the controls, Telerik had a very WinForms centric view. I've run into numerous occations where I have tried to bind a property only to be told I can't bind it because it's not a Dependancy Property. Unless there are very good reasons, I would expect most any property on a control to be a bindable dependancy property.

3. DataGrid - I see little reason to use the DataGrid instead of the DataGrid in the WPF Toolkit. The DataGrids in the other products are very rich and provide many reasons to use them over the stock Grid. Using the Telerik DataGrid in WPF it almost feels crippled when I can't help but compare it to the other products. Filtering is probably the biggest downside on this one. I know I can add in some custom filtering as per some of the examples, but in my opinion filtering should be the same across all platforms you offer. I had an idea on how I could restyle the header and include my own filter controls similar to the other products, but again, refering to number 2 above, I ran into some things I couldn't bind to. I'd also like to see not just for the DataGrid, but especially for the DataGrid a more "plain" theme choice.

4. Chart - The chart control has some severe limitations. The biggest being the inability to use strings as values. Probably the most basic chart is either a column or pie chart. In a column chart, the most common use is to show for a series of categories, different values. In almost all instances the categories are either strings or dates. By not allowing string values, it makes it hard/impossible to show a very basic chart. There is another post on this issue where it's described how in code behind you can reset the tick labels after binding or some such thing but that is a very smelly solution. In general the chart is not very friendly for declarative structure and binding. I should be able to describe in XAML how it should work and bind it to a collection and get the chart I want. Almost all examples show everything driven in code behind and I believe the reason is the xaml is either convoluted or in many cases not even possible. One of your examples is an MVVM example and I laughed when I saw it as it wasn't MVVM at all. You had a XAML file with a few bindings and a slew of code behind interacting with the GUI. The project I am working on is entirely MVVM and I have yet to find a reason to put code in the code-behind of a XAML file. There are always the exceptions where the code is truely just for the GUI and it makes sense and I'll likely have a small bit of codebehind when the project is finished but in general everything should be declarative and code/logic kept separate in the viewmodel. In the end, for now I'm using another company's chart control as it allows better MVVM support as well as string values.

5. Other controls - I haven't gotten to using any of the other controls yet as most seemed derivative of the standard controls with not much value add. It might in some cases save a bit of customizing the standard controls, but I have a feeling after using the controls I have used, I'd run into more issues/customizing than it would save.

In closing, I am still a fan of Telerik but can only really recommend their more mature toolkits. I was hoping for a lot more changes in 2009Q1 as I felt there had been enough time since the first WPF drops to mature the product.
Hristo Deshev
Telerik team
 answered on 19 Mar 2009
1 answer
158 views
Our code used to work before upgrading to March 09. 

  public SearchResultsPage(cRecordIndexObjectList[] recordIndexObjectList) 
        { 
            InitializeComponent(); 
 
            dt = new DataTable(); 
            General.ConvertRecordIndexObjectToTable(recordIndexObjectList, dt,null); 
 
            gvSearchResults.ItemsSource = dt
 
            // Hide the IsBold column 
            GridViewColumn columnBold = gvSearchResults.Columns["IsBold"]; 
            if (columnBold != null) 
                columnBold.IsVisible = false
 
            // Hide the RecordIndexObjectList object 
            GridViewColumn column = gvSearchResults.Columns["RecordIndexObjectList"]; 
            if (column != null) 
                column.IsVisible = false
 
            gvSearchResults.Visibility = Visibility.Visible; 
 
            lblTotal.Content = "Total Records: " + gvSearchResults.Records.Count; 
        } 

None of the columns are there and the count that I used to get on my last line is 0.

Can you please advise?

Nedyalko Nikolov
Telerik team
 answered on 18 Mar 2009
2 answers
141 views
Hello,

After upgrading to the latest version (2009.1.312.35) of the WPF Grid View my custom grid editor controls have stopped working, though they worked fine with the previous version (2008.3.1217.35).  I used ideas from a forum post to create a grid editor control that allows users to type in any value they want in the combo box so they're not restricted to just the values in the list.

Now whenever I double click to edit a cell using my custom editor control, the value gets cleared and the editor does not show up.  I have to click a third time to get the editor to appear and once it does it is blank because the value got cleared.  When I debug I can see that the DataContext is always null whereas with the previous version the DataContext was always populated with the object the row was bound to.

I can reproduce this behaviour in the ForeignKey sample project from the forum post that I linked to earlier by making the following changes.

Changed this:
            comboBoxEditor.GotFocus += ((sender, e) => 
            { 
                PersonType personType = (PersonType)((Field)this.DataContext).Value; 
                comboBoxEditor.SelectedItem = (from PersonType item in comboBoxEditor.Items 
                                               where item.PersonTypeID == personType.PersonTypeID 
                                               select item).FirstOrDefault(); 
            }); 

to this:





            comboBoxEditor.GotFocus += ((sender, e) => 
            { 
                var person = DataContext as Person; 
                if (person != null && person.PersonType != null
                { 
                    comboBoxEditor.SelectedItem = (from PersonType item in comboBoxEditor.Items 
                                                   where item.PersonTypeID == person.PersonType.PersonTypeID 
                                                   select item).FirstOrDefault(); 
                } 
            }); 

Notice how when you double click on a cell in the PersonType column, the value gets cleared.  Once you click a third time the editor will appear. 

(Please note that to get this sample project to work with the latest version of the grid I also had to change the editor settings properties to be regular properties because EditorSettings seems to no longer be a dependency object.)

I hope someone can help me with this problem.

Thanks,

Joel

JP
Top achievements
Rank 1
 answered on 18 Mar 2009
1 answer
111 views
Hi,

I had downloaded the latest DLLs in the RadControls for WPF (Version: 2009.1 312). The existing project has started giving some errors as follows:

1. The property 'IsHierarchyRoot' does not exist in XML namespace 'http://schemas.telerik.com/2008/xaml/presentation'

2. The type 'telerik:GridViewBackground' was not found.

3. The type 'telerik:NavigationPresenter' was not found.

Please Advice. Is there any new DLL that need to be referred?

Regards
Ashish Garg
Hristo Deshev
Telerik team
 answered on 18 Mar 2009
1 answer
64 views
Our MouseLeftButtonDown events no longer fire.  So we changed to MouseLeftButtonUp and that works.  Why doesn't MouseLeftButtonDown work anymore?
Pavel Pavlov
Telerik team
 answered on 17 Mar 2009
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
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?