Telerik Forums
UI for WPF Forum
1 answer
136 views

Hi,

I use global custom template for Window control in application. So all dialogs have Ok, Cansel buttons and Close button. The problem is that the same style is applied to drag&drop window that appears when I'm reordering columns in RadGridView. So it looks like it also uses that Window template.

Is there a way how could I change style for drag and drop header in RadGridView without modifying my global template?

Nasko
Telerik team
 answered on 23 Oct 2015
1 answer
245 views

I have a RadTreeView that I am binding to some data.

I would like to have all the items in the tree expanded by default.

The issue I have when I do this is that the tree is autoscrolling to the right to bring into focus the most right hand expanded item.

To try and get round this I have disabled the horizontal scroll bar, call ExpandAll(), then after that reenable the horizontal scroll bar.

This is not working.

private void FrameworkElement_OnLoaded(object sender, RoutedEventArgs e)
        {
            RadTreeView rtv = sender as RadTreeView;
 
            if (rtv.ScrollViewer != null)
            {
 
                rtv.ScrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Disabled;
 
                rtv.ExpandAll();
 
                rtv.ScrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Auto;
            }
        }

Please can you advise on the correct way to achieve this?

 Thanks.

Petar Mladenov
Telerik team
 answered on 23 Oct 2015
1 answer
787 views

Hello,

 I am using RadCartesianChart  LineSeries and I can not set line color.

my XAML

        <chart:RadCartesianChart x:Name="radChart"
                                 Grid.Row="3" 
                                 Grid.Column="0" 
                                 Palette="Windows8" 
                                 Margin="6,-5,0,0"                                  
                                 Height="240">
            <chart:RadCartesianChart.Resources>
                <DataTemplate x:Key="PointTemplate1">
                    <Ellipse Height="10" Width="10" Fill="#FF1B9DDE" />
                </DataTemplate>
            </chart:RadCartesianChart.Resources>
            <chart:RadCartesianChart.HorizontalAxis>
                <chartView:CategoricalAxis FontSize="14"/>
            </chart:RadCartesianChart.HorizontalAxis>
            <chart:RadCartesianChart.VerticalAxis>
                <chartView:LinearAxis FontFamily="Segoe UI" FontSize="14" Title="Calories"   TickThickness="1" Minimum="0"    Maximum="{Binding LinearAxisMaxValue}"           />               
            </chart:RadCartesianChart.VerticalAxis>
            <chart:RadCartesianChart.Grid>
                <chartView:CartesianChartGrid MajorLinesVisibility="XY" StripLinesVisibility="none"  />
            </chart:RadCartesianChart.Grid>
            <ctChart:ChartSeriesTypeSwitch.SeriesType >
                <Binding Path="SelectedChartType" />
            </ctChart:ChartSeriesTypeSwitch.SeriesType>

        </chart:RadCartesianChart>​

 

please help me

Martin Ivanov
Telerik team
 answered on 23 Oct 2015
1 answer
180 views

When copying multiple cells from an excel sheet to the GridView, empty cells are skipped and following non-empty cells are moved forward. See attached screenshots for an illustration.

This behavior is undesirable for obvious reasons. Is this a bug or a feature. If it's a feature, is there a workaround?

Maya
Telerik team
 answered on 22 Oct 2015
2 answers
188 views

We are implementing a drag&drop scenario, where the drop target can be another control from our application or the drop target can be the desktop or another folder from the file system. How can I set the dragged data inside the DragInitializeHandler to handle both scenarios simultaneously?

If the dragged data is a DataObject where the data is set via SetFileDropList I can drag the data to the desktop but not to another control. If I create a IPayload and sets the data via SetData("DragData", ...) and SetData("FileDrop", ...) I can drag the data to the other control but not to the desktop?

How can I create a payload, which is working for both scenarios? 

Felix

Felix
Top achievements
Rank 1
 answered on 22 Oct 2015
4 answers
269 views

We are currently using a GridViewComboBoxColumn control in a GridView, and like a few others, we would like the combobox editor (arrow) to always be visible. Most answers have involved using the said 'GridViewComboBoxColumn' or a 'GridViewDataColumn' in conjunction with a DataTemplate to target the ComboBox. 

 I have both approaches, both with the same result. I get a column of combo boxes, but no data.

This is our current markup:

 

