Telerik Forums
UI for WPF Forum
5 answers
153 views
Hi Guys,

I have a WPF app which has a RadMap with 2 layers. The first layer is a dynamic layer which contains lots of MapPolygons loaded from shape files with the background colour set according to the metadata in the shape file. The second layer is an information layer with lots of MapPinPoints which sit on top of the shapes in the dynamic layer.

This app is going onto a ruggadised tablet and will be used in direct sunlight, and as such the users would like a good contrast between the text on the MapPinPoints and the MapPolygons they sit on top of. I've written the code to change the fonts and this works really well when I can get it to execute. The problem I have is trying to figure out when the dynamic layer has finished rendering so that it's .Items property actually has something in it and I can check which polygons a pinpoint falls into.
 
I have tried hooking into various events such as LayoutUpdated, SizeChanged, etc.. I even created my own event on the MapDynamicSource to notify me when the ItemRequest is complete, but the Items collection is still empty at this point...

Both layers change fairly regularly and so the Loaded event doesn't help me either because it only fires once.

If you need any more info please let me know, otherwise any help would be really appreciated.

Thanks,
Stuart
Andrey
Telerik team
 answered on 10 Aug 2011
1 answer
77 views
I'm using the latest version of the WPF controls and am trying to do a RadGridview->RadGridview drag and drop.  Unfortunately, all of the examples I've been able to find seem to be for a much older version of the Telerik tools, and contain references to properties that don't exist in the version I'm using.

Does anyone have a complete example (C#, ideally, but anything will do) that uses the current release of the Telerik controls showing how to drag and drop between two RadGridview controls?  Thanks.
Dimitrina
Telerik team
 answered on 10 Aug 2011
0 answers
143 views
Hi,

I would like to detect mouse click on each row in RadGridView. Here is my code sample:

private void ContactsGridViewRowLoaded(object sender, RowLoadedEventArgs e)
        {
            e.Row.MouseLeftButtonUp += delegate(object sender1, MouseButtonEventArgs e1)
                                             {
                                                 MessageBox.Show("click!");
                                             };
        }

The problem is that this event is never fired. I can change event to MouseRightButtonUp or even MouseEnter and it all works fine. Why i cannot subscribe to MouseLeftButtonUp?
Dan
Top achievements
Rank 1
 asked on 10 Aug 2011
1 answer
134 views

Hi,

I am working on WPF.\ and we are using telerik controls in our project.

we are implementing Expand all rows functionalaity in Telerik radgridview . In our radgridview few rows has childgrid and if we are using expandallhierarchyitems() method then it is expanding all rows. My requirment is when i click on expand all button then it shoud expand only those rows which have child grid control.

Vanya Pavlova
Telerik team
 answered on 10 Aug 2011
4 answers
881 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
162 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
174 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
174 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
253 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
200 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
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?