Telerik Forums
UI for WPF Forum
1 answer
158 views
Hi,

Is there an easy way (without making a full template) to customise the insert row ?

I've set CanInsertRows and ShowInsertRow to true and ive got a row with the text  "Click here to add a new item" as the first row. I would prefer toe have an empty row at the end representing the new row...

  <trk:RadGridView x:Name="tblSanctDecisMed" Height="130"
             trkT:StyleManager.Theme="Windows7"
             AutoGenerateColumns="False"
             RowIndicatorVisibility="Visible"
             Width="682"
             Margin="10"
             HorizontalAlignment="Left"
             ScrollViewer.VerticalScrollBarVisibility="Visible"
             ReorderColumnsMode="None"
             ShowGroupPanel="false"
             ItemsSource ="{Binding Path=MembresEquipe}"
             CanUserDeleteRows="False"
             CanUserFreezeColumns="False"
             CanUserInsertRows="True"
             CanUserReorderColumns="False"
             CanUserSortColumns="True"
             ShowInsertRow="True"
             IsBusy="False"
             IsScrolling="False"
                      
                    
                      
        <trk:RadGridView.Columns>
              <trk:GridViewDataColumn Header="Matricule"
                          Width="125" 
                          DataMemberBinding="{Binding Path=NoMatricule}"
                          IsFilterable="False"
                          IsGroupable="False" />
              <trk:GridViewDataColumn Header="Nom/PrĂ©nom"
                          Width="*"
                          DataMemberBinding="{Binding Path=NomEmploye}"
                          IsFilterable="False"
                          IsGroupable="False"
                          IsReadOnly="True" />
              </trk:RadGridView.Columns>                  
</trk:RadGridView>
Vanya Pavlova
Telerik team
 answered on 09 Dec 2010
1 answer
232 views
Is this possible to put  <telerik:RadContextMenu.ContextMenu>  in  <ControlTemplate.Resources> and trigger Opened event of the context menu, if yes then please send the code.

Thanks
Amar
Hristo
Telerik team
 answered on 09 Dec 2010
1 answer
207 views
I am dynamically adding GridViewColumns in code and use a CellTemplateSelector to format the cells. That works. However, I would really like to just use AutoGeneratingColumns=True and still use the CellTemplateSelector mechanism. Is that possible? My attempts seem to indicate it is not. Thanks for any assistance on this.
Vanya Pavlova
Telerik team
 answered on 09 Dec 2010
5 answers
212 views
How can I overlay a transparent PNG on top of a RadMap (ESRI shapefile source) and have the shape mouse events trigger while it is underneath the overlaid image?

