Telerik Forums
UI for WPF Forum
10 answers
280 views
Hello, i created some user control and it has telerik grid inside. Problem is with scrollbars - they dont appear automaticaly. even when grid has many columns. See my attached image.
My user control:
<UserControl x:Class="XSoftArt.WPFengine.BaseClasses.ListTemplate" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    > 
    <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> 
         
        <Menu Name="menu1" Height="54" VerticalAlignment="Top" Background="AliceBlue"> 
             
            <MenuItem Name="MenuItemReports" Background="AliceBlue" Click="MenuItemReports_Click"> 
                <MenuItem.Header> 
                    <StackPanel> 
                        <Image Width="32" Height="32" Source="/XSoftArt.WPFengine;component/Images/reports.png" /> 
                        <ContentPresenter Content="Reports" /> 
                    </StackPanel> 
                </MenuItem.Header> 
            </MenuItem> 
 
            <MenuItem Name="MenuItemExport" Background="AliceBlue" Click="MenuItemExport_Click"> 
                <MenuItem.Header> 
                    <StackPanel> 
                        <Image Width="32" Height="32" Source="/XSoftArt.WPFengine;component/Images/export32x32xp.png" /> 
                        <ContentPresenter Content="Export" /> 
                    </StackPanel> 
                </MenuItem.Header> 
            </MenuItem> 
 
            <MenuItem Name="MenuItemNewRecord" Background="AliceBlue" Click="MenuItemNewRecord_Click"> 
                <MenuItem.Header> 
                    <StackPanel> 
                        <Image Width="32" Height="32" Source="/XSoftArt.WPFengine;component/Images/new32.png" /> 
                        <ContentPresenter Content="New record" /> 
                    </StackPanel> 
                </MenuItem.Header> 
            </MenuItem> 
 
            <MenuItem Name="MenuItemEditRecord" Background="AliceBlue" Click="MenuItemEditRecord_Click"> 
                <MenuItem.Header> 
                    <StackPanel> 
                        <Image Width="32" Height="32" Source="/XSoftArt.WPFengine;component/Images/edit32.png" /> 
                        <ContentPresenter Content="Edit record" /> 
                    </StackPanel> 
                </MenuItem.Header> 
            </MenuItem> 
 
            <MenuItem Name="MenuItemDeleteRecord" Background="AliceBlue" Click="MenuItemDeleteRecord_Click"> 
                <MenuItem.Header> 
                    <StackPanel> 
                        <Image Width="32" Height="32" Source="/XSoftArt.WPFengine;component/Images/delete32.png" /> 
                        <ContentPresenter Content="Delete record" /> 
                    </StackPanel> 
                </MenuItem.Header> 
            </MenuItem> 
 
            <MenuItem Name="MenuItemSettings" Background="AliceBlue" Click="MenuItemSettings_Click"> 
                <MenuItem.Header> 
                    <StackPanel> 
                        <Image Width="32" Height="32" Source="/XSoftArt.WPFengine;component/Images/settings32.png" /> 
                        <ContentPresenter Content="Settings" /> 
                    </StackPanel> 
                </MenuItem.Header> 
            </MenuItem> 
 
            <MenuItem Name="MenuItemRecordHistory" Background="AliceBlue" Click="MenuItemRecordHistory_Click"> 
                <MenuItem.Header> 
                    <StackPanel> 
                        <Image Width="32" Height="32" Source="/XSoftArt.WPFengine;component/Images/histrory32x32xp.png" /> 
                        <ContentPresenter Content="Record history" /> 
                    </StackPanel> 
                </MenuItem.Header> 
            </MenuItem> 
 
            <MenuItem Name="MenuItemClose" Background="AliceBlue" Click="MenuItemClose_Click"> 
                <MenuItem.Header> 
                    <StackPanel> 
                        <Image Width="32" Height="32" Source="/XSoftArt.WPFengine;component/Images/uzdaryti programa.png" /> 
                        <ContentPresenter Content="Close window" /> 
                    </StackPanel> 
                </MenuItem.Header> 
            </MenuItem> 
 
        </Menu> 
        <Grid Margin="0,54,0,0" Name="grid1" Height="43" VerticalAlignment="Top" Background="AliceBlue"></Grid> 
        <Grid Margin="0,96,0,0" Name="grid2" Height="36" VerticalAlignment="Top" Background="AliceBlue"> 
            <Label HorizontalAlignment="Left" Margin="5,7,0,-5" Name="label1" Width="85.223">Record count:</Label> 
            <Label HorizontalAlignment="Left" Margin="85,7,0,4" Name="labelRecordCount" Width="57">0</Label> 
            <dxe:CheckEdit HorizontalAlignment="Left" Margin="124,7,0,7" Name="checkEdit1" Width="72" xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" Checked="checkEdit1_Checked" Unchecked="checkEdit1_Unchecked">Select all</dxe:CheckEdit> 
            <Button Click="buttonDeleteSelected_Click" Background="AliceBlue" BorderThickness="2" HorizontalAlignment="Left" Margin="202,7,0,4" Name="buttonDeleteSelected" Width="89.183" FontSize="9">Delete selected</Button> 
            <Label HorizontalAlignment="Right" Margin="0,4,6,4" Name="labelSelectTime" Width="122" FlowDirection="RightToLeft">0</Label> 
            <Button HorizontalAlignment="Left" Margin="296.81,7,0,6" Background="AliceBlue" BorderThickness="2" Click="buttonSaveColumnLayout_Click" Name="buttonSaveColumnLayout" Width="125.743">Save column layout</Button> 
        </Grid> 
 
        <StackPanel Margin="0,58,149,0" Name="stackPanel1" Width="32" Height="32" HorizontalAlignment="Right" VerticalAlignment="Top"> 
            <Button Name="Button_ReloadData" Click="Button_ReloadData_Click" Background="AliceBlue" > 
                <Image Source="/XSoftArt.WPFengine;component/Images/reload32.png"></Image> 
            </Button> 
        </StackPanel> 
         
        <telerik:GridViewDataControl HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Name="dataGridView1" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" Margin="1.425,134,0,0" /> 
         
    </Grid> 
