Telerik Forums
UI for WPF Forum
2 answers
334 views
Hello All,

I'm trying to setup the following scenario, running version 2013.2.724.40:
  • On my ViewModel, I have a QueryableCollectionView, with an EntityFramework IQueryable as it's source
  • I have a DataGrid, bound to this QueryableCollectionView
  • I have a DataPager, linked to this DataGrid

<telerik:RadGridView x:Name="radGridView"
         ItemsSource="{Binding MyQueryableCollectionView}"
         AutoGenerateColumns="True" />          
<telerik:RadDataPager
         Source="{Binding Items, ElementName=radGridView}"
         PageSize="10" DisplayMode="All" />

When I run this app, everything looks fine:
  • A query is ran on the db, selecting the top 10 records for the first page
  • The DataGrid shows the first page, 10 records
  • The DataPager calculates the correct number of pages

However, when I move to the second, third, .. page, the page is empty.
No new query is ran on the db to select the next 10 records.

Is this kind of scenario not supported out of the box?



Notes:
  • It does work when I load the entire record set when creating the QueryableCollectionView
    (of course, I do NOT want to do this, that's why I use paging)
  • I also tried by binding the DataPager Source to the QueryableCollectionView, but this has the same behavior.
    <telerik:RadGridView
             ItemsSource="{Binding MyQueryableCollectionView}"
             AutoGenerateColumns="True" />         
    <telerik:RadDataPager
             Source="{Binding MyQueryableCollectionView}"
             PageSize="10" DisplayMode="All" />
Dimitrina
Telerik team
 answered on 20 Sep 2013
1 answer
170 views
Hello

I'm trying to set the background for my chart to a specific backgroundcolor. But I don't want the whole chart to be that color, just the grid itself. But if I set that background, the color doesn't change.

<telerik:RadCartesianChart.Grid>
 <telerik:CartesianChartGrid MajorLinesVisibility="X" MajorXLineStyle="{StaticResource StripLinesStyle}" Background="#D8D3D0"/>
 </telerik:RadCartesianChart.Grid>


Also I was trying to set the color of the axis, and I couldn't find that option. Attached is an image of what I'm trying to make, not minding the graphs itself ;)

Thanks
Waut
Petar Kirov
Telerik team
 answered on 20 Sep 2013
5 answers
185 views
Hi there,

I'm facing to a weird issue. I have a RadGridView that is using Grouper Headers and Horizontal Scrolling.

When I want to export the grid without have been playing with the scrolling, the grouped headers are not exported correctly in the excel file. It is like if only the visible groups on the screen are able to be exported.

In opposite if I play with the scrolling before exporting the grid, the grouped headers will be correctly exported.

Have you got any idea about this issue?

Thank you in advance.

Alain

<telerik:RadGridView x:Name="StudyDisplayAllDataGrid"
AutoGenerateColumns="False" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
AutoExpandGroups="True" RowIndicatorVisibility="Collapsed" ShowGroupPanel="False"
IsReadOnly="True" GroupRenderMode="Flat"
Visibility="{Binding AnyProduct, Converter={StaticResource booleanToVisibleConverter}}"
ItemsSource="{Binding StudyProductsGrid}"/>


Using stream As IO.Stream = dialog.OpenFile()
            StudyDisplayAllDataGrid.Export(stream, New GridViewExportOptions() With { _
             .Format = ExportFormat.Html, _
             .ShowColumnHeaders = True, _
             .ShowColumnFooters = True, _
             .ShowGroupFooters = False _
            })
         End Using
Dimitrina
Telerik team
 answered on 20 Sep 2013
1 answer
131 views
Hi,

I am testing some controls including the polar chart, I load some data from a database into a DataTable like this:

DataTable dtData = new DataTable();
dtData.Columns.Add(new DataColumn("Name", typeof(string)));
dtData.Columns.Add(new DataColumn("Value", typeof(double)));

DataRow drCost;

RadarLineSeries rs = new RadarLineSeries();

foreach (DataRow dr in dtData.Rows)
{
CategoricalDataPoint dp = new CategoricalDataPoint();
dp.Category = dr["Name"].ToString();
dp.Value = double.Parse(dr["Value"].ToString());

rs.DataPoints.Add(dp);
}

rs.Stroke = new SolidColorBrush(Color.FromRgb(37, 160, 219));

RadarChartDemo.Series.Add(rs);

And the result is something like the attached image.

I would like to add tooltips to each point to see the values, does anyone knows how can I do this?

Thanks,

Alberto
Petar Kirov
Telerik team
 answered on 20 Sep 2013
3 answers
138 views
Hi,

Is it possible to create a visualization like screenshot attached.

I'm able to create a custom timeline view definition, displaying the weeks, correct days, snapping ...  however the length of the appointments is still proportional to the duration.
I want the same visualization for the appointment as in the month view definition.