<telerik:GridViewComboBoxColumn x:Name="ColP4" Width="150" IsReadOnly="False" IsComboBoxEditable="False" EditTriggers="CellClick" ItemsSource="{Binding PermissionCollection}" DataMemberBinding="{Binding Col4}" UniqueName="Permission" Header="{Binding Source={StaticResource TranslationAreas}, Path=[exportproject][TXT_COLUMN_5]}" DisplayMemberPath="Name" SelectedValueMemberPath="ID"/>

ItemsSource is an ObservableCollection of type 'Permission'. Permission has two properties, int: ID and str: Name.  

 This looks like what we want, only with no data:

 

<telerik:GridViewDataColumn x:Name="ColP4"
      DataMemberBinding="{Binding Col4}"
      Header="{Binding Source={StaticResource TranslationAreas}, Path=[exportproject]
          [TXT_COLUMN_5]}" >
      <telerik:GridViewColumn.CellTemplate>
          <DataTemplate>
              <ComboBox DisplayMemberPath="Name"
                        ItemsSource="{Binding PermissionCollection}"
                        SelectedValue="ID"
                        SelectedValuePath="ID"/>
           </DataTemplate>
       </telerik:GridViewColumn.CellTemplate>
</telerik:GridViewDataColumn>

 

 I'm sure the problem lies with the databinding. Any help is very much appreciated.

Stefan
Telerik team
 answered on 22 Oct 2015
2 answers
170 views

I have a grid like this:

<telerik:RadGridView x:Name="DataG"ItemsSource="{Binding CamposUsu}"SelectedItem="{Binding Selected}"CanUserReorderColumns="True"CanUserResizeColumns="True"CanUserSortColumns="False"SelectionUnity="FullRow"IsReadyOnly="True"AutoGenerateColumns="False"Loaded="DataG_Loaded" />

 

In the .cs file the method DataG_Loaded:

private void DataG_Loaded(object sender, RoutedEventesArgs e)

{

DataTemplate labelTemplate = new DataTemplate();

FrameworkElementFactory label = new FrameworkElementFactory(typeof(Label));

label.SetValue(Label.ContentProperty, "Unlimited");

labelTemplate.VisualTree = label;

labelTemplate.Seal();this.DataG.Columns[7].CellTemplate = labelTemplate;

//this column 7 is a column called "Vl." with double values

}

Well, when I comment the method DataG_Loaded, my grid is fulfilled correctly with the objects I created on my viewmodel. When I uncomment the method, the column "Vl." that had values like "93.5", "108.9"... is all fulfilled with the value "Unlimited".
This was already expected. I want only the cells that the value is > 100.0 to turn to the string "Unlimited".

Is there any way of doing this?

Martin
Telerik team
 answered on 22 Oct 2015
1 answer
145 views

Hi,

is it possible to stretch the labels of an categorical axis? I want to create an axis like shown in the goal.jpg

I tried the following code to recived the wished layout:

<telerik:CategoricalAxis TickThickness="0" GapLength="0.1">
  <telerik:CategoricalAxis.LabelTemplate>
    <DataTemplate>
      <StackPanel HorizontalAlignment="Stretch">
        <Border BorderBrush="Black" BorderThickness="1,1,1,0">
          <TextBlock Text="{Binding}"/>
        </Border>
        <Border BorderBrush="Black" BorderThickness="1">
          <TextBlock Text="{Binding Text2}"/>
        </Border>
      </StackPanel>
    </DataTemplate>
  </telerik:CategoricalAxis.LabelTemplate>
</telerik:CategoricalAxis>

But the label does not stretched it still fit ti it contents like shown in StretchedLabelResult.jpg

 Does anyone have an idea how to recive the wished layout?

Dinko | Tech Support Engineer
Telerik team
 answered on 22 Oct 2015
1 answer
178 views

I have a single view with a number of different graphs, all of which have the same x-axis data based on dates.

At present I have the zoom behaviour syncing between the graphs but I would also like to have a trackball behaviour shared between them, is this possible? Or is there ​any way I could reproduce the effect of a trackball line?

Martin Ivanov
Telerik team
 answered on 22 Oct 2015
1 answer
81 views

Hi,

I have a question about GridView group sorting problem.

If I have some data like this:

Group_Name | Group_Order

T_group         |        1

T_group         |        1​

M_group        |        3

M_group        |        3

M_group        |        3​​

J_group         |         2

J_group         |         2 

I want to GridView grouping by "Group_name" but the group order column is "Group_Order".

 

Do you have some good idea?

Thank you

 

 

 

Maya
Telerik team
 answered on 22 Oct 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
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?