</UserControl> 
 
My tabControl, of which content is this user control:
<telerik:RadTabControl Margin="0,91,0,-2.896" x:Name="tabControlR" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" /> 
Method, which fills tabItem content:
            RadTabItem tabItem = new RadTabItem(); 
            ListTemplate lst = new ListTemplate(); 
            
            lst.tabWindow = tabItem; 
            tabItem.Content = lst; 
            tabItem.Header = "Paieskos langas II"; 
            tabItem.Name = "tabPaieskosTestas"; 
            tabControlR.Items.Add(tabItem); 
How to make the grid to get scrollbars automatically in all dimensions, depending on the data and tab item measurements..? 
Kalin Milanov
Telerik team
 answered on 04 Jan 2010
1 answer
84 views
Hello,
I facing a issue with telerik Rad gridview version '2009.3.1103.35'.
After typing in cell of the gridview am pressing the tab key which will points to next cell but the
data is not getting visible in the first cell.
But if we type the data into a cell and click outside of the gridview, at that time it shows the data
correctly.
Could anyone help me in solving the tab key press problem.

Regards
Anju
Nedyalko Nikolov
Telerik team
 answered on 04 Jan 2010
1 answer
304 views
Hi,

I am in need of a custom aggregate function which is required to sum certain values based on some conditions. Can anyone give sample code for writing the custom aggregate function in WPF RadGrid?
Vlad
Telerik team
 answered on 04 Jan 2010
2 answers
191 views
Hi,

How can i achieve functionality of changing row background color acording to even/odd value of row number. In other words: I would like to have all even-number rows in color A and all odd-number rows in color B, starting from first row in group.

Regards,
MC.
Maciej Czerwiakowski
Top achievements
Rank 1
 answered on 04 Jan 2010
6 answers
190 views
We have installed Q2003 SP1, but we are now getting StackOverflow Exception in WindowsBase.dll each time with click a RadComboBox.