How do I achieve this?

Thanks,

Koen 

Kalin
Telerik team
 answered on 20 Sep 2013
5 answers
225 views
Hi,
We are using PivotGrid with localdatasourceProvider connected to an Entity Framework DbContext.
We are using a navigation property to group the datas.
Pivotgrid display the name of our object returned by  .toString().
We would like to display one property of this object for our datatemplate.

What is the best solution ?

Thanks for all, Tristan
tristan Brenner
Top achievements
Rank 1
 answered on 20 Sep 2013
6 answers
1.3K+ views
I am using a RadPropertyGrid. I am trying to use the AutoGeneratingPropertyDefinition event to provide a custom EditorTemplate with a textbox. I want to add a handler to the TextChanged event of the textbox but my event handler is never being called.

Relevant code:
public void GeneratingProperty(AutoGeneratingPropertyDefinitionEventArgs e)
{
    try
    {
        AvailableProperties property = (AvailableProperties)Enum.Parse(typeof(AvailableProperties), e.PropertyDefinition.Binding.Path.Path);
        if (IsAvailable(item.GetAvailableProperties(), property))
        {
            switch (property)
            {
                case AvailableProperties.Title:
                    FrameworkElementFactory textBoxFactory = new FrameworkElementFactory(typeof(TextBox));
                    textBoxFactory.AddHandler(TextBox.TextChangedEvent, new TextChangedEventHandler(TitleTextChanged));
                    textBoxFactory.SetValue(TextBox.BackgroundProperty, System.Windows.Media.Brushes.Tomato);
                    textBoxFactory.SetValue(TextBox.BorderBrushProperty, System.Windows.Media.Brushes.Transparent);
                    textBoxFactory.SetBinding(TextBox.TextProperty, new Binding("Title"));
 
                    DataTemplate template = new DataTemplate();
                    template.VisualTree = textBoxFactory;
                    template.Seal();
 
                    e.PropertyDefinition.EditorTemplate = template;
                    e.PropertyDefinition.OrderIndex = 0;
                    e.PropertyDefinition.DisplayName = "Title";
                    e.PropertyDefinition.Description = "The title of the attribute. Can only contain letters, numbers, and underscores.";
 
                    break;
                default:
                    // other properties go in case statements above here
                    break;
            }
        }
        else
        {
            e.Cancel = true;
        }
    }
    catch
    {
        e.Cancel = true;
    }
}
 
public void TitleTextChanged(object sender, TextChangedEventArgs e)
{
    if (sender is TextBox)
    {
        TextBox titleTextBox = (TextBox)sender;
        int caretIndex = titleTextBox.CaretIndex;
        string newValue = titleTextBox.Text;
 
        item.Title = newValue;
        ApplyCorrectedValue(newValue, item.Title, titleTextBox, caretIndex);
 
        NotifyOfPropertyChange(() => MappingsPanel);
    }
    else
    {
        Logger.Log("TitleChanged: source must be a TextBox");
        throw new ArgumentException("source must be a TextBox");
    }
}
I am using the 2012.2.912.35 version of the telerik dlls
Dimitrina
Telerik team
 answered on 20 Sep 2013
1 answer
38 views
Hiya, I'm sorry but without setting a precedent, I know that you are very busy, I would need a response as soon as possible:
http://www.telerik.com/community/forums/wpf/general-discussions/calling-a-udf-for-populating-a-radgridview-fails.aspx


I really very appreciate your help
Dimitrina
Telerik team
 answered on 20 Sep 2013
1 answer
97 views

Hi ya, I'm trying to populate one RadGridView using an UDF Sql Server which waits a parameter but it doesn't work:


XAML:

<telerik:RadGridView x:Name="dgvHistoricoOR"  HorizontalAlignment="Left" FontFamily="Segoe UI"
                                       FontSize="12" FontStyle="Normal"
          Margin="10,44,-185,0"  VerticalAlignment="Top" Height="175" Width="437"
          ColumnWidth="SizeToCells" Grid.ColumnSpan="2" Grid.RowSpan="2">
 
          <telerik:RadGridView.Columns>
              <telerik:GridViewDataColumn DataMemberBinding="{Binding ord_repalpha}" Header="{Resx RadGridViewOr_Or}"
                                          Width="40"/>
                      <telerik:GridViewDataColumn DataMemberBinding="{Binding F_Alta}" Header="{Resx RadGridViewOr_Alta}"
                                                  Width="60"/>
                      <telerik:GridViewDataColumn DataMemberBinding="{Binding F_Cierre}" Header="{Resx RadGridViewOr_Cierre}"
                                                  Width="60"/>
          </telerik:RadGridView.Columns>

Code-behind:


ada = New SqlDataAdapter("SELECT * FROM OR_Historico_Por_Cliente(@par1)", aBD.connection)
        ada.SelectCommand.Parameters.AddWithValue("@par1", Documento)
 
 
        ada.Fill(ds, "OR_Historico_Por_Cliente")
        Me.dgvHistoricoOR.ItemsSource = "OR_Historico_Por_Cliente"
 
        Me.dgvHistoricoOR.DataContext = ds




OR_Historico_Por_Cliente('') UDF Sql2k8 returns a TABLE

I don't get data, my Grid remains empty

I wonder, when I call Fill method, should I include the value for the parameter???


Help!
Dimitrina
Telerik team
 answered on 20 Sep 2013
1 answer
231 views
I'm working on a screen with WPF which has 3 listbox (list1, list2, list3), and i can drag items from list1 to list2 and list2 to list3 or even list1 to list3, and i can do it reversely.

I had to change the listbox (list3) to radListBox, because i wanted to implement the reorder within this list, i managed that drag and drop worked, and it did. but when a i wanted to drag an item from list3 (radlistbox), i got null in this variable :
" var data = ((DataObject)args.Data).GetData("DragData") as UcFileColumn", which UcFileColumn is a user control that i wanna cast with to drop in other lists. So insted od using "data" i thought using then selectedItem property to take the item dragged, and it works. Still one mysterious behaviour occured, is that when i dropped items in the lists3 (radListBox) and then drag them back into the lists(list1 or list2), and i wanted to dropped them back, the list prevent me to drop, i think when i remove item from teh radlistbox, the allowdrag dosent set anymore !!!!, is that because i used SelectedItem, if yes how should i get the element dragged from (DataObject)args.Data).GetData..

here is my XAML CODE : 

<UserControl.Resources>
        <Style x:Key="DraggableListBoxItem" TargetType="controls4:RadListBoxItem">
            <Setter Property="dragDrop:DragDropManager.AllowCapturedDrag" Value="True" />
            <Setter Property="dragDrop:DragDropManager.AllowDrag" Value="True" />
        </Style>
    </UserControl.Resources>
<ListBox Grid.Row="2" x:Name="List1"  ItemsSource="{Binding Source1, Mode=TwoWay}" AllowDrop="True" IsSynchronizedWithCurrentItem="True"
                     Style="{StaticResource ListBoxStyleMenu}" Margin="2,2,2,2"
                     VerticalAlignment="Stretch" HorizontalContentAlignment="Center" HorizontalAlignment="Stretch">
 
                    <ListBox.ItemsPanel>
                        <ItemsPanelTemplate>
                            <UniformGrid Columns="2" />
                        </ItemsPanelTemplate>
                    </ListBox.ItemsPanel>
                    <ListBox.ItemContainerStyle>
                        <Style TargetType="{x:Type ListBoxItem}">
                            <Setter Property="Focusable" Value="False"/>
                            <Setter Property="Margin" Value="0,5,0,5" />
                        </Style>
                    </ListBox.ItemContainerStyle>
                </ListBox>
<ListBox Grid.Row="2" x:Name="List2"  ItemsSource="{Binding Source2, Mode=TwoWay}" AllowDrop="True" IsSynchronizedWithCurrentItem="True"
                     Style="{StaticResource ListBoxStyleMenu}" Margin="2,2,2,2"
                     VerticalAlignment="Stretch" HorizontalContentAlignment="Center" HorizontalAlignment="Stretch">
 
                    <ListBox.ItemsPanel>
                        <ItemsPanelTemplate>
                            <UniformGrid Columns="2" />
                        </ItemsPanelTemplate>
                    </ListBox.ItemsPanel>
                    <ListBox.ItemContainerStyle>
                        <Style TargetType="{x:Type ListBoxItem}">
                            <Setter Property="Focusable" Value="False"/>
                            <Setter Property="Margin" Value="0,5,0,5" />
                        </Style>
                    </ListBox.ItemContainerStyle>
                </ListBox>
<controls4:RadListBox x:Name="List3"  ItemsSource="{Binding Source3}" AllowDrop="False" SelectedItem="{Binding SourceSelected, Mode=TwoWay}"
                     VerticalAlignment="Stretch" HorizontalContentAlignment="Center" HorizontalAlignment="Stretch"
                    Margin="2,2,2,2" ItemContainerStyle="{StaticResource DraggableListBoxItem}">
                <controls4:RadListBox.DragDropBehavior>
                    <behaviors:ListBoxDragDropBehavior AllowReorder="True" dragDrop:DragDropManager.TouchDragTrigger="TapAndHold" />
                </controls4:RadListBox.DragDropBehavior>
 </controls4:RadListBox>


I'm looking forward for your response

Rosen Vladimirov
Telerik team
 answered on 20 Sep 2013
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
PersistenceFramework
DataPager
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
ProgressBar
Sparkline
LayoutControl
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
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?