(Hint: I am overlaying a transparent PNG with labels for a US state's counties, which need to be rotated and such to fit the county shapes - hard to do with normal layer labels - my map is not zoomable, it is of a fixed size, I disabled zooming)

As you can imagine, many of the odd county shapes have geo centers that are actually living within another county's shape...makes it tough, so I thought of this approach.
Andrey
Telerik team
 answered on 09 Dec 2010
1 answer
93 views
ZoomLevel only accepts and int and the difference between two levels is pretty large (e.g. 7 and 8 for the State shapefiles in the demos. Is there a way I can fake that in code somehow, I need just a little more zoom, not the huge zoom that going from 7 to 8 gives me?

Also, when adding labels to counties on a state map, the Location of GeographicalBounds.Center is often not desirable since it sometimes is not even within the same county as a result of oddly shaped counties. How can I tweak the Location placement when doing MapLayer.SetLocation(lblCounty, shape.GeographicalBounds.Center)?

Lastly, thanks for giving me this code a few weeks ago, but I have one more problem with it. The HotSpot makes my mouseover tooltip not work when the mouse is over the HotSpot - very confusing behavior for a user. How can I fix that? I've tried a few things, but can't seem to get it.

The code:
foreach (MapShape shape in this.InformationLayer.Items)
{
    string name = (string)shape.ExtendedData.GetValue("NAME");
    TextBlock lblCounty = new TextBlock();
    //lblCounty.Text = name.Substring(0, 2);
    lblCounty.Text = name;
    lblCounty.FontFamily = new FontFamily("Arial");
    lblCounty.FontSize = 9.5;
 
    if (name.ToLower().Equals("perry"))
    {
        RotateTransform rotateTransform;
        double newRotation = -20.00;
        rotateTransform = new RotateTransform(newRotation);
        lblCounty.RenderTransform = rotateTransform;
    }
    MapLayer.SetLocation(lblCounty, shape.GeographicalBounds.Center);
    MapLayer.SetHotSpot(lblCounty, hotSpot);
 
    this.LabelLayer.Items.Add(lblCounty);

If possible, I really need some answers this week.

Thanks in advance.
Andrey
Telerik team
 answered on 09 Dec 2010
1 answer
1.3K+ views
Hi ,

I am using telerik:RadGridView for my WPF Application .I need help on the following things.
  1. New Row Insertion
  2. In line Editing
  3. ComboBox,DateTime Picker,Check Box Column Styles  and Data Binding to Comobo Box Column Style.
  4. Binding DataTable to telerik:RadGridView  as Item Source.
  5. When i use DataTable as itemsource to telerik:RadGridView  it is not working properly
  6. After modifying the values in the telerik:RadGridView ,we need a updated data table of the grid view .
If any body had a sample with the above functionality in the grid could you please share with me.
Thanks in Advance.

Thanks,
Venkat Malladi.
Vanya Pavlova
Telerik team
 answered on 08 Dec 2010
2 answers
84 views
Hey Telerik!

I was looking at your Drag and Drop WPF demo for the Tree to Grid Drag and noticed the same problem that I am experiencing.  The scroll bar on All Products will not scroll allowing me to drop an Order below Jonhn's Amazing Keyboard.

Is this possible?

Thanks
Ryan
Ryan Black
Top achievements
Rank 1
 answered on 08 Dec 2010
8 answers
431 views
I have been having trouble selecting a treeview item that is located a few nodes deep.

You can see my example here: File Expand and Select

To get the example working, please copy the foo folder to c:\foo.

Thanks for all your help
Ryan
Ryan Black
Top achievements
Rank 1
 answered on 08 Dec 2010
4 answers
147 views
Hello,
After migrating from Telerik Telerik Q2 2010 to Q3 2010 wpf, the radWindow does not close properly  after the button 'Valider' is clicked!
Code :
Xaml file:

<UserControl x:Class="gcm.module.consultation.CreationMotifView"

   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

    xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"

    xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" 

    xmlns:infrastructure="clr-namespace:gcm.infrastructure;assembly=gcm.infrastructure"

    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

   >

    <UserControl.Resources>

        <DataTemplate x:Key="IconTemplate">

            <Image Source="/gcm.resources;component/images/16/Motif.png"

              Stretch="None" />

        </DataTemplate>

    </UserControl.Resources>

    <telerikNavigation:RadWindow x:Name="window" Header="{x:Static infrastructure:Message.Popup_Motif_header}" WindowStartupLocation="CenterOwner" Margin="10,40,10,10" Height="135"  Width="450"

                           TopOffset="-50" ResizeMode="NoResize"

                           IconTemplate="{StaticResource IconTemplate}">

        <Grid>

            <Grid.Resources>

                <DataTemplate DataType="{x:Type ValidationError}">

                    <TextBlock

                    FontStyle="Italic"

                    Foreground="Red"

                    HorizontalAlignment="Right"

                    Margin="0,1"

                    Text="{Binding Path=ErrorContent}"

                />           

            </DataTemplate>

            </Grid.Resources>

            <Grid.ColumnDefinitions>

                <ColumnDefinition Width="60"/>

                <ColumnDefinition Width="*"/>

                <ColumnDefinition Width="120"/>

            </Grid.ColumnDefinitions>

            <Grid.RowDefinitions>

                <RowDefinition Height="30"/>

                <RowDefinition Height="*"/>

                <RowDefinition Height="35"/>

            </Grid.RowDefinitions>

            <Label Grid.Column="0" Grid.Row="1" Name="LibelleMotif" Content="{x:Static infrastructure:Message.Motif_Libelle}"></Label>

            <TextBox Grid.Column="1" Grid.Row="1" Name="TxtMotif"

                     Text="{Binding Path=txtMotif, ValidatesOnDataErrors=true, UpdateSourceTrigger=PropertyChanged}"

                     Height="23" Margin="0,0,35,0" VerticalAlignment="Top" TabIndex="0" />

            <ContentPresenter Grid.Row="1" Grid.Column="5"

                 HorizontalAlignment="Left" VerticalAlignment="Top"

                 Content="{Binding ElementName=TxtMotif, Path=(Validation.Errors).CurrentItem}"

                 DockPanel.Dock="Right"/>

            <Button Grid.Column="2" Grid.Row="2" Name="valider" Margin="0,0,33,9"

                    Command="{Binding Path=MotifCommande}" TabIndex="1" >valider</Button>

           

        </Grid>

    </telerikNavigation:RadWindow>

</UserControl>

Presenter :

       

public ICommand MotifCommande

        {

            get

            {

                if (this.mode == ModeNames.UPDATE)

                {

                    if (_updateCommand == null)

                    {

                        _updateCommand = new RelayCommand(

                        param => this.updateMotif(),

                        param => this.CanSaveMotif

                        );

                    }

                    return _updateCommand;

                }

                else

                {

                    if (_saveCommand == null)

                    {

                        _saveCommand = new RelayCommand(

                        param => this.createMotif(),

                        param => this.CanSaveMotif

                        );

                    }

                    return _saveCommand;

                }

            }

        }

            

        public void createMotif()

        {

            try

            {

                Motif motif = this.GetMotif();

                _motifRepository.CreateMotif(motif);

                this.View.window.Close();

                consultationController.MotifCreated(motif);

            }

            catch (Exception)

            {

               

            }

           

        }

bool CanSaveMotif

        {

            get

            {

                return true;

            }

        }

any idea?
Boyan
Telerik team
 answered on 08 Dec 2010
2 answers
176 views
Several examples I downloaded recently into VS2010 produced compile errors due to confilcting versions.  This seems to happen whether or not I update the example code.  I searched for other Telerik libraries but so far have not solved this problem.  I'm sure there is an easy answer.  Anyone?

Sincerely,
Richard

[Typical error text]
The primary reference "Telerik.Windows.Controls.GridView, Version=2010.1.309.35, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL" could not be resolved because it has an indirect dependency on the .NET Framework assembly "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which has a higher version "4.0.0.0" than the version "2.0.0.0" in the current target framework.
Troy Goddu
Top achievements
Rank 1
 answered on 08 Dec 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?