Telerik Forums
UI for WPF Forum
4 answers
846 views
Hello,

I am using the MVVM pattern.  I have a GridView on a usercontrol that has the datacontext set to a viewmodel.  The viewmodel contains an ObservableCollection of model objects that are bound to the ItemsSource of the GridView.  My GridViewDataColumn.Header properties are bound to some properties in the viewmodel and everything works as expected.  The Header values are genrated dynamically and dispalyed properly through the binding.  When I add a DataMemberBinding to a GridViewDataColumn and bind it to a property from the object collection, I get unexpected Header value.  The Header will display the value "SourceName".  This only happens when the SourceName property exists on the model object and a successful binding is created for the DataMemberBinding property.  If I put in a value such as SourceNameTest, the Header is displayed correctly.  Here is a snippet of one of the columns in question.  As you can see it is a very simple column definition.  Could you please help me understand if there is way to accomplish what I am trying to do.

<telerik:GridViewDataColumn DataMemberBinding="{Binding SourceName}" Header="{Binding SourceObjectHeader}" >
Thanks,

Jason

 

 

 

 

Jason
Top achievements
Rank 1
 answered on 10 Aug 2011
1 answer
150 views
I have had installed the trial version of your WPF controls and then installed the licensed version but I am still getting the Trial message box.Is there anything I can do in order to get rid of this message box?
Andrey
Telerik team
 answered on 10 Aug 2011
8 answers
148 views
I'm using Entity Framework 4.0 and have a "Players" class.  Bone-stock, nothing added or changed, just as VS2010 generated it, which means it's an ObjectSet.

If, in my _Loaded event I do this:
  • CollectionViewSource myCollectionViewSource = (CollectionViewSource)this.Resources["playersViewSource"];
  • myCollectionViewSource.Source = this.DbContext.Players;

I can click to add a new row, update existing items, etc.  I can't click on row headers to sort them, though.


If I do this:
  • myCollectionViewSource.Source = this.DbContext.Players.ToList();

then I can sort/and add a new row, but dbContext.SaveChanges() doesn't have any effect.

I'm new to both EF and the RadGridView, so I'm not sure what the problem is.  I'd like to be able to both update and sort.  How do I do this?

Thanks.

Vlad
Telerik team
 answered on 10 Aug 2011
2 answers
159 views
Hello,

I was wondering if the WPF GridView has the same pinning functionality as the WinForms gridview documented here: http://www.telerik.com/help/winforms/gridview-rows-pinned-rows.html

I didn't see anything in the WPF samples and the WinForms code doesn't work for WPF.


Thanks,
Derek
Derek
Top achievements
Rank 1
 answered on 09 Aug 2011
6 answers
232 views
Hi Telerik team,

Thanks for the reply. It's working now.

One final question I have right now, Please respond.

Can we measure the openstreemap means you click on some points and it draws a poly line and during that time it shows the length of that polyline in meters / feet.

Please let me know if it possible or not?

If you have some sort of sample code please pass over it.

Thanks for your help.
Vivek,
Vivek
Top achievements
Rank 1
 answered on 09 Aug 2011
2 answers
177 views
I have a RadRibbonComboBox in a RadRibbonTab in a RadRibbonBar.  Looks something like this:

<telerik:RadRibbonBar>
    <telerik:RadRibbonTab Header="Tab 2" x:Name="Tab2">
        <telerik:RadRibbonGroup Header="Select an item">
            <StackPanel Orientation="Vertical" Margin="0,5,0,0">
                <telerik:RadRibbonComboBox Name="myComboBox" Margin="0,5,0,0" >
                    <telerik:RadRibbonComboBoxItem Content="New Item..." Selected="NewItem_Selected"></telerik:RadRibbonComboBoxItem>
                </telerik:RadRibbonComboBox>
            </StackPanel>
        </telerik:RadRibbonGroup>
    </telerik:RadRibbonTab>
</telerik:RadRibbonBar>

I have defined three different Data Templates in the resources like this:

<UserControl.Resources>
    <DataTemplate x:Key="EmptyTemplate1">
        <TextBlock FontStyle="Italic" Text="Select a value from the list" />
    </DataTemplate>
    <DataTemplate x:Key="EmptyTemplate2">
        <TextBlock FontStyle="Italic" Text="There are no selections at this time" />
    </DataTemplate>
    <DataTemplate x:Key="EmptyTemplate3">
        <TextBlock FontStyle="Italic" Text="Please complete the first tab before selecting" />
    </DataTemplate>
</UserControl.Resources>

I want to use a specific Data Template for the EmptySelectionBoxTemplate depending on various conditions.  Therefore, I want to set the EmptySelectionBoxTemplate in code.  I have tried setting the template like this:

myComboBox.EmptySelectionBoxTemplate = (DataTemplate)FindResource("EmptyTemplate1");

The resource is found, and appears to be set in the combo box, but the display does not get altered.  I also tried invalidating the property and visual state:

myComboBox.InvalidateProperty(RadComboBox.EmptySelectionBoxTemplateProperty);
myComboBox.InvalidateVisual();

Invalidating did not help.  The combo box selection is -1, and if I set the EmptySelectionBoxTemplate in XAML, the box displays the message correctly.

What is the correct way to change this template in code?
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
 answered on 09 Aug 2011
1 answer
248 views

Hi Team Telerik,

 

 

   RadRichtextBox property  IsSpellCheckingEnabled is set to True ,but it is not working properly .All lowercase letters are getting  marked   as  having spellerror and for uppercase letters spellerror is not getting marked.

Code:-

 

 

 

RichTextBox1.IsSpellCheckingEnabled =True
RichTextBox1.Language = Markup.XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.Name)

 

 

 

 

 

 

 

 

 

Iva Toteva
Telerik team
 answered on 09 Aug 2011
1 answer
169 views
Is there any possibility to pin/unpin rows or columns in the datagridview for WPF? I am highly looking for somehting like that and I thought due to the fact that you have somehting in for WinForms that it is also in for WPF.

I'd really like to know how to pin records in WPF. can you suggest somehting?
Thanks
Ivan Ivanov
Telerik team
 answered on 09 Aug 2011
6 answers
130 views
Hi,

I'm creating facility to jump to a specific selection (think of a calendar which has a "Today" button to jump immediately to a specific date). This facility changes both the SelectionStart and SelectionEnd properties in two separate operations, however this causes the SelectionChanged event to be triggered twice, once for each operation. Can an "AddSelection(start, end)" method be included change both properties in one operation and only trigger the SelectionChanged event once? (Similar events could be added for VisiblePeriod and Period). I've based this request on a similar AddRange method for the RadChart control that allows the minimum, maximum and step properties to be changed in one operation.

Kind regards,
Dave.
David
Top achievements
Rank 2
 answered on 09 Aug 2011
1 answer
265 views
Hi all, I have Docking with different RadPane in it. Each RadPane have different functionality that spawns a worker thread to get information, I would like to be able to stop the worker thread if the RadPane is not visible. 

I cannot seem to find an event that I can attached to watch this behavior. Any suggestions? I tried watching loading, unloading of rad pane but that does not work since switching tabs in the docked state does not trigger these events.

Any suggestions?
Konstantina
Telerik team
 answered on 09 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
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?