Telerik Forums
UI for WPF Forum
5 answers
168 views
Hi there,

I'm facing to a weird issue. I have a RadGridView that is using Grouper Headers and Horizontal Scrolling.

When I want to export the grid without have been playing with the scrolling, the grouped headers are not exported correctly in the excel file. It is like if only the visible groups on the screen are able to be exported.

In opposite if I play with the scrolling before exporting the grid, the grouped headers will be correctly exported.

Have you got any idea about this issue?

Thank you in advance.

Alain

<telerik:RadGridView x:Name="StudyDisplayAllDataGrid"
AutoGenerateColumns="False" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
AutoExpandGroups="True" RowIndicatorVisibility="Collapsed" ShowGroupPanel="False"
IsReadOnly="True" GroupRenderMode="Flat"
Visibility="{Binding AnyProduct, Converter={StaticResource booleanToVisibleConverter}}"
ItemsSource="{Binding StudyProductsGrid}"/>


Using stream As IO.Stream = dialog.OpenFile()
            StudyDisplayAllDataGrid.Export(stream, New GridViewExportOptions() With { _
             .Format = ExportFormat.Html, _
             .ShowColumnHeaders = True, _
             .ShowColumnFooters = True, _
             .ShowGroupFooters = False _
            })
         End Using
Dimitrina
Telerik team
 answered on 20 Sep 2013
1 answer
119 views
Hi,

I am testing some controls including the polar chart, I load some data from a database into a DataTable like this:

DataTable dtData = new DataTable();
dtData.Columns.Add(new DataColumn("Name", typeof(string)));
dtData.Columns.Add(new DataColumn("Value", typeof(double)));

DataRow drCost;

RadarLineSeries rs = new RadarLineSeries();

foreach (DataRow dr in dtData.Rows)
{
CategoricalDataPoint dp = new CategoricalDataPoint();
dp.Category = dr["Name"].ToString();
dp.Value = double.Parse(dr["Value"].ToString());

rs.DataPoints.Add(dp);
}

rs.Stroke = new SolidColorBrush(Color.FromRgb(37, 160, 219));

RadarChartDemo.Series.Add(rs);

And the result is something like the attached image.

I would like to add tooltips to each point to see the values, does anyone knows how can I do this?

Thanks,

Alberto
Petar Kirov
Telerik team
 answered on 20 Sep 2013
3 answers
127 views
Hi,

Is it possible to create a visualization like screenshot attached.

I'm able to create a custom timeline view definition, displaying the weeks, correct days, snapping ...  however the length of the appointments is still proportional to the duration.
I want the same visualization for the appointment as in the month view definition.

How do I achieve this?

Thanks,

Koen 

Kalin
Telerik team
 answered on 20 Sep 2013
5 answers
214 views
Hi,
We are using PivotGrid with localdatasourceProvider connected to an Entity Framework DbContext.
We are using a navigation property to group the datas.
Pivotgrid display the name of our object returned by  .toString().
We would like to display one property of this object for our datatemplate.

What is the best solution ?

Thanks for all, Tristan
tristan Brenner
Top achievements
Rank 1
 answered on 20 Sep 2013
6 answers
1.2K+ views
I am using a RadPropertyGrid. I am trying to use the AutoGeneratingPropertyDefinition event to provide a custom EditorTemplate with a textbox. I want to add a handler to the TextChanged event of the textbox but my event handler is never being called.

Relevant code:
public void GeneratingProperty(AutoGeneratingPropertyDefinitionEventArgs e)
{
    try
    {
        AvailableProperties property = (AvailableProperties)Enum.Parse(typeof(AvailableProperties), e.PropertyDefinition.Binding.Path.Path);
        if (IsAvailable(item.GetAvailableProperties(), property))
        {
            switch (property)
            {
                case AvailableProperties.Title:
                    FrameworkElementFactory textBoxFactory = new FrameworkElementFactory(typeof(TextBox));
                    textBoxFactory.AddHandler(TextBox.TextChangedEvent, new TextChangedEventHandler(TitleTextChanged));
                    textBoxFactory.SetValue(TextBox.BackgroundProperty, System.Windows.Media.Brushes.Tomato);
                    textBoxFactory.SetValue(TextBox.BorderBrushProperty, System.Windows.Media.Brushes.Transparent);
                    textBoxFactory.SetBinding(TextBox.TextProperty, new Binding("Title"));
 
                    DataTemplate template = new DataTemplate();
                    template.VisualTree = textBoxFactory;
                    template.Seal();
 
                    e.PropertyDefinition.EditorTemplate = template;
                    e.PropertyDefinition.OrderIndex = 0;
                    e.PropertyDefinition.DisplayName = "Title";
                    e.PropertyDefinition.Description = "The title of the attribute. Can only contain letters, numbers, and underscores.";
 
                    break;
                default:
                    // other properties go in case statements above here
                    break;
            }
        }
        else
        {
            e.Cancel = true;
        }
    }
    catch
    {
        e.Cancel = true;
    }
}
 