All are defined as below:

        <telerik:RadComboBox x:Name="InsurancePositionComboBox" IsEnabled="{Binding DataContext.IsEnabled, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" 
                           Grid.Row="4" Grid.Column="6" 
                           ItemsSource="{Binding DataContext.InsurancePositionItems,RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" 
                           DisplayMemberPath="Name" 
                           SelectedValuePath="StakeholderId" 
                           SelectedValue="{Binding InsurancePositionId}" 
                           IsSynchronizedWithCurrentItem="True" Margin="10,0,0,0" Height="25" Width="170"> 
        </telerik:RadComboBox> 

Any idea ?
4ward s.r.l.
Top achievements
Rank 1
 answered on 03 Jan 2010
2 answers
173 views
In MS ListView I did like this to set color/brush on a row with sertial "Category" value.

 <Window.Resources> 
        <Style x:Key="ItemContStyle" TargetType="{x:Type ListViewItem}">  
            <Style.Resources> 
                <LinearGradientBrush x:Key="Brush1" StartPoint="0.5,0" EndPoint="0.5,1">  
                    <GradientStop Offset="0.1" Color="#AA00CC00" /> 
                    <GradientStop Offset="0.8" Color="#55008800" /> 
                </LinearGradientBrush> 
                  
        <LinearGradientBrush x:Key="Brush2" StartPoint="0.5,0" EndPoint="0.5,1">  
                    <GradientStop Offset="0.1" Color="Orange" /> 
                    <GradientStop Offset="0.8" Color="OrangeRed" /> 
                </LinearGradientBrush> 
 
            </Style.Resources> 
 
 
            <Style.Triggers> 
                  
                <DataTrigger Binding="{Binding Path=Category}" Value="1">  
                    <Setter Property="Background" Value="{StaticResource Brush1}" /> 
                    <Setter Property="Height" Value="25"/>  
                </DataTrigger> 
                  
                <DataTrigger Binding="{Binding Path=Category}" Value="2">  
                    <Setter Property="Background" Value="{StaticResource Brush2}" /> 
                    <Setter Property="Height" Value="30"/>  
                </DataTrigger> 
                  
                 
            </Style.Triggers> 
        </Style> 
 
    </Window.Resources> 

In Listview
 <ListView x:Name="listView1" ItemContainerStyle="{StaticResource ItemContStyle}">  
<ListView.View> 
<GridView> 
 <GridViewColumn Header="Artist" DisplayMemberBinding="{Binding Path=Artist}" Width="310" /> 
<GridViewColumn Header="Title" DisplayMemberBinding="{Binding Path=Title}" Width="310" /> 
</GridView> 
</ListView.View> 
 </ListView> 

How can I applay the same method on RadGridView?
Tsvyatko
Telerik team
 answered on 30 Dec 2009
1 answer
108 views
Two Questions

1 how can i Control over the Place of the splitter ?

2 i want to change the header line background color to white ?
Rossen Hristov
Telerik team
 answered on 30 Dec 2009
1 answer
197 views
can't find in the latest documentation how to bind datatable to the radgridview. .itemssource works , table gets rows added , call .rebind , grid scrolls but rows are added with no values (or at least not displayed) , also how do I get scroll bars...

is this release of ddls botched? or is it me?
Rossen Hristov
Telerik team
 answered on 30 Dec 2009
3 answers
136 views

selected_id = (

string)((DataRow)((DataRecord)this.radGridView_A1.SelectedRecord).Data)[0];

DataRecord is gone, any sugguestions, Also, don't understrand why telerik posts examples (as of 3 months ago ) of apis that will be obscolete, wtf?


 

Rossen Hristov
Telerik team
 answered on 30 Dec 2009
1 answer
102 views

 

if (this.radGridView_A1.SelectedRecords.Count() == 0)


does not compile with the latest (q3) wpf dlls

 

Rossen Hristov
Telerik team
 answered on 30 Dec 2009
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
InlineAIAssistant
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?