Telerik Forums
UI for WPF Forum
3 answers
501 views

Hello, I have RadGridView and grouped items in it. I want to collapse the groups and I can do it. But if any property of item will be changed, the group contains this item will be expanded automatically. I want this group to be expanded regardless of the property changes. Is it bug or feature of RadGridView? Tell me, please, how I can fix it?

I wanted to attach archive with sample project. But forum allows me to attach pictures only

Egor
Top achievements
Rank 1
 answered on 05 Jun 2017
8 answers
398 views
I am using GridView's export functionality of 2016.1.217.45 version, see below the code snippet.
string extension = "xls";
          SaveFileDialog dialog = new SaveFileDialog()
          {
            DefaultExt = extension,
            Filter = String.Format("{1} files (*.{0})|*.{0}|All files (*.*)|*.*", extension, "Excel"),
            FilterIndex = 1
          };
          if (dialog.ShowDialog() == true)
          {
            using (Stream stream = dialog.OpenFile())
            {
              m_oGridView.Export(stream,
               new GridViewExportOptions()
               {
                 Format = ExportFormat.Xlsx,
                 ShowColumnHeaders = true,
                 ShowColumnFooters = false,
                 ShowGroupFooters = false,
               });
            }
          }

 

Following are the issues observed, please provide solutions or workarounds:

  1. The first row in the grid is not getting exported as second row in excel, instead it is appearing in the first row of excel after the row headers. See the snapshots - "GridUISnapshot.JPG" and "ExcelSnapshot.JPG".
  2. If the users specifies the extension of the file as ".xlsx", it is getting exported but not able to open in excel 2016 version, the error message is shown in the snapshot - "XlsxExtensionOpenError.JPG".  Since in File save dialog, user can specify .xlsx extension as well. In code we are specifying the format to be exported is xlsx, but still it is not compatible.

Thanks,

Viksit

Flemming
Top achievements
Rank 1
Veteran
 answered on 02 Jun 2017
1 answer
476 views

I'm playing around with the developer example projects for the gridview, specifically the "ComboboxColumnItemsSourceBinding", and I enabled the Search Panel on the Gridview where FilterMemberPath is set, but noticed it doesn't search inside the ComboBox Column. If I type for "Webber" in the Search Panel it comes up with nothing.....but the filter control for that column will work.

Is there something I am missing in the demo that I need to add to get this functionality working? Or do I need to go as far as making my own predicate and use FilterDescriptor<T>?

Stefan
Telerik team
 answered on 02 Jun 2017
3 answers
917 views

1) The below numeric input is always displaying 0 on screen load. I don't want to show anything. Latitude is defined as Decimal? is ViewModel.

2) I want this to allow only values between 32 and 38 upto 5 decimal digits.

How can I do this ? 

<telerik:RadMaskedNumericInput AllowInvalidValues="False" Value="{Binding Latitude, Mode=TwoWay}"  AutoFillZeros="False"  FlowDirection="LeftToRight" Placeholder=" "
                                              HorizontalAlignment="Left" AutoFillNumberGroupSeparators="false"  
                                              Mask="" SelectionOnFocus="SelectAll"  ></telerik:RadMaskedNumericInput>

Dinko | Tech Support Engineer
Telerik team
 answered on 02 Jun 2017
4 answers
199 views

Hi to all,

I would avoid ovelap between RadDiagramShapes (all rectangle items).

When I set IsSnapToGridEnabled="False" IsSnapToItemsEnabled="true" and move RadDiagramShapes, SnappingEngine uses snap on myshape aligned to other ractangle.

If I try to user MyMovedShaped.Bounds.Rect.IntersectWith(OtherRectangleShape) returns me ever True.

I'm using this code:

01.private void topRadDiagram_Drag(object sender, DragRoutedEventArgs e)
02.{
03.    var diagram = (RadDiagram)sender;
04. 
05.    foreach (var item in e.Items)
06.    {
07.        var currentItem = (RadDiagramShape)item;
08. 
09.        var shapeItem = (GruppoPianoDiCarico)currentItem.Tag;
10. 
11.        foreach (RadDiagramShape otherItems in diagram.Items)
12.        {
13.            if (otherItems.Tag.GetType() == typeof(GruppoPianoDiCarico))
14.            {
15.                var shapeOther = (GruppoPianoDiCarico)otherItems.Tag;
16. 
17.                if (shapeItem != shapeOther)
18.                {
19.                    if (currentItem.Bounds.IntersectsWith(otherItems.Bounds))
20.                    {
21.                        //Da ripristinare le coordinate originarie
22.                        currentItem.Position = new Point(currentItem.Position.X - (e.MousePosition.X - e.StartMousePosition.X),
23.                            currentItem.Position.Y - (e.MousePosition.Y - e.StartMousePosition.Y));
24.                    }
25.                }
26.            }
27.        }
28.    }
29.}

 

Petar Mladenov
Telerik team
 answered on 02 Jun 2017
2 answers
204 views

Hi. i use RadGridView including FilteringMode is FilterRow.

in this case, How to delete the filter Control? I want to use only default FilterRow function.

and  can i delete only Header Part in FilterRow?

 

If it is possible, Please give the solution, and Example Code. (Please Do not remark about 'ShowSearchPanel = true', I want to know only about FilterRow.)

 

Thanks

 

Dilyan Traykov
Telerik team
 answered on 02 Jun 2017
1 answer
232 views

I have a MVVM setup with GraphSource etc. as described in this example: http://docs.telerik.com/devtools/wpf/controls/raddiagram/populating-with-data/data-databinding

