Telerik Forums
UI for WPF Forum
2 answers
99 views
The example code uses a generated dbf file, but I need to get data at runtime based, for example "hugs per captia".

I get NaN in the legend when I tried the following code:

public partial class Example : UserControl
    {
        private bool initialized;
        private const string NonDbfDataField = "HugsPerCapita";
  
        public Example()
        {
            InitializeComponent();
            this.RadMap1.InitializeCompleted += new EventHandler(RadMap1_InitializeCompleted);
        }
  
        void RadMap1_InitializeCompleted(object sender, EventArgs e)
        {
            if (!this.initialized)
            {
                this.initialized = true;
                this.InformationLayer.Reader.PreviewReadCompleted += new PreviewReadShapesCompletedEventHandler(Reader_PreviewReadCompleted);
            }
        }
  
        private void Reader_PreviewReadCompleted(object sender, PreviewReadShapesCompletedEventArgs eventArgs)
        {
            if (eventArgs.Error == null)
            {
                foreach (MapShape shape in eventArgs.Items)
                {
                    this.SetAdditionalData(shape);
                }
            }
        }
  
        private void SetAdditionalData(MapShape shape)
        {
            ExtendedData extendedData = shape.ExtendedData;
            if (extendedData != null)
            {
                // add new property to ExtendedData  
                if (!extendedData.PropertySet.ContainsKey(NonDbfDataField))
                {
                    extendedData.PropertySet.RegisterProperty(NonDbfDataField, "", typeof(int), 0);
                }
  
                string country = (string)shape.ExtendedData.GetValue("ISO_2DIGIT");
                int additionalFieldValue = this.GetHugsByCountry(country);
  
                // assign value to new property  
                shape.ExtendedData.SetValue(NonDbfDataField, additionalFieldValue);
                  
            }
        }
  
        private int GetHugsByCountry(string stateName)
        {
            return 43 ; 
        }  
  
          
  
    }
Andrey
Telerik team
 answered on 02 May 2011
2 answers
156 views
Hello All,

   I like the way the default control in RadGridView works - AKA Telerik.Windows.Controls.GridView.FilteringControl.  However, I want to change one behavior; the application of the filter.  Basicly, I want to intercept the filter specified by the user and interpret it myself.  This way I can customize the behavior and keep the look and feel.  Can anyone advise me how to do this?

- Rashad Rivera
Rashad Rivera
Top achievements
Rank 1
 answered on 30 Apr 2011
1 answer
89 views
I'm looking for a way to detect if an appointment within the schedule view is being edited due to the user dragging the entire appointment.

How do I detect when the user is dragging an appointment (the whole thing, as opposed to dragging one of the appointment's end points)?

Thanks for your time.
Rebecca
Top achievements
Rank 1
 answered on 29 Apr 2011
0 answers
85 views
I added checkbox column using GridViewColumn in radgridview. I want this column to be checked by default for some rows when the view is loaded. How do I do this by iterating through the rows?
Raj
Top achievements
Rank 1
 asked on 29 Apr 2011
6 answers
157 views
In the included code sample, here, if a row has its rowdetails open then scrolling becomes almost impossible. This is because the vertical scroll bar always wants to snap back to a given place.

For instance, scroll to the bottom of the list, open the details, and try to scroll up.

I did notice when creating this that the tab control has something to do with the problem. Without the tab control, scrolling is slow, but not freaky.
Datafyer
Top achievements
Rank 1
Veteran
 answered on 29 Apr 2011
0 answers
141 views
Is there a sample GridView project that shows how to do add/edit/delete? 

The WPF demos that come installed with RadControls for WPF only seem to show a vanilla readonly GridView, or I don't understand how to get the demo to show a different example.

Thanks.
Dan
Dan
Top achievements
Rank 2
 asked on 29 Apr 2011
2 answers
120 views
Good evening,

I'm having difficulty with the RadRichTextBox SpellChecker feature. I'm using Telerik WPF 3.5 build 2011 Q1 v 2011.419.40 with vb.net 3.5 in VS2010.

Basically the RadRichTextBox in "Word Processing" mode works great, but the spellcheck solutions are blank. Every word I try comes up with a red underline, except for those that I added to the dictionary when I made an app in vs2008. The word 'my' for example is not recognised.
I did create a .net 3.5 app yesterday in VS2008 that used the spell checker feature in a standard telerik RichTextBox and that worked fine. I added two extra words to the dictionary and now they are the only words that are recognised.

Does anyone have any suggestions why this may be?

Thank you for your time,

Rob
Robert
Top achievements
Rank 1
 answered on 29 Apr 2011
1 answer
98 views
<telerik:RadialScale Name="radialScale" Min="0" Max="12" MajorTicks="12">
                    <telerik:IndicatorList>

For example the user should enter the numbers in

Min = 0

Max =400

MajiorTick=4

 

I dnt want them to be fixed throw the XML, so is it possible to make it using VB by creating a property and bind it or such a thing?

 

Thanks in advance


Andrey
Telerik team
 answered on 29 Apr 2011
1 answer
322 views
Where could I find some documentation about your RadRichTextBoxStatusBar?
Is there a way to show/hide the elements?
And what are the elements? I see a zooming-tool and a kind of document-view-modus.
Is there maybe a hidden "page-1-of-4"-label? A label with line- and position-info?
Where could I find a (wpf !) example?
I looked at the "word"-sample's RadRichTextBoxStatusBar but this one only has a few properties...

										
Boby
Telerik team
 answered on 29 Apr 2011
2 answers
247 views
Hi,
I want to programmatically move to next item in grid view.  (This is because user clicks a button that does numerous things then moves to next item).

Following code works, except when the grid view has a filter applied.  Then it doesn't work, if the next item is filtered out.
Is there anyway around this. It's as if the gridview moves to the filtered item and therefore doesn't select anything.

        Dim x = Me.RadGridView1.ItemsSource
        Dim z As System.Windows.Data.ListCollectionView = Me.RadGridView1.ItemsSource
        Dim intPos As Integer
        intPos = z.CurrentPosition
        Me.RadGridView1.SelectedItem = z(intPos + 1)

I've also tried z.MoveCurrentToNext (which has the same problem, works unfiltered, but doesn't work when filtered).
Dermot
Top achievements
Rank 1
 answered on 29 Apr 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?