Telerik Forums
UI for WPF Forum
6 answers
337 views
I am binding a DataTable to RadGridView and AutoGenerateColumns="True",
Following are the columns I have,
dt.Columns.Add("Text", typeof(string));
dt.Columns.Add("Number", typeof(double));
dt.Columns.Add("CustomType", typeof(Custom));
Custom is a Enum as follows,
public enum Custom
    {
        One,
        Two,
        Three
    }
Now when I bind the DataTable to RadGridView it displays Data correnctly, but when I try to change the value of custom columns I am not getting dropdown to select a value from Enum instead when I enter in edit mode it displays the Id of the selected Enum.
I tried changing RadGridViewDataColumn to RadGridViewComboBoxColumn in AutoGeraratingColumns Event but not able to make it working.
Please help as its pretty urgent and important.
Attached is the screenshot for the same. 
Thanks in Advance!!!
Ivan Ivanov
Telerik team
 answered on 29 Sep 2015
1 answer
320 views

Hello,

I'm using the RadTreeView with only ONE root node. My ItemsSource is FolderData. FolderData has only one Item - the root node. I'm using

DragDropManager.AddDragOverHandler(this.FolderRadTreeView, new Telerik.Windows.DragDrop.DragEventHandler(OnDragOver), true);

​ for allowing the dropping in special nodes. 

 

How can I disable the dropping next to root node? I want to avoid to have more than one root nodes. Is it possible?

Peshito
Telerik team
 answered on 29 Sep 2015
1 answer
171 views

I have a ​gridview with two grouping columns. I want to add some images to the group column header

<t:RadGridView x:Name="WorksGridView" Grid.Column="1"

AutoGenerateColumns="False"

ShowGroupPanel="False"

IsFilteringAllowed="False"

CanUserSortColumns="False"

IsReadOnly="True"

SelectionMode="Single"

SelectionUnit="FullRow"

RowIndicatorVisibility="Visible"

IsSynchronizedWithCurrentItem="True"

RowLoaded="RadGridView_RowLoaded"

GroupRenderMode="Flat"

ItemsSource="{Binding WorksGridBinding, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"

SelectedItem="{Binding WokrSelectedItem, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"

CurrentItem="{Binding WorkCurrentItem, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" >

<t:RadGridView.GroupDescriptors>

<t:GroupDescriptor Member="Groups" SortDirection="Ascending" />

<t:GroupDescriptor Member="Subgroups" SortDirection="Ascending" >

<t:GroupDescriptor.AggregateFunctions>

<t:CountFunction Caption="Entries count: " />

 

 

 

</t:GroupDescriptor.AggregateFunctions>

</t:GroupDescriptor>

</t:RadGridView.GroupDescriptors>

 

<t:RadGridView.Columns>

<t:GridViewDataColumn Width="*" HeaderTextAlignment="Center" Header="Works" HeaderCellStyle="{StaticResource HeaderStyle}">

<t:GridViewDataColumn.CellTemplate>

<DataTemplate>

<DataGridCell>

<TextBlock Text="{Binding Title}" FontSize="14" HorizontalAlignment="Left" />

</DataGridCell>

</DataTemplate>

</t:GridViewDataColumn.CellTemplate>

</t:GridViewDataColumn>

</t:RadGridView.Columns>

</t:RadGridView>

 

 

 

 

 

 


 
 
 
 
 
 
 
 
Yoan
Telerik team
 answered on 29 Sep 2015
9 answers
186 views

I add one polygon, which is about 10km wide and high, and consists of around 20 points. I add it to a VisualizationLayer and zoom in, and at zoom level 17 the application pretty much hangs (extremely slow update). When this happens, the desktop also becomes extremely slow. The polygon is a PolygonData object. This problem does not occur if I zoom in to a location outside the polygon.

It does not matter if I add it to the Items collection or if I use virtualization, the result is same.

Martin Ivanov
Telerik team
 answered on 29 Sep 2015
4 answers
122 views

Hi.

I tried to use ExportToXlsx to export a grid to Excel. I used your example (below), but it will only export the last item of the grid. Do you have any idea what can be wrong? I have sold it by using Spreadsheet and building the xlsx by looping through each item, but it would be nicer and easier to use ExportToXlsx.

- Odd

           

string extension = "xlsx";
 
SaveFileDialog dialog = new SaveFileDialog()
{
    DefaultExt = extension,
    FileName = "GiekExport.xlsx",
    Filter = String.Format("{1} files (*.{0})|*.{0}|All files (*.*)|*.*", extension, "Excel"),
    FilterIndex = 1
};
 
if (dialog.ShowDialog() == true)
{
    using (Stream stream = dialog.OpenFile())
    {
        GiekExcelGrid.ExportToXlsx(stream,
             new GridViewDocumentExportOptions()
             {
                 ShowColumnFooters = false,
                 ShowColumnHeaders = true,
                 ShowGroupFooters = false,
                 AutoFitColumnsWidth = true
             });
    }
}

Odd Veibust
Top achievements
Rank 1
 answered on 29 Sep 2015
2 answers
158 views

Hi,