public void TitleTextChanged(object sender, TextChangedEventArgs e)
{
    if (sender is TextBox)
    {
        TextBox titleTextBox = (TextBox)sender;
        int caretIndex = titleTextBox.CaretIndex;
        string newValue = titleTextBox.Text;
 
        item.Title = newValue;
        ApplyCorrectedValue(newValue, item.Title, titleTextBox, caretIndex);
 
        NotifyOfPropertyChange(() => MappingsPanel);
    }
    else
    {
        Logger.Log("TitleChanged: source must be a TextBox");
        throw new ArgumentException("source must be a TextBox");
    }
}
I am using the 2012.2.912.35 version of the telerik dlls
Dimitrina
Telerik team
 answered on 20 Sep 2013
1 answer
35 views
Hiya, I'm sorry but without setting a precedent, I know that you are very busy, I would need a response as soon as possible:
http://www.telerik.com/community/forums/wpf/general-discussions/calling-a-udf-for-populating-a-radgridview-fails.aspx


I really very appreciate your help
Dimitrina
Telerik team
 answered on 20 Sep 2013
1 answer
90 views

Hi ya, I'm trying to populate one RadGridView using an UDF Sql Server which waits a parameter but it doesn't work:


XAML:

<telerik:RadGridView x:Name="dgvHistoricoOR"  HorizontalAlignment="Left" FontFamily="Segoe UI"
                                       FontSize="12" FontStyle="Normal"
          Margin="10,44,-185,0"  VerticalAlignment="Top" Height="175" Width="437"
          ColumnWidth="SizeToCells" Grid.ColumnSpan="2" Grid.RowSpan="2">
 
          <telerik:RadGridView.Columns>
              <telerik:GridViewDataColumn DataMemberBinding="{Binding ord_repalpha}" Header="{Resx RadGridViewOr_Or}"
                                          Width="40"/>
                      <telerik:GridViewDataColumn DataMemberBinding="{Binding F_Alta}" Header="{Resx RadGridViewOr_Alta}"
                                                  Width="60"/>
                      <telerik:GridViewDataColumn DataMemberBinding="{Binding F_Cierre}" Header="{Resx RadGridViewOr_Cierre}"
                                                  Width="60"/>
          </telerik:RadGridView.Columns>

Code-behind:


ada = New SqlDataAdapter("SELECT * FROM OR_Historico_Por_Cliente(@par1)", aBD.connection)
        ada.SelectCommand.Parameters.AddWithValue("@par1", Documento)
 
 
        ada.Fill(ds, "OR_Historico_Por_Cliente")
        Me.dgvHistoricoOR.ItemsSource = "OR_Historico_Por_Cliente"
 
        Me.dgvHistoricoOR.DataContext = ds




OR_Historico_Por_Cliente('') UDF Sql2k8 returns a TABLE

I don't get data, my Grid remains empty

I wonder, when I call Fill method, should I include the value for the parameter???


Help!
Dimitrina
Telerik team
 answered on 20 Sep 2013
1 answer
222 views
I'm working on a screen with WPF which has 3 listbox (list1, list2, list3), and i can drag items from list1 to list2 and list2 to list3 or even list1 to list3, and i can do it reversely.

I had to change the listbox (list3) to radListBox, because i wanted to implement the reorder within this list, i managed that drag and drop worked, and it did. but when a i wanted to drag an item from list3 (radlistbox), i got null in this variable :
" var data = ((DataObject)args.Data).GetData("DragData") as UcFileColumn", which UcFileColumn is a user control that i wanna cast with to drop in other lists. So insted od using "data" i thought using then selectedItem property to take the item dragged, and it works. Still one mysterious behaviour occured, is that when i dropped items in the lists3 (radListBox) and then drag them back into the lists(list1 or list2), and i wanted to dropped them back, the list prevent me to drop, i think when i remove item from teh radlistbox, the allowdrag dosent set anymore !!!!, is that because i used SelectedItem, if yes how should i get the element dragged from (DataObject)args.Data).GetData..

here is my XAML CODE : 

<UserControl.Resources>
        <Style x:Key="DraggableListBoxItem" TargetType="controls4:RadListBoxItem">
            <Setter Property="dragDrop:DragDropManager.AllowCapturedDrag" Value="True" />
            <Setter Property="dragDrop:DragDropManager.AllowDrag" Value="True" />
        </Style>
    </UserControl.Resources>
