Telerik Forums
UI for WPF Forum
1 answer
126 views
Hello,

i am using q3 version of wpf controls. I am finding a weird behaviour-  when i group flds, horizontal and vertical scroll bar disappears.

Please let me know if i am missing anything here or is it a bug?

Regards,
Sandy

i have set these properties:

ScrollViewer.HorizontalScrollBarVisibility

 

="Visible" ScrollViewer.VerticalScrollBarVisibility="Visible"

 

 

ScrollViewer.CanContentScroll="True"

and this is grouped event handler:

 

 

private void WipGrid_Grouping(object sender, GridViewGroupingEventArgs e)

 

{

 

try

 

{

 

var countFunction = new CountFunction();

 

countFunction.Caption =

"Total records: ";

 

countFunction.FunctionName =

"Count";

 

e.GroupDescriptor.AggregateFunctions.Add(countFunction);

 

}

 

Missing User
 answered on 06 Jan 2010
1 answer
149 views
Hi all,

I'm trying to use a List of custom class to fill the itemsSource of RadCarousel.

This is the code of Page1.xaml:

<Page x:Class="Page1" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" 
    xmlns:carousel="clr-namespace:Telerik.Windows.Controls.Carousel;assembly=Telerik.Windows.Controls.Navigation" 
    Title="Page1"
    <Grid> 
        <telerik:RadCarousel x:Name="carPacientes" HorizontalAlignment="Stretch" 
                VerticalAlignment="Stretch" Background="Black" AutoGenerateDataPresenters="False" Foreground="White"
            <telerik:RadCarousel.Resources> 
                <Style TargetType="telerik:CarouselItem"
                    <Setter Property="Template"
                        <Setter.Value> 
                            <ControlTemplate TargetType="telerik:CarouselItem"
                                <Label Content="{Binding Path=Apellidos}" FontSize="12" Foreground="Black" Background="Aqua" /> 
                            </ControlTemplate> 
                        </Setter.Value> 
                    </Setter> 
                </Style> 
            </telerik:RadCarousel.Resources> 
        </telerik:RadCarousel> 
    </Grid> 
</Page> 
 

And this is the code to fill the RadCarousel Page1.xaml.vb:

Imports MDOL.Business.Logic 
 
Partial Public Class Page1 
 
    Public Shared opcion As String 
 
    Public Sub New() 
        InitializeComponent() 
 
        Dim pacs As List(Of Paciente) = New List(Of Paciente) 
 
        Dim pac As Paciente = Nothing 
 
        For i = 1 To 10 
 
            pac = New Paciente 
            pac.IdPaciente = Convert.ToString(i) 
 
            pac.Nombre = "Gerard" 
            pac.Apellidos = "Subirana" 
 
            pacs.Add(pac) 
            pac = Nothing 
        Next 
 
        Me.carPacientes.ItemsSource = pacs 
 
    End Sub 
 
End Class 

When I run the application appears 10 radcarousel items but the labels with the property Apellidos still empty... what's wrong?

Thank's in advance.

Gerard
Rossen Hristov
Telerik team
 answered on 06 Jan 2010
3 answers
440 views
Hi Can anyone please guide me to a creating a simple pie chart with legend in the code behind in C# or have some code.

Basically I have a datatable which returns the following data and would like to draw a pei chart:

Exercise Type A: 30
Exercise Type B : 60
Exercise Type C : 10

All the examples I have seen so far is for bar graphs.

Many Thanks
shahab
Giuseppe
Telerik team
 answered on 06 Jan 2010
7 answers
349 views
Hello,
I'm evaluating the GridView by writing a small app to test it.
In the app I'm using 2 grids: the RadGridView on one side of the view and Xceed's DataGridControl on the other.
Both grid's ItemsSource have the same instance of ObservableCollection<Order> (from NW db) that is set from the code behind.

One thing that is immidiately noticable, even with a small amount of records (100),
is when scrolling vertically - the RadGridView seems to take a while to update the view (compared to Xceed's grid).
whether if I drag the scroller up and down or if I click on it to perform a big scroll step.

My XAML for the RadGridView looks like this:

<telerik:RadGridView
    telerik:StyleManager.Theme="Vista" 
    
IsReadOnly="True"
    ScrollMode
="RealTime" />

 

Is this a known behavior or am I missing something?
Is there a way to fix this?

Thanks,
David

Vlad
Telerik team
 answered on 06 Jan 2010
5 answers
386 views
I'm trying to bind the gridview to an ObservableCollection<MyListItem>. In my collection I have a mixture of items that inherit from MyListItem e.g. MyAppleItem and MyOrangeItem.  Fields bound in the grid are bound to properties exposed in the base MyListItem type. The binding works fine when the colleciton contains a list with a single type in it but as soon as I have a collection with some MyAppleItem and MyOrangeItem I get an argument exception:

{"The value \"MyAppleItem\" is not of type \"MyOrangeItem\" and cannot be used in this generic collection.\r\nParameter name: value"}

I need the items in their original types as I use a converter on one of the columns etc.  How do I make use of polymorphism with the grid binding?
Stefan Dobrev
Telerik team
 answered on 06 Jan 2010
1 answer
259 views
Hi

I have a RadGridView containing some "command"- columns and some information columns.

Like this:

Name Adress IsOnline Edit Delete
John Anystreet 10a Yes [Button] [Button]

When i copy a Column to Clipboard the two "command"-columns are copied too. 

How can i change the grid that these columns are ignored when the row is copied?
Vlad
Telerik team
 answered on 05 Jan 2010
5 answers
241 views

Hi,

I am using RADTreeview and  I would like to bind the heterogeneous  data as the hierarchal structure. For e.g. I want to bind List<A> which has List<B> and List<C> as its children. 

Regards,
-Kshama

Kiril Stanoev
Telerik team
 answered on 05 Jan 2010
1 answer
79 views
What is the best way to handle this situation?

I have a master grid and its child data is accessed through the RowDetailsTemplate which is pointing to a customized UserControl. Inside the UserControl is a tab control with a grid inside each tab. When a child grid is in edit mode and the form is closed, the grid's rowEditEnded event doesn't fire. The rowEditEnded event is where I tell my program to post/save the row's data.

So, how am I suppose to save the data of that row? Should I expose a function of the user control and have the WPF call it when closing?

Thank You.
Stefan Dobrev
Telerik team
 answered on 05 Jan 2010
3 answers
175 views
Hello,
   I was trying to figure out how to programmatically scroll the grid but the documentation on this site and on the Net did not help much. I finally figured it out. I have this code in the TextChanged event of a textbox so when the user types in some text this code is executed and the first line in the grid that contains the text in the textbox is scrolled too.

Here's my solution:

int numRows = gridname.Items.Count;

 for (int i = 0; i < numRows; i++)
    if (gridname.Items[i].ToString().Contains(<Text to look for goes in here>)
      {
         this.gridname.ScrollIntoView(gridname.Items[i]);
         break;
      }

My grid only contains 1 column.
Jorge Gonzalez
Top achievements
Rank 1
 answered on 04 Jan 2010
3 answers
219 views
I have the following hierarchy structure

Item (object)
- List<Item>Children (property)
- ItemType (property)

ItemType (object)
- ImageSource Icon (property)

My Icons are stored as .png resource files.  So, I can't load them directly.  Instead, I need to convert them from a Bitmap over to a BitmapSource.  They can then be used as the Icon (ImageSource).

Question is, does anyone have a good way in managed code to do this conversion?  I currently do this using interop but I would think there is a better way.  My current conversion method:

        public static BitmapSource LoadBitmap(Bitmap source)  
        {  
            return System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(  
                source.GetHbitmap(),  
                IntPtr.Zero, Int32Rect.Empty,  
                System.Windows.Media.Imaging.BitmapSizeOptions.FromEmptyOptions());  
        } 
Joel Palmer
Top achievements
Rank 2
 answered on 04 Jan 2010
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
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?