When I delete a node, the connecting edges are not getting deleted. I see this working in various other examples, but for me, the edges remain on the diagram. I found an old post from 2013 about this functionality not working, but I expect that in 2017, that bug has been fixed: http://www.telerik.com/forums/remove-connections-when-removing-node

Before I post more (code) details: Is the behavior expected to work? If yes, what's a good way to debug why edges are not getting correctly deleted for me?

Dinko | Tech Support Engineer
Telerik team
 answered on 02 Jun 2017
1 answer
101 views

I'm trying to drag&drop from my radlistbox that has ItemSource with my Collection (by MVVM)

I valued RadDiagramShape.Tag property with my object, I would to send this one also.

But into ItemsChanged event I found Tag = null.

How can I do this?

DragDropManager.AddDragInitializeHandler(MacchineDaCaricareRadListBox, OnDragInitialize);
 
private void OnDragInitialize(object sender, DragInitializeEventArgs args)
{
    args.AllowedEffects = DragDropEffects.All;
 
    //RadDiagramShape draggedShape = (args.OriginalSource as ListBoxItem).Content as RadDiagramShape;
    GruppoPianoDiCarico pallet = (args.OriginalSource as RadListBox).SelectedValue as GruppoPianoDiCarico;
 
    RadDiagramShape macchina = new RadDiagramShape()
    {
        Width = pallet.Lunghezza / SCALE,
        Height = pallet.Larghezza / SCALE,
        Content = $"[{pallet.NumeroRiga}] {pallet.Description.ToUpper()}",
        Tag = pallet
    };
    macchina.Geometry = ShapeFactory.GetShapeGeometry(CommonShapeType.RectangleShape);
    macchina.Background = IMBALLO;
    macchina.Foreground = IMBALLO_TITLE;
    macchina.FontWeight = FontWeights.Bold;
    macchina.Stroke = Brushes.Black;
    macchina.StrokeThickness = 1;
    macchina.StrokeDashArray = new DoubleCollection(new Double[] { 5, 1 });
    macchina.FontSize = 20;
 
    List<RadDiagramShape> shapes = new List<RadDiagramShape>();
    shapes.Add(macchina);
    SerializationInfo serializaedInfo = SerializationService.Default.SerializeItems(shapes);
    args.Data = serializaedInfo;
}

 

private void topRadDiagram_ItemsChanged(object sender, DiagramItemsChangedEventArgs e)
{
    [...]

if (e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Add)
{
foreach (var item in e.NewItems)
{
var currenItem = (RadDiagramShape)item;

//it founds Tag = null!!!!
if (currenItem.Tag.GetType() == typeof(GruppoPianoDiCarico))
{
var macchina = (GruppoPianoDiCarico)currenItem.Tag;

vm.MacchineDaCaricare.Remove(macchina);
vm.MacchineCaricate.Add(macchina);
}
}
}
}

Petar Mladenov
Telerik team
 answered on 02 Jun 2017
9 answers
172 views

Is it possible for the sparkline points to have unique tooltips?  I'd like the user to be able to hover over the sparkline and see XValue and YValue in a tooltip.

 

Thanks,

Bryan
Top achievements
Rank 1
 answered on 01 Jun 2017
2 answers
1.1K+ views

I am trying to make some gridview pannel.

I want to make fixed GridView width in the windows. like p1.png. but it can'not be stretched dynamically.

bacause p1.png is made as fixing width in the xaml code (like grid Width="1200" in grid, and my original window width is also 1200). but i don't want to fix width like this.

so i change the code like Width="*" in grid. then gridview pannel can be p2.png.

It shift all panel in window. I don't want it.

How to make fixed gridview Width on the window and can be dynamically stretched.

 

--my code

<Grid HorizontalAlignment="Stretch">
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        
        <telerik:RadGridView Name="tradeListPanel" AutoGenerateColumns="False" ItemsSource="{Binding tradeList}" ShowSearchPanel="True" FrozenColumnCount="7"
                             IsReadOnly="True" EnableRowVirtualization="False" EnableColumnVirtualization="False"
                             FontSize="12" telerikControls:StyleManager.Theme="Summer"
                             ShowColumnFooters ="True" RowIndicatorVisibility ="Collapsed"
                             IsSynchronizedWithCurrentItem ="True" RowDetailsVisibilityMode="VisibleWhenSelected" 
                             Margin="0,0,0,0" Padding="0,0,0,0">

            <telerik:RadContextMenu.ContextMenu>
                <telerik:RadContextMenu x:Name="GridContextMenu" 
                                    ItemContainerStyle="{StaticResource MenuItemContainerStyle}"
                                    Opened="GridContextMenu_Opened"
                                    ItemClick="GridContextMenu_ItemClick"
                                    />
            </telerik:RadContextMenu.ContextMenu>

            <telerik:RadGridView.ControlPanelItems>
                <telerik:ControlPanelItem ButtonTooltip="Column chooser">
                    <telerik:ControlPanelItem.Content >
                        <ListBox ItemsSource="{Binding Columns}" BorderThickness="0">
                            <ListBox.ItemTemplate>
                                <DataTemplate>
                                    <CheckBox Content="{Binding Header, Mode=OneWay}" IsChecked="{Binding IsVisible, Mode=TwoWay}" />
                                </DataTemplate>
                            </ListBox.ItemTemplate>
                        </ListBox>
                    </telerik:ControlPanelItem.Content>

.................

................

</telerik:RadGridView>
    </Grid>

 

Thank you.

 

 

 

 

 

 

Dilyan Traykov
Telerik team
 answered on 01 Jun 2017
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
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?