Telerik Forums
UI for WPF Forum
1 answer
60 views
I noticed the RadMap.ZoomLevel property is of type Int.  However, when I zoom from level 2 to 3, the map zooms in way too much.  Is there a way for the map to support a zoom level of 2.5?
Andrey
Telerik team
 answered on 08 Nov 2010
1 answer
66 views
Is this possible? To add locations to a route I am calculating, I need the lat/long as soon as I can get it to instantiate the location object.

Thanks,
Rod
Andrey
Telerik team
 answered on 08 Nov 2010
1 answer
97 views
I've recently noticed that if you select a node and one of it's child nodes, then you collapse and expand the parent node the child becomes unselected. When using the GridViewSelectColumn this is a bit of a problem. Anybody know a way around this behavior? My next move will be to stash the state of a node before it is collapsed and to restore that state upon expansion.

Thanks,

Corey
Milan
Telerik team
 answered on 08 Nov 2010
1 answer
82 views
I am changing some of the default styles for controls of the Gridview and am having good luck even though I am a newbie to Blend and the telerik controls.

I have a Grid view with a hierarchical grid. When presented there is a fairly wide gray border surrounding the hierarchical grid that I would love to change the color of but I can't figure out what control it is a part of. Where do I find it?

Thanks,
Stuart
Vanya Pavlova
Telerik team
 answered on 08 Nov 2010
1 answer
72 views
I have a spline curve and when I decrease the size of the scroll bar such that both ends meet together, I get an out of memory exception.

I have attached an image describing my scenario.
Ves
Telerik team
 answered on 08 Nov 2010
3 answers
165 views
Hi,

Is there any property in RadGridView which deals with

- Odd Rows style.

- Even Rows style.

-Selected Row style.

Thanks,
-Narendra

Veselin Vasilev
Telerik team
 answered on 08 Nov 2010
7 answers
166 views

Hello

Is there a way to search as you type in grid without using filter descriptors?

Best Regards

Ehud

 

Vlad
Telerik team
 answered on 08 Nov 2010
1 answer
321 views
Hi, 

I'm trying to bind the SelectedIndex or SelectedItem properties of the RadTabControl to my viewmodel, but it's not working. It seems as if the binding doens't exist on the property, even though it's clearly there in the XAML.

Trying the exact same scenario with the standard WPF tabcontrol works fine (exaclty the same XAML, only the typenames are different).

In other words, I cannot select a tab or find out what tab is selected without resorting to code behind. Since we're working in a MVVM scenario with no coupling between the view and the model (except for Databinding), this is not an option.

I have a zipfile with a project demostrating this.

Greetings,
Tom


Miro Miroslavov
Telerik team
 answered on 08 Nov 2010
3 answers
148 views
hi!

I developed a UserControl with a RadComboBox and RadMaskedTextBox, snippet code is like this:

<cl:ctlIdentificacionPersona
    xmlns:cl="clr-namespace:App_ControlLibrary"
    xmlns:tb="clr-namespace:App_EntityLibrary.Tablas;assembly=App_EntityLibrary"
    mc:Ignorable="d"
    x:Name="UserControl" Height="62" Width="368">
    <Grid x:Name="pnlBaseControl" RenderTransformOrigin="0.5,0.5" Margin="0,0,5,0" Height="59" VerticalAlignment="Top">
        <TextBlock x:Name="lblTipoDocumento" Text="{x:Static cl:resxIdentificacionPersona.lblTipoDocumento}" VerticalAlignment="Top" Height="21" Margin="5,4,170,0" Padding="68,2,0,5"/>
        <telerik:RadComboBox x:Name="cbxTipoDocumento" SelectedValuePath="CA001" DisplayMemberPath="CA002" IsEditable="False" HorizontalAlignment="Left" Margin="5,26,0,0" VerticalAlignment="Top" Height="27" Width="190" TabIndex="0"/>
        <TextBlock x:Name="lblNumeroDocumento" Text="{x:Static cl:resxIdentificacionPersona.lblNumeroDocumento}" Margin="199,4,0,0" VerticalAlignment="Top" Height="21" Padding="41,2,0,5" HorizontalAlignment="Left" Width="118"/>
        <telerik:RadMaskedTextBox x:Name="fmtNumeroDocumento" Margin="197,26,0,0" TabIndex="1" Mask="n0" MaskType="Numeric" HorizontalContentAlignment="Right" Height="27" VerticalAlignment="Top" HorizontalAlignment="Left" Width="120"/>
        <telerik:RadButton x:Name="btnBuscar" Margin="321,16,0,2" HorizontalAlignment="Left" Width="39" Background="{x:Null}" BorderBrush="{x:Null}">
            <Image Source="/App_ControlLibrary;component/Imagenes/Lupa.png" Stretch="Uniform" Height="35" Width="34" />
        </telerik:RadButton>
    </Grid>