I'm working on a WPF application. I have a rad docking that contains radpane groups with unpinned docked radpanes. When these fly out and a button is pressed on them, I want to display a sort of overlay like rectangle. My rectangle covers everything in the MainWindow except the radpane that is activated which seems to always show up over my rectangle. Nothing can be clicked on the Mainwindow except that active radpane but I need everything to be under the rectangle without exception AND I need the active radpane to stay visible. Is there a way to have my rectangle be the absolute topmost thing over the unpinned radpane? I've attempted using the ZIndex of the rectangle and putting it on the highest level of the xaml. It works for all the controls of my app except, like I mentionned, the currently active radpane. 

Cheers!

Nasko
Telerik team
 answered on 29 Sep 2015
1 answer
114 views

I'm having some trouble binding to a dynamically created generic collection, I don't get the expanding icon for any rows, even though I double and triple checked the bindings, but my setup is a bit complex. This behavior happens when I'm creating the columns manually (GridViewDataColumn), when I use autogenerated columns the behavior is a bit different, but still not working.

The type of the collection is:

MyDataSourceGeneric<ElementType> : 
     IQueryable<ElementType>, IQueryable, IEnumerable, IEnumerable<ElementType>,
     IOrderedQueryable<ElementType>, IOrderedQueryable​


where ElementType will be a type generated at runtime which inherits a MyRecordBase, so instances of this collection are created by:

Type recordType =  /*... generate type that inherits MyRecordBase ....  */ ;
var genericDs = typeof(MyDataSourceGeneric<>);
var dsType = genericDs.MakeGenericType(recordType);
var queriable = (IQueryable)Activator.CreateInstance( /*​.....*/ );

And this queriable is used as datasource of the TreeListView.

I experimented with 4 approaches to expose the Children, implemented as a property in the generated recordType: coerce to object, coerce to IEnumerable, coerce to IEnumerable<ElementType> and return a plain MyDataSourceGeneric<ElementType>; due to the fact that the ElementType is generated at runtime, the typed-collection properties need to be generated at runtime also.

Stefan
Telerik team
 answered on 29 Sep 2015
5 answers
250 views
  Hello,

I would like to define in a style a default control panel (with a button to export the grid as excel/pdf/etc...) for all my RadGridView, but I can't figure out how to set the ControlPanelItems in a style.
Is this possible ? and if so, how can I do?

Thanks in advance for your help.

Regards
Yoan
Telerik team
 answered on 28 Sep 2015
7 answers
360 views

Hi,

When making a large diagram it's nice to have the RadDiagram scroll along when you drag a shape or a connector.
I'm not really sure what the best approach is here though, I know how to implement it with a regular ScrollView but this is slightly different.

I found some information here: here and here regarding autoscrolling but when I apply it to a diagram like this:

<telerik:RadDiagram Grid.Column="1" Grid.Row="1" x:Name="diagram"
                            ScrollViewer.HorizontalScrollBarVisibility="Visible"
                            ScrollViewer.VerticalScrollBarVisibility="Visible"
                            RouteConnections="True"
                            ConnectionRoundedCorners="True"
                            telerik:ScrollingSettingsBehavior.IsEnabled="True"/>

The following error appears in VS:
Error Value cannot be null.
Parameter name: scrollingService

Can autoscroll be enabled for RadDiagrams? Or am I doing something wrong here.

 

Joost
Top achievements
Rank 1
 answered on 28 Sep 2015
2 answers
107 views

Hey,

Im using the RadScheduleView Control with different ViewDefinitions as below.

<telerik:RadScheduleView.ViewDefinitions>
                    <telerik:DayViewDefinition Orientation="Horizontal"
                                               GroupHeaderDateStringFormat="{}{0: dddd dd/MMM}"
                                               GroupFilter="{Binding GroupFilter}"
                                               AppointmentFilter="{Binding AppointmentsFilter}"
                                               />
 
                    <telerik:TimelineViewDefinition Title="Week"
                                                    VisibleDays="7"
                                                    GroupFilter="{Binding GroupFilter}"
                                                    TimerulerMajorTickStringFormat="{}{00:%H:mm}"
                                                    AppointmentFilter="{Binding AppointmentsFilter}"
                                                    LargeChangeInterval="7d"
                                                    TimerulerGroupStringFormat="{}{0: dddd dd/MMM}"
                                                    StretchAppointments="True" StretchGroupHeaders="True"
                                                    />
                    <telerik:TimelineViewDefinition Title="Month"
                                                    VisibleDays="30"
                                                    GroupFilter="{Binding GroupFilter}"
                                                    AppointmentFilter="{Binding AppointmentsFilter}"
                                                    TimerulerGroupStringFormat="{}{0: dd/MMM}"
                                                    TimerulerMajorTickStringFormat="{}{00:%H:mm}"
                                                    LargeChangeInterval="1m"/>
                </telerik:RadScheduleView.ViewDefinitions>

If i start my Programm on a monitor with high resolution there is a white space on the right side of the scheduler in each ViewDefinition ( see attached image ).

Is it possible to stretch the ScheduleView over the complete Monitor and get rid of this white field?

Thanks

Thomas

Thomas
Top achievements
Rank 1
 answered on 28 Sep 2015
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
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
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
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?