Telerik Forums
UI for WPF Forum
0 answers
117 views
Hello,

I'm using the RadGridView WPF control and I need to know when a row has moved.

Let me explain the situation, I have a hierarchical RadGridView control with rows and his details rows. I have an user control which is linked to each main row by X and Y position. When I expand a row, I need to know the position of next rows to update all user controls attached.

Do you see what I mean ?

Best regards,

Loic.

UPDATE : I have attached an image to explain what I mean. Thakns.
Loic
Top achievements
Rank 1
 asked on 20 Sep 2013
2 answers
355 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
180 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
198 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
141 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
150 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
243 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
44 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
109 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
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
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?