Telerik Forums
UI for WPF Forum
1 answer
135 views

I am setting the itemsource of my radgridview using the code
WireInstructionDGV.ItemsSource = obj.GetWireInstruction("BNYBD", "MST", "CPTY", "USD")

To add a new row, i have a button who's click event has
Me.WireInstructionDGV.BeginInsert()

Clicking on the button does not add a new row in the datagrid. any ideas ?

(I do not have IsReadOnly = True or CanUserInsertRows  = False)
Tarun
Top achievements
Rank 1
 answered on 27 Jun 2011
7 answers
332 views
Hello all.

I have updated my Entity Framework 4.0 to 4.1Since i have a problem with the binding to Radgridview control.

My Dataclasses as sample:
namespace KfzOrtung6DataClasses.Modells
{
    public class Fahrzeuge
    {
         
        public Fahrzeuge()
        {
            this.FahrzeugPositionen = new ObservableCollection<Positionen>();
        }
 
        [Required]
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        public Guid ID { get; set; }
 
        [Required]
        [MaxLength(50)]
        public string Name { get; set; }
 
        [Required]
        [MaxLength(50)]
        public string Kennzeichen { get; set; }
 
        public string Rufnummer { get; set; }
         
        public int Aktiv { get; set; }
        public DateTime Ablaufsimkarte { get; set; }
 
        [MaxLength(4000)]
        public string Bemerkung { get; set; }
 
        public virtual ObservableCollection<Positionen> FahrzeugPositionen { get; private set; }
    }
}



In my UC i have into the Loaded-Event:
this.DataContext = this.ItemsSource;

The Collectionview Method:
ICollectionView _itemsSource;
public ICollectionView ItemsSource
{
    get
    {
        if (_itemsSource == null)
        {
            using (var ktt = new KfzContext6())
            {
                ktt.MFahrzeuge.Load();
                var c = ktt.MFahrzeuge.Local.ToBindingList();
                var collectionViewSource = new CollectionViewSource {Source = c};
                _itemsSource = collectionViewSource.View;
            }
        }
        return _itemsSource;
    }
    set
    {
        _itemsSource = value;
        OnPropertyChanged("ItemsSource");
    }
}
#endregion

In my context class:
namespace KfzOrtung6DataClasses.Modells
{
    public class KfzContext6 : DbContext
    {
        public KfzContext6(): base("KfzContext6")
        {
            
        }
         
        public DbSet<Fahrzeuge> MFahrzeuge { get; set; }
        public DbSet<Positionen> MPositionen { get; set; }
        public DbSet<Tarife> MTarife { get; set; }
        public DbSet<Benutzer> MBenutzer { get; set; }
        public DbSet<SmsProtokoll> MSmsProtokoll { get; set; }
 
        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);
            // Hier können manuelle Änderungen an Datenbank vorgenommen werden!!
            //Beispiel:
            //modelBuilder.Entity<Benutzer>().Property(r => r.ID).HasColumnName("Id");
        }
 
    }
}

My save method:
selectedFahrzeugAusListe.Aktiv = chkFahrzeugAktiv.IsChecked == true ? 1 : 0;
selectedFahrzeugAusListe.Rufnummer = txFahrzeugGpsnummer.Text.Trim();
selectedFahrzeugAusListe.Kennzeichen = txFahrzeugKennzeichen.Text.Trim();
selectedFahrzeugAusListe.Bemerkung = txFahrzeugKommentar.Text.Trim();
selectedFahrzeugAusListe.Name = txFahrzeugName.Text.Trim();
selectedFahrzeugAusListe.Ablaufsimkarte = dateTimePicker.DisplayDate;
 
using (var ktt = new KfzContext6())
{
    ktt.MFahrzeuge.Add(selectedFahrzeugAusListe);
    ktt.SaveChanges();
    ItemsSource.Refresh();
}

In xaml of the radgridview:
<telerik:RadGridView AutoGenerateColumns="False"
                     CanUserFreezeColumns="False"
                     CanUserResizeColumns="True"
                     Margin="10,6,10,13"
                     x:Name="FahrzeugGrid"
                     RowIndicatorVisibility="Visible"
                     AutoExpandGroups="True"
                     IsFilteringAllowed="False"
                     ShowGroupPanel="False"
                     ShowGroupFooters="False"
                     IsReadOnly="True"
                     SelectionChanged="FahrzeugGrid_SelectionChanged"
                     ActionOnLostFocus="None"
                     AreRowDetailsFrozen="True"
                     CanUserInsertRows="False"
                     CanUserDeleteRows="False"
                     RowDetailsVisibilityMode="Visible" Grid.Row="1"
                     ItemsSource="{Binding ItemsSource, ElementName=DataSourceChangeNotificationsFahrzeugControl}"
                     DataLoaded="FahrzeugGrid_DataLoaded" >
 
    <telerik:RadGridView.ParentRow>
        <telerik:GridViewRow IsTabStop="False" />
    </telerik:RadGridView.ParentRow>
     
    <telerik:RadGridView.Columns>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"
                                    Header="Fahrzeugname" Width="200" />
 
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Kennzeichen}"
                                    Header="Kennzeichen" Width="140" />
 
        <telerik:GridViewColumn Header="Aktiv" Width="40" IsFilterable="True">
            <telerik:GridViewColumn.CellTemplate>
                <DataTemplate>
                    <CheckBox IsEnabled="False"
                              IsChecked="{Binding Path=Aktiv, Converter={StaticResource CopnvertIntToBool1} }">
                    </CheckBox>
                </DataTemplate>
            </telerik:GridViewColumn.CellTemplate>
        </telerik:GridViewColumn>
 
        <telerik:GridViewDataColumn
            DataMemberBinding="{Binding Rufnummer}"
            Header="GPS Nummer" Width="150" />
 
        <telerik:GridViewDataColumn
            DataMemberBinding="{Binding Ablaufsimkarte}"
            Header="Ablauf Karte" Width="90" />
 
        <telerik:GridViewDataColumn
            DataMemberBinding="{Binding Bemerkung}"
            Header="Kommentar" Width="*" />
 
    </telerik:RadGridView.Columns>