</cl:ctlIdentificacionPersona>

into my main project I declared UserControl like this:

<Grid>
<cl:ctlIdentificacionPersona x:Name="ctrDatosPersona" Tag="TABLA_PRINCIPAL" Height="Auto" Margin="1,3.02,5,1.73" Width="Auto">
<cl:ctlIdentificacionPersona.ValorTipoDocumento>
   <Binding ElementName="grdGridConsulta" Path="SelectedItem.CA003" Mode="TwoWay" UpdateSourceTrigger="Explicit" Converter="{StaticResource ConvertidorGeneralValores}">
      <Binding.ValidationRules>
        <cl:ReglaDatoRequerido MensajeError="{lr:RecursoIdioma IDRecurso=msjErrorDatoRequeridoTipoDocumento, TipoRecursoIdioma=PADRE}" ValidationStep="ConvertedProposedValue"/>
      </Binding.ValidationRules>
   </Binding>                                      
</
cl:ctlIdentificacionPersona.ValorTipoDocumento>
<cl:ctlIdentificacionPersona.ValorNumeroDocumento>
   <Binding ElementName="grdGridConsulta" Path="SelectedItem.CA004" Mode="TwoWay" UpdateSourceTrigger="Explicit" Converter="{StaticResource ConvertidorGeneralValores}">
     <Binding.ValidationRules>
        <cl:ReglaDatoRequerido MensajeError="{lr:RecursoIdioma IDRecurso=msjErrorDatoRequeridoNumeroDocumento, TipoRecursoIdioma=PADRE}" ValidationStep="ConvertedProposedValue"/>
     </Binding.ValidationRules>
   </Binding>
</cl:ctlIdentificacionPersona.ValorNumeroDocumento>
</cl:ctlIdentificacionPersona>
</Grid>

I declared 2 dependency properties into My UserControl named ValorTipoDocumento and ValorNumeroDocumento in this way:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Data;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.ComponentModel;
using System.Configuration;
 
using Telerik.Windows.Controls;
using Telerik.Windows.Controls.MaskedTextBox;
 
using Kernel.Recursos;
using App_EntityLibrary;
using App_EntityLibrary.Tablas;
using System.Event;
 
namespace App_ControlLibrary
{
    public class ctlIdentificacionPersona : UserControl
    {
        #region Variables
 
        private RadComboBox cbxTipoDocumento;
        private RadMaskedTextBox fmtNumeroDocumento;
        private RadButton btnBuscar;
 
        ....
          
        public static readonly DependencyProperty ValorNumeroDocumentoProperty = DependencyProperty.Register("ValorNumeroDocumento", typeof(object), typeof(ctlIdentificacionPersona), new FrameworkPropertyMetadata(new PropertyChangedCallback(ValorNumeroDocumentoPropertyChanged)));
 
        [Description("Valor contenido en el Número de Documento")]
        public object ValorNumeroDocumento
        {
            get { return GetValue(ValorNumeroDocumentoProperty); }
            set { SetValue(ValorNumeroDocumentoProperty, value); }
        }
 
        public static readonly DependencyProperty ValorTipoDocumentoProperty = DependencyProperty.Register("ValorTipoDocumento", typeof(object), typeof(ctlIdentificacionPersona), new FrameworkPropertyMetadata(new PropertyChangedCallback(ValorTipoDocumentoPropertyChanged)));
 
        [Description("Valor Seleccionado en la lista")]
        public object ValorTipoDocumento
        {
            get { return GetValue(ValorTipoDocumentoProperty); }
            set { SetValue(ValorTipoDocumentoProperty, value); }
        }
 
        ...
 
