Telerik Forums
UI for WPF Forum
1 answer
58 views
Is it possible to use BingGeocodeProvider without setting the .MapControl property? I'm using Prism with WPF and I want to be able to create the location for the map in the view model, and databind the RadMap control 'Centre' property to my view model 'MapLocation' property. Currently I get the following error.

System.Exception was unhandled
  Message=Routing Service Exception: Route Service Exception: Object reference not set to an instance of an object.
  Source=Telerik.Windows.Controls.DataVisualization
  StackTrace:
       at Telerik.Windows.Controls.Map.BingGeocodeProvider.GeocodeAsync(GeocodeRequest request) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\DataVisualization\Map\Providers\Geocode\BingGeocodeProvider.cs:line 88
       at DataAggregator.Modules.Cube.ViewModels.MapViewModel.RequestPersonalDataEvent(Person person)
       at Microsoft.Practices.Prism.Events.BackgroundEventSubscription`1.<>c__DisplayClass5.<InvokeAction>b__4(Object o)
       at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
       at System.Threading.ExecutionContext.runTryCode(Object userData)
       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
       at System.Threading.ThreadPoolWorkQueue.Dispatch()
       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
  InnerException:

Example XAML (with some bits removed to keep it simple)

 

 

 

 

<Grid>
    <telerik:RadMap x:Name="mapControl" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Provider="{Binding MapProvider}" Center="{Binding MapLocation}"/>
</Grid>

 

public class MapViewModel : ViewModelBase
   {
       const string _apiKey = "{key}";
       private readonly IEventAggregator _eventAggregator;
       private BingGeocodeProvider _geocodeProvider;
       private MapProviderBase _mapProvider;
       public MapProviderBase MapProvider
       {
           get { return _mapProvider; }
           set { _mapProvider = value; }
       }
       private Location _mapLocation;
       public Location MapLocation
       {
           get { return _mapLocation; }
           set { _mapLocation = value; this.RaisePropertyChanged(() => this.MapLocation); }
       }
         
       public MapViewModel(IEventAggregator eventAggregator)
       {
           _eventAggregator = eventAggregator;
           _eventAggregator.GetEvent<Infrastructure.RequestPersonalDataEvent>().Subscribe(this.RequestPersonalDataEvent, ThreadOption.BackgroundThread);
           _mapProvider = new BingMapProvider(MapMode.Aerial, true, _apiKey);
       }
       public void RequestPersonalDataEvent(Infrastructure.Models.Person person)
       {
           this.Working = true;
           _geocodeProvider = new BingGeocodeProvider(_apiKey);
           _geocodeProvider.GeocodeCompleted += this.geocodeProvider_GeocodeCompleted;
           GeocodeRequest request = new GeocodeRequest();
           request.Query = "Postcode";
           _geocodeProvider.GeocodeAsync(request);
       }
       private void geocodeProvider_GeocodeCompleted(object sender, GeocodeCompletedEventArgs e)
       {
           MapLocation = e.Response.Results[0].Locations[0]; 
           Working = false;
       }
   }
Andrey
Telerik team
 answered on 05 Apr 2011
1 answer
232 views
I want to Export All data from a RadGridView in a XML file but HOW TO ??????????
Please Help Me..
Vanya Pavlova
Telerik team
 answered on 05 Apr 2011
1 answer
109 views

Hi All!

 

I've created a DataGrid in "regular" WPF that supports groups and the items within a group are shown in a wrappanel. For this I could use the code below:

 

<DataGrid.ItemsPanel>
        <ItemsPanelTemplate>
               <WrapPanel IsItemsHost="True"/>
        </ItemsPanelTemplate>
</DataGrid.ItemsPanel>
Unfortunately it is way too slow for us. We would like to handle about a 1000 items and we are evaluating Telerik grid for that but I could not find a way to reproduce what I need. Each item should be represented with an image on the left, three lines of text on the right and a progress bar in the background. Grouping, sorting and filtering of items should be available (or at least not too complex to implement), hence the items source is a ListCollectionView. I did this in the original approach with a cell template and this works fine in both the "regular" DataGrid and in Telerik's GridView, but in the Telerik version I can't make the cell items appear next to each other.

 

 

The result should look something like this:

 

Group one:

  Item1 Item2 Item3 Item4

  Item5 Item6

Group two:

  Item7 Item8 Item9 Item10

Group three:

  Item11

 

So my questions:

Is there a way to access the gridview's ItemsPanel to do something similar, or are there any alternativse in the gridview?

 - OR -

Is there a more suitable control for this that can handle this many items and the result can look like the same?

 

Thanks in advance,

Istvan

Vlad
Telerik team
 answered on 05 Apr 2011
2 answers
132 views
I want to be able to create a button that when pressed will scroll the grid down to the next set of rows that were not visible. e.g. if the grid is showing 10 rows, pressing the button will scroll the grid down till row 11 is the top row.

I've tried using selecteditem but the grid doesn't focus on the row. Also is there a way to iterate through the rows to get their heights so I know which ones are visible or not?
Joshua
Top achievements
Rank 1
 answered on 04 Apr 2011
0 answers
85 views
I want to Extract all Data From RadGridView And Store into a DataTable.
Please Helppppppp
Md.Hasanuzzaman
Top achievements
Rank 1
 asked on 04 Apr 2011
1 answer
129 views
We have a user control which displays a NumericUpDown.  The maximum value of the control is set to 100.  When the user enters 200, the value automatically changes to 100.  When the user control is closed, the value of the NumericUpDown is reset to 200 which is an invalid value.  When the user control is reopened, an error appears next to the NumericUpDown control because it's value is really 200 even though 100 is displayed in the control.

We debugged the application.  The value of the NumericUpDown stays at 100 until [ExternalCode] is executed at which point the value of the control changes back to 200.
Valeri Hristov
Telerik team
 answered on 04 Apr 2011
1 answer
117 views
How can I make a set of RadRadioButtons such that their borders do not show until selected or moused over?

For example, see this image from the Word 2010 BackStage. The first item is selected. and when the user hovers the mouse over any item, its hover state is activated. Until then, no border or state is shown.
Petar Mladenov
Telerik team
 answered on 04 Apr 2011
14 answers
847 views
Is there a way to make the GridViewComboBox column update its backing property on change instead of on lost focus?  This is the default property for the combo box but does not appear to be the default in the grid view and setting the UpdateSourceTrigger in the DataMemberBInding to PropertyChanged does not appear to work.
Yavor Georgiev
Telerik team
 answered on 04 Apr 2011
1 answer
52 views
I'm using RadGridView hirarchy of version 2010_3_1110_Dev with the hotfix of 2010_3_1501_DEV_hotfix

There is 3 tabs inside the RowDetailsTemplate <DataTemplate
> and there is another RadGridView with insert panel enabled inside the tabs.

When I insert new row or update old data, it works fine for the first time and some times worjs for 2 or 3 times

But suddenly the keyboard stopped and I can not use the letters or numbers or Tab or Even enter.

I've searched long time and revised my code several times but nothing found.

I hope you can help.

Thanx
Yordanka
Telerik team
 answered on 04 Apr 2011
1 answer
338 views

I have several places in my application where I bind decimals to textbox controls. I have UpdateSourceTrigger=PropertyChanged so that my buttons attached to commands enable when a valid value is entered so the user does not have to click out of the textbox to enable the save button.

Problem 1: Lets say you have the value 24.05 in the text. Now place the cursor between the 4 and the decimal place holder. Backspace 2 times and type in the number 8. Instead of 8.05 you get 80.05. Our users are used to being able to type without looking and expect what they type to be correct.

Problem 2: Type in the value .234. Instead of .234 you get 0.342.

I know I could solve the problem by changing UpdateSourceTrigger=PropertyChanged to UpdateSourceTrigger=LostFocus but this will cause the user to have to tab out of the control or click inside of another control to enable the save button which defeats the purpose of Commanding.

Can I use the MaskedInput Control to fix this? I tried it with the example from your Sample Project under Masked TextBox -> NumericMask  labeled: "5 Digits after the decimal point" but that does not handle problem #1. If you don't have a control to handle this, do you know of a workaround for this?

Alex Fidanov
Telerik team
 answered on 04 Apr 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
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
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
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?