</telerik:RadGridView>

It shows all cars, but when i save a new car, the list doesn´t refresh.
When i reload the UC, then all cars (the new one too) are all there.

Can you please help?

Reinhard

Reinhard
Top achievements
Rank 2
 answered on 27 Jun 2011
2 answers
146 views
On the QuarticEase below, I am getting an "Invalid Type" Error. 
Any Easing function I try to enter gives me the same Invalid Type error. Help please!
Visual Studio 2010 w/ .Net 4 with RadControls for WPF 2011_1_0419.

<
Grid x:Name="MainGrid" Background="{StaticResource HelpBrush}">
        <telerik:RadTransitionControl x:Name="TransControl" Width="484" Height="384" Duration="0:0:1"
                                      Padding="32">
            <telerik:RadTransitionControl.Transition>
                <telerik:PerspectiveRotationTransition Direction="Left">
                </telerik:PerspectiveRotationTransition>
            </telerik:RadTransitionControl.Transition>
            <telerik:RadTransitionControl.Easing>
                <QuarticEase EasingMode="EaseOut"/>
            </telerik:RadTransitionControl.Easing>
        </telerik:RadTransitionControl>
</
Grid>



Dustin Clonch
Top achievements
Rank 1
 answered on 27 Jun 2011
5 answers
188 views
Hey

We use telerik:RadDocking - telerik:RadSplitContainer - Radpanes. it is dockedbottom. Mouse over minimized docked panes, looping sometimes (it tries to show the panes in a loop).  We don't have lot of coding going on related to raddocking.

Do you have any solution to this or do you have any similar posts?

I am trying figure out a work around.

Thanks
Ram
Angel
Top achievements
Rank 1
 answered on 27 Jun 2011
3 answers
138 views
We use a DatePicker.
After we startet with the new version the "SelectAll" is obsolete.
What should we use now?

 ((RadDatePicker)sender).SelectAll();
Boyan
Telerik team
 answered on 27 Jun 2011
3 answers
165 views
Hello,

Is there a way to know for sure which rows have a DetailsVibility?

I try that but return only the rendered row.
GridView.ChildrenOfType<GridViewRow>().Where(x => x.DetailsVisibility == Visibility.Visible);
Maya
Telerik team
 answered on 27 Jun 2011
2 answers
576 views
Hi,

Is it possible to handle Commit and Cancel commands/events int the DataForm?

I have dialog with RadDataForm(AutoEdit=TRUE). I wanna close this dialog when user click OK or Cancel button. How can i do this?
Vladimir
Top achievements
Rank 1
 answered on 27 Jun 2011
1 answer
84 views
Hey,

I have a Radrgridview  under RaDDocking/RadSplitContainer/RadPane.

This radPane is set to AutoHide. If i make the docked pane visible, export works fine.

Export is not working when docked pane is not made visible atleast once,

RadGridview is bound to Observable collection. 

Thanks for the Help
Ram
Ivan Ivanov
Telerik team
 answered on 27 Jun 2011
12 answers
242 views
I am running the latest paid for version of Telerik WPF as downloaded today, on an XP workstation with 2 monitors.


1. Launch "C:\Program Files\Telerik\RadControls for WPF Q2 2010 SP1\Demos\Examples.WPF\Telerik.Windows.Examples.exe"
App opens on Primary monitor (in my case, the one on the left).
2. Hover on Browse Controls circle, choose "Containers"
3. Choose "Docking" icon
4. Choose "Split Containers". Screen rearranges with a docking demo
5. Drag and release "Document 1" out of the main window, but still on the same monitor.
6. Press "Windows Key + L" to lock Windows
7. Type in your username and password to unlock Windows
Notice now that the "Document 1" window is now on Right Monitor.
Main window is still in original position on Left Monitor
8. Try to drag "Document 1" to the Main Window - don't let go of mouse button (i.e. keep dragging)
- as the mouse moves onto Monitor 1, the "Document 1" window is not drawn on Left Monitor, only on Right Monitor
- compass on Main Window does not appear
- moving the mouse back onto Monitor 2 still has the "Document 1" window

Other behaviour:

Dragging the main window onto the right monitor, you can then redock "Document 1" into it.
With the main app on the left monitor, Dragging any of the other panels out of the app onto the right monitor and then (without letting go) back onto the left monitor - the controls do not render on the left screen.

Thanks,
Lee Oades
Miroslav Nedyalkov
Telerik team
 answered on 27 Jun 2011
2 answers
158 views
Hi,

I have to style our app and for that I need to change some values in the ButtonChromeStyle.
To check my changes I would like to have a documentation of the ButtonChromeStyle. I need to know when which Borders and Triggers are activated, e.g. what has the user to do in the gui to see the styles:
"PressedVisual
"
"ActiveVisual"
<MultiTrigger.Conditions>
    <Condition Property="RenderEnabled" Value="True"/>
    <Condition Property="RenderPressed" Value="True"/>
</MultiTrigger.Conditions>

I hope you can understand my problems.

Thanks and regards,
Patrick
Patrick
Top achievements
Rank 1
 answered on 27 Jun 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?