        public ctlIdentificacionPersona()
        {
            InitComponents();
            cbxTipoDocumento = (RadComboBox)this.FindName("cbxTipoDocumento");
            fmtNumeroDocumento = (RadMaskedTextBox)this.FindName("fmtNumeroDocumento");
            btnBuscar = (RadButton)this.FindName("btnBuscar");
        }
 
 
 
         private static void ValorNumeroDocumentoPropertyChanged(DependencyObject source, DependencyPropertyChangedEventArgs e)
        {
            (source as ctlIdentificacionPersona).ActualizarValorNumeroDocumento(e.NewValue);
        }
 
private void ActualizarValorNumeroDocumento(object value)
        {
            fmtNumeroDocumento.Value = value;
        }
 
        private static void ValorTipoDocumentoPropertyChanged(DependencyObject source, DependencyPropertyChangedEventArgs e)
        {
            (source as ctlIdentificacionPersona).ActualizarValorTipoDocumento(e.NewValue);
        }
 
private void ActualizarValorTipoDocumento(object value)
        {
            cbxTipoDocumento.SelectedValue = value;
        }
 
...
}

I hope so far It could have be understood!! I try to make clear at the most.

I bounded my UserControl to the radGridView by using the two properties I created to refelct changes in both way. 

Note: <Binding ElementName="grdGridConsulta" Path="SelectedItem.CA003" Mode="TwoWay" AND
<Binding ElementName="grdGridConsulta" Path="SelectedItem.CA004" Mode="TwoWay"

When I navigate into RadGridView (I mean, selectedItemChanged is fired), UserControl reflects the changes in right way (I mean radComboBox and radMaskedTextBox). PROBLEMS begin when I select other item into radComboBox and I change text into radMaskedTextBox, and I try to update source data in RadGridView, by using:

ctrDatosPersona.GetBindingExpression(ctlIdentificacionPersona.ValorTipoDocumentoProperty).UpdateSource();
ctrDatosPersona.GetBindingExpression(ctlIdentificacionPersona.ValorNumeroDocumentoProperty).UpdateSource();

Data are null. RadGridView shows empty data into corresponding cells. I try to do a trace and ctrDatosPersona doesn't return selected values and text changed, in fact, returns  {} for ValorTipoDocumento and nothing for ValorNumeroDocumento. The way I realized about this was by tracing ValidationRules values.

I don't know how to do to radGridView reflects changes from my UserControl.

It's urgent, any helps I appreciate



ENTERPRISE INTERNATIONAL SAS
Top achievements
Rank 1
 answered on 06 Nov 2010
2 answers
179 views
Hi!

I have a details panel that show item selected from radgridview. Main DataContext = DataTable.DefaultView named VistaDatos. GridView is like this:

<telerik:RadGridView x:Name="grdGridConsulta" IsSynchronizedWithCurrentItem="True" ItemsSource="{Binding VistaDatos}" Margin="21,15.675,18,23" ShowGroupPanel="False"
                     HorizontalAlignment="Stretch" VerticalAlignment="Stretch" AutoGenerateColumns="False" ColumnWidth="Auto" IsReadOnly="True"
                     Style="{StaticResource Estilo1GridView}"
                     SelectionChanged="grdGridConsulta_SelectionChanged">
    <telerik:RadGridView.Columns>
        <telerik:GridViewDataColumn Header="{x:Static resx:resxUsuarios.lblID}" DataMemberBinding="{Binding CA001, Mode=TwoWay}" UniqueName="CA001" HeaderCellStyle="{StaticResource GridViewHeaderCellStyle1}" HeaderTextAlignment="Center"/>
        <telerik:GridViewDataColumn Header="{x:Static resx:resxUsuarios.lblNivel}" DataMemberBinding="{Binding CA006, Mode=TwoWay}" UniqueName="CA006" HeaderCellStyle="{StaticResource GridViewHeaderCellStyle1}" HeaderTextAlignment="Center"/>
        <telerik:GridViewDataColumn Header="{x:Static resx:resxUsuarios.lblNivelDescrip}" DataMemberBinding="{Binding CA006_DESCRIPCION, Mode=TwoWay}" UniqueName="CA006_DESCRIPCION" HeaderCellStyle="{StaticResource GridViewHeaderCellStyle1}" HeaderTextAlignment="Center"/>                            </telerik:RadGridView.Columns>
</telerik:RadGridView>

In details panel I have some controls, most important this:

<TextBlock x:Name="lblNivel" Text="{x:Static resx:resxUsuarios.lblNivel}" Style="{StaticResource Estilo1Etiqueta}" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="20,119.953,0,0" Padding="3,5,0,5" Height="27" Width="109"/>
<telerik:RadComboBox x:Name="cbxNivel" Tag="TABLA_PRINCIPAL" SelectedValuePath="CA001" DisplayMemberPath="CA003" ItemsSource="{cl:ColeccionItems IdOrigenDatos={x:Static sp:Publicos.CN_SIS_ESTADOS}, TipoAcceso=StoredProcedure, Parametros={StaticResource ParametrosSpNivelesUsuario}}" EmptyText="{x:Static kernel:resxMensajes.msjSeleccione}" Validation.ErrorTemplate="{StaticResource PlantillaErrores}" IsSynchronizedWithCurrentItem="True" IsEditable="False" TabIndex="3" HorizontalAlignment="Stretch" Margin="133,119.953,119,0" VerticalAlignment="Top" Height="27">
                                <telerik:RadComboBox.SelectedValue>
                                    <Binding ElementName="grdGridConsulta" Path="SelectedItem.CA006" Mode="TwoWay" UpdateSourceTrigger="Explicit">
                                        <Binding.ValidationRules>
                                            <cl:ReglaDatoRequerido MensajeError="{lr:RecursoIdioma IDRecurso=msjErrorDatoRequerido, Parametro={Binding Text, ElementName=lblNivel}, TipoRecursoIdioma=GLOBAL}"/>
                                        </Binding.ValidationRules>
                                    </Binding>
                                </telerik:RadComboBox.SelectedValue>
</telerik:RadComboBox>

ItemsSource code is CA001, ItemsSource Description si CA003 in radComboBox,  When I Update source radgridView, binding works fine, but I don´t know how to do to udpate description or text from radComboBox to this gridViewDataColum: 

<telerik:GridViewDataColumn Header="{x:Static resx:resxUsuarios.lblNivelDescrip}" DataMemberBinding="{Binding CA006_DESCRIPCION, Mode=TwoWay}" UniqueName="CA006_DESCRIPCION" HeaderCellStyle="{StaticResource GridViewHeaderCellStyle1}" HeaderTextAlignment="Center"/>

I tried something like this:

<telerik:RadComboBox x:Name="cbxNivel" Tag="TABLA_PRINCIPAL" SelectedValuePath="CA001" DisplayMemberPath="CA003" ItemsSource="{cl:ColeccionItems IdOrigenDatos={x:Static sp:Publicos.CN_SIS_ESTADOS}, TipoAcceso=StoredProcedure, Parametros={StaticResource ParametrosSpNivelesUsuario}}" EmptyText="{x:Static kernel:resxMensajes.msjSeleccione}" Validation.ErrorTemplate="{StaticResource PlantillaErrores}" IsSynchronizedWithCurrentItem="True" IsEditable="False" TabIndex="3" HorizontalAlignment="Stretch" Margin="133,119.953,119,0" VerticalAlignment="Top" Height="27">
    <telerik:RadComboBox.SelectedValue>
        <Binding ElementName="grdGridConsulta" Path="SelectedItem.CA006" Mode="TwoWay" UpdateSourceTrigger="Explicit">
            <Binding.ValidationRules>
                <cl:ReglaDatoRequerido MensajeError="{lr:RecursoIdioma IDRecurso=msjErrorDatoRequerido, Parametro={Binding Text, ElementName=lblNivel}, TipoRecursoIdioma=GLOBAL}"/>
            </Binding.ValidationRules>
        </Binding>
    </telerik:RadComboBox.SelectedValue>
    <telerik:RadComboBox.Text>
        <Binding ElementName="grdGridConsulta" Path="SelectedItem.CA006_DESCRIPCION" Mode="TwoWay" UpdateSourceTrigger="Explicit"/>
    </telerik:RadComboBox.Text>
</telerik:RadComboBox>

but it doesn´t work.

Can you help me about this???

thanks
ENTERPRISE INTERNATIONAL SAS
Top achievements
Rank 1
 answered on 06 Nov 2010
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?