<ListBox Grid.Row="2" x:Name="List1"  ItemsSource="{Binding Source1, Mode=TwoWay}" AllowDrop="True" IsSynchronizedWithCurrentItem="True"
                     Style="{StaticResource ListBoxStyleMenu}" Margin="2,2,2,2"
                     VerticalAlignment="Stretch" HorizontalContentAlignment="Center" HorizontalAlignment="Stretch">
 
                    <ListBox.ItemsPanel>
                        <ItemsPanelTemplate>
                            <UniformGrid Columns="2" />
                        </ItemsPanelTemplate>
                    </ListBox.ItemsPanel>
                    <ListBox.ItemContainerStyle>
                        <Style TargetType="{x:Type ListBoxItem}">
                            <Setter Property="Focusable" Value="False"/>
                            <Setter Property="Margin" Value="0,5,0,5" />
                        </Style>
                    </ListBox.ItemContainerStyle>
                </ListBox>
<ListBox Grid.Row="2" x:Name="List2"  ItemsSource="{Binding Source2, Mode=TwoWay}" AllowDrop="True" IsSynchronizedWithCurrentItem="True"
                     Style="{StaticResource ListBoxStyleMenu}" Margin="2,2,2,2"
                     VerticalAlignment="Stretch" HorizontalContentAlignment="Center" HorizontalAlignment="Stretch">
 
                    <ListBox.ItemsPanel>
                        <ItemsPanelTemplate>
                            <UniformGrid Columns="2" />
                        </ItemsPanelTemplate>
                    </ListBox.ItemsPanel>
                    <ListBox.ItemContainerStyle>
                        <Style TargetType="{x:Type ListBoxItem}">
                            <Setter Property="Focusable" Value="False"/>
                            <Setter Property="Margin" Value="0,5,0,5" />
                        </Style>
                    </ListBox.ItemContainerStyle>
                </ListBox>
<controls4:RadListBox x:Name="List3"  ItemsSource="{Binding Source3}" AllowDrop="False" SelectedItem="{Binding SourceSelected, Mode=TwoWay}"
                     VerticalAlignment="Stretch" HorizontalContentAlignment="Center" HorizontalAlignment="Stretch"
                    Margin="2,2,2,2" ItemContainerStyle="{StaticResource DraggableListBoxItem}">
                <controls4:RadListBox.DragDropBehavior>
                    <behaviors:ListBoxDragDropBehavior AllowReorder="True" dragDrop:DragDropManager.TouchDragTrigger="TapAndHold" />
                </controls4:RadListBox.DragDropBehavior>
 </controls4:RadListBox>


I'm looking forward for your response

Rosen Vladimirov
Telerik team
 answered on 20 Sep 2013
2 answers
196 views
Hello!

I'm having an issue when applying a font style to a numbered list in RadRiсhTextBox.

Steps to reproduce:
1. Create some lines of text
2. Select all of newly created lines of text.
3. Apply numbered list to these lines of text.
4. Set a font different from the default one

The numbrer indicator of the last line won't apply a new font.
The screenshot is attached to this post.

This can be reproduced even in your latest demo.

Thanks in advance.
Mikhail
Top achievements
Rank 1
 answered on 20 Sep 2013
22 answers
376 views
I have a WPF UserControl that has a GridView on it, when I place that UserControl in a WinForm application and try grouping by dragging the column header into the Grouping area it errors out.  The error I get is:

System.ArgumentNullException was unhandled
  Message="Value cannot be null.\r\nParameter name: otherVisual"
  Source="PresentationCore"
  ParamName="otherVisual"
  StackTrace:
       at System.Windows.Media.Visual.FindCommonVisualAncestor(DependencyObject otherVisual)
       at System.Windows.Media.Visual.TransformToVisual(Visual visual)
       at Telerik.Windows.Controls.DragDropManager.GetPopupPosition()
       at Telerik.Windows.Controls.DragDropManager.CreateDragAdorner()
       at Telerik.Windows.Controls.DragDropManager.PrepareElementToDrag(UIElement elementToDrag)
       at Telerik.Windows.Controls.DragDropManager.UIElement_MouseMove(Object sender, MouseEventArgs e)
       at System.Windows.Input.MouseEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
       at System.Windows.Input.InputManager.ProcessStagingArea()
       at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
       at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
       at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
       at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
       at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.Run(Form mainForm)
       at WinFormTestControl.Program.Main() in C:\rccdev\BankReconcilation\WinFormTestControl\Program.cs:line 18
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: 

Any Ideas?

Thanks,
Nate

Lenka
Top achievements
Rank 1
 answered on 19 Sep 2013
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
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
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
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?