When the ribbon group is in collapsed mode and it contains a combo box, how can I prevent the group from closing when an item in the combo box is selected? It's causing some unwanted behavior due to other events attached to the combo box, which doesn't happen when the group is not collapsed.
Hi,
I have a database in which images are stored by its URLs,
so I'd like to use the url to load image from viewmodel to view.
Thanks.
We are currently replacing an old Infragistics docking manager with your control, and with the old code, we've prevented the floating of windows.
However, the user could still move panes around to a different location, and change the layout (Just like with DragDropMode is set to Deferred).
I would like to support the legacy mode (Which will be the default) which will behave just like the Deferred DragDropMode. I also want the user to be able to change an option in the program, which will change the DragDropMode to Immediate.
This, however, doesn't work as expected...
If changing from Immediate to Deferred:
* Docked panes are not movable (no compass and no deferred adorner is being shows)
* Floating panes that are being docked do have the compass and the deferred adorner, when you try to move them after they were docked.
If you change is back from Deferred to Immediate:
* Panes that you could not move can be moved (and then become floating) again/
* The panes that did have the compass and the deferred adorner, don't move when you try to drag them. However, when you release the mouse button, then the start moving with the mouse pointer... without any mouse button pressed.
Thanks
I am trying to export filtered records from radgrid.But it was importing all the records those are in my grid.
Please let me know how can i achieve this.here is the code snippet.
string extension = "pdf";
rgEquipmentTracking.ElementExporting -= rgEquipmentTracking_ElementExporting;
rgEquipmentTracking.ElementExporting += rgEquipmentTracking_ElementExporting;
SaveFileDialog dialog = new SaveFileDialog()
{
DefaultExt = extension,
Filter = String.Format("{1} files (.{0})|*.{0}|All files (.*)|*.*", extension, "Pdf"),
FilterIndex = 1
};
var grid = new RadGridView()
{
ItemsSource = rgEquipmentTracking.ItemsSource,
RowIndicatorVisibility = Visibility.Collapsed,
ShowGroupPanel = false,
CanUserFreezeColumns = false,
IsFilteringAllowed = true,
AutoExpandGroups = true,
AutoGenerateColumns = false,
Margin = new Thickness(30, 30, 30, 30),
ShowColumnFooters = true,
EnableRowVirtualization = true
};
foreach (var column in rgEquipmentTracking.Columns.OfType<GridViewDataColumn>())
{
if (column.IsVisible == true && column.UniqueName != "ViewDetail")
{
var newColumn = new GridViewDataColumn();
newColumn.DataMemberBinding = new System.Windows.Data.Binding(column.UniqueName);
grid.Columns.Add(newColumn);
if (column.UniqueName == "ItemDate")
{
newColumn.UniqueName = "Sign Out Date";
newColumn.Header = "Sign Out Date";
newColumn.DataMemberBinding.StringFormat = "{0:dd/MM/yyyy}";
}
}
}
StyleManager.SetTheme(grid, StyleManager.GetTheme(grid));
if (dialog.ShowDialog() == true)
{
using (Stream stream = dialog.OpenFile())
{
grid.ExportToPdf(stream,
new GridViewPdfExportOptions()
{
ExportDefaultStyles = true,
ShowColumnFooters = true,
ShowColumnHeaders = true,
ShowGroupFooters = true,
AutoFitColumnsWidth = true,
PageOrientation = PageOrientation.Landscape
});
}
}
Hi,
it is easy to create GridView rows by button click. But is it possible to create rows for a month? I want to create
perhaps may. So i need 31 rows and in one column should be the Date from SO 01.05.2016 to TUE 31.05.2016?
Thanks a lot
Best Regards
Rene
So I'm trying to get the ScheduleView to allow a gridview and a listbox drop appointments (ScheduleItems) on it - and I can't seem to get the ConvertDraggedData to work properly because the ListBox sends through an IEnumerable<IOccurrence> and my GridView sends the raw item through (ScheduleItem).
So I rolled my own GridViewDragDropBehaviour class (as there isn't one built in for the GridView) and on the OnDragInitialize event, I'm using IDragPayload.SetData() to set the data to be the raw (ScheduleItem) item. The ListBox is using the built in ListBoxDragDropBehaviour class.
This is my ConvertDraggedData code:
public override IEnumerable<IOccurrence> ConvertDraggedData(object data)
{
if (DataObjectHelper.GetDataPresent(data, typeof(ScheduleItem), false))
{
return ((IEnumerable)DataObjectHelper.GetData(data, typeof(ScheduleItem), false)).OfType<IOccurrence>();
}
return base.ConvertDraggedData(data);
}
Obviously when items are dragged from the GridView the specified cast to IEnumerable doesn't work - but it works fine from the ListBox. How do I tweak the code so that it will work for both controls?
Hi,
I'm saving by PersistenceMaganer on my GridView but when I try to reload it missed converter and formatstring in some column.
When reloading it doesn't apply Converter called FuoriCorsoConverter and StringFormat of "Last Update" column, durthermore other column with StringFormat is correctly applyed instead.
Why?
Codes:
//Portions of code for savingPersistenceManager manager = new PersistenceManager();var streamGridView = manager.Save(this.DocumentHostGridView);//[...]//Portion of code for loading//[...]private void LoadPersonalizzazione(){ //Personlizzazione del docking var stream = ViewModel.CaricaPersonalizzazione(this.GetType().ToString()); //ref. UserControl.xaml.cs if (stream != null) this.MainRadDocking.LoadLayout(stream); //Personalizzazione della gridview principale MemoryStream streamGridView = ViewModel.CaricaPersonalizzazioneControllo(this.GetType().ToString(), this.DocumentHostGridView.Name); if (streamGridView != null) { streamGridView.Position = 0L; PersistenceManager manager = new PersistenceManager(); manager.Load(this.DocumentHostGridView, streamGridView); }}//[...]XAML of columns
<telerik:GridViewDataColumn Header="Last Update" DataMemberBinding="{Binding UltimoAggiornamento, StringFormat={}{0:dd/MM/yyyy}}"/><telerik:GridViewImageColumn Header="Out" DataMemberBinding="{Binding FuoriCorso, Converter={StaticResource FuoriCorsoConverter}}"/><telerik:RadTreeView x:Name="DeviceTreeView" Margin="2" VerticalContentAlignment="Top" ItemsSource="{Binding Recievers}" IsExpandOnDblClickEnabled="False"> <telerik:RadTreeView.Resources> <HierarchicalDataTemplate DataType="{x:Type ViewModel:RecieverViewModel}" ItemsSource="{Binding Children}" > <StackPanel Orientation="Horizontal" > <!-- <Image Width="16" Height="16" Margin="3,0" Source="Images\Region.png" /> --> <TextBlock Text="{Binding Id}"> <TextBlock.InputBindings> <MouseBinding Gesture="LeftDoubleClick" Command="{Binding Path=DataContext.OpenRecieverVisTabCommand, RelativeSource={RelativeSource AncestorType={x:Type TreeView}}}" CommandParameter="{Binding Id}"/> </TextBlock.InputBindings> </TextBlock> </StackPanel> </HierarchicalDataTemplate> <HierarchicalDataTemplate DataType="{x:Type ViewModel:TripodViewModel}" ItemsSource="{Binding Children}" > <StackPanel Orientation="Horizontal" > <!-- <Image Width="16" Height="16" Margin="3,0" Source="Images\State.png" /> --> <TextBlock Text="{Binding Id}"> <TextBlock.InputBindings> <MouseBinding Gesture="LeftDoubleClick" Command="{Binding Path=DataContext.OpenTripodVisTabCommand, RelativeSource={RelativeSource AncestorType={x:Type TreeView}}}" CommandParameter="{Binding Id}"/> </TextBlock.InputBindings> </TextBlock> </StackPanel> </HierarchicalDataTemplate> </telerik:RadTreeView.Resources> <telerik:RadTreeView.ItemContainerStyle> <!-- This Style binds a TreeViewItem to a TreeViewItemViewModel. --> <Style TargetType="{x:Type telerik:RadTreeViewItem}"> <Setter Property="IsExpanded" Value="true" /> <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" /> <Setter Property="FontWeight" Value="Normal" /> <Style.Triggers> <Trigger Property="IsSelected" Value="True"> <Setter Property="FontWeight" Value="Bold" /> </Trigger> </Style.Triggers> </Style> </telerik:RadTreeView.ItemContainerStyle> </telerik:RadTreeView>