Telerik Forums
UI for WPF Forum
4 answers
414 views
How do I get the GridViewRowItem object of the selected row in the RadGrid SelectionChanged event?


Jeffrey Lewis
Top achievements
Rank 1
 answered on 21 May 2010
3 answers
103 views

Hello Everyone,

I am creating a chart to display real-time data that is "polled" every 5 seconds. Additionally, my chart can contain multiple data series all of which will be spline. If I let the chart auto calculate the X axis bounds and ticks, it is extremely slow in displaying initial values. So I want to set the X axis manually. Here is the code I have so far:

radChart1.DefaultView.ChartArea.AxisX.LayoutMode = AxisLayoutMode.Normal;  
radChart1.DefaultView.ChartArea.AxisX.IsDateTime = true;  
radChart1.DefaultView.ChartArea.AxisX.DefaultLabelFormat = "T";  
radChart1.DefaultView.ChartArea.AxisX.AutoRange = false;  
DateTime MinVal = DateTime.Now;  
DateTime MaxVal = MinVal + TimeSpan.FromSeconds(UpdateInterval * (NumDataPoints + 1));  
radChart1.DefaultView.ChartArea.AxisX.AddRange(MinVal.ToOADate(), MaxVal.ToOADate(), 1.0);  
radChart1.DefaultView.ChartArea.AxisX.Step = 0.05;  
radChart1.DefaultView.ChartArea.AxisX.LabelStep = 1; 

Note that the default value for UpdateInterval is 5 and NumDataPoints is 10

However, using the above code, I only get two ticks on the X axis. What I really want is that the number of ticks should be the same as NumDataPoints and they should be equally distributed between the Min and Max of the X axis range. How can I achieve that? I have tried playing around with Step and LabelStep values but did not get anything different.

Any help would be greatly appreciated.

Thanks

-Ambar
Ambar Kulkarni
Top achievements
Rank 1
 answered on 20 May 2010
2 answers
82 views
Hi. I'm trying to implement Excel exporting on a RadGridView (it's been pretty frustrating btw), and I've noticed you have to manually set each row, group and header style when doing so. Is there any way I can export the grid with the appearance it's already got in my application?

Thanks.

PS: I'd really recommend for a next release a makeover of the grid's exporting capabilities, given the fact they're so limited right now.
Hugo Aristizabal
Top achievements
Rank 2
 answered on 20 May 2010
2 answers
185 views
Hi guys,

I have a requirement where I need to have VerticalScrollBar appeared right under the column headers.
Well, I was able to archive that by changing the ControlTemplate for the GridView where I moved GridViewHeaderRow to outside of the ScrollViewer. Everything seems to work just fine. Next I wanted to have a star sized columns and that's where I am having a little problem. I need my last Column Header to use all the remaining space; however there still a space of VerticalScrollBar's width on the right. It's not a filler column; simply DataCellsPresenter inside GridViewHeaderRow does not stretching its content all the way. How do I fix this.

Attached is sample pick.

Thanks,
Xoma
Top achievements
Rank 1
 answered on 20 May 2010
3 answers
94 views
Hello there,

Do the gridview support making a six level hierarchy in an easy way? 

Right now I'm setting my top data set as ItemsSource and then do a lot of child table definitions. To be able to remove GroupPanel and ColumnHeaders in my child nodes I'm listening on the DataLoading event casting the sender to a GridViewControl. For getting all the child column I have set the AutoGenerateColumns property to true. But I need to remove some of them so I also listening for AutoGeneratingColumn event. Doing this seems a little bit odd!

Another question is if I'm able to update the data at the bottom node in the gridview from a database without destroying the expanded hieararch made by the user?

Am I correct in my assumption that the gridview only support a two level hierarchy in a good manner.

Best wishes from Johan
Vlad
Telerik team
 answered on 20 May 2010
5 answers
163 views
Hello all.

I'm using RadChart and i want to hide values from chart.
Also there is grey background and i cannot change it. I've tried to change it, but it still remains grey. See attached image, please.
Chart's dimensions are 170x130.
Thank you in advance.
    Nenad
Nikolay
Telerik team
 answered on 20 May 2010
3 answers
75 views
Fix yo' code. :P
Pavel
Telerik team
 answered on 20 May 2010
1 answer
227 views
Hello,

I have an MVVM application.
In this application I use RadMap control with search engine via BingSearchProvider class.
If I binding result of work BingSearchProvider as ObservableCollection<Location> all works perfectly,
<telerik:InformationLayer x:Name="informationLayer"  
    ItemsSource="{Binding Path=LocationData.SearchResult}"
 <telerik:InformationLayer.ItemTemplate> 
.... 
 
 
public ObservableCollection<Location> SearchResult { getprivate set; } 
 
private void geoHelper_SearchCompleted(object sender, LocSearchCompletedEventArgs e) 
    SearchResult.Clear(); 
 
    var searchResult = e.Locations as ObservableCollection<MyMapItem>; 
    foreach(MyMapItem loc in searchResult) 
        SearchResult.Add(loc.Location); 

but if I try to wrap result in MyMapItem and try binding ObservableCollection <MyMapItem>
the map refuses to display search result positions on InformationLayer.
<telerik:InformationLayer x:Name="informationLayer"  
    ItemsSource="{Binding Path=LocationData.SearchResult.Location}"
 <telerik:InformationLayer.ItemTemplate> 
.... 
 
public class MyMapItem 
    public Location Location 
    { 
        get
        set
    } 
 
    public string Title 
    { 
        get
        set
    } 
 
    public string Description 
    { 
        get
        set
    } 
 
public ObservableCollection<MyMapItem> SearchResult { getprivate set; } 
 
private void geoHelper_SearchCompleted(object sender, LocSearchCompletedEventArgs e) 
    SearchResult.Clear(); 
 
    var searchResult = e.Locations as ObservableCollection<MyMapItem>; 
    foreach(MyMapItem loc in searchResult) 
       SearchResult.Add(loc); 

How i can solve this problem? How i can use custom class for display position on Radmap control? I don't want use buffer object list =(

Here is located the simple project which demonstrate a problem 

Vladimir Milev
Telerik team
 answered on 20 May 2010
1 answer
121 views
Hello all.

I'm working on stacked bar and i have one question about negative values.
Is it possible to show them on chart? Is it supported by <telerik: RadChart> control?
I have 5 vertical bars with 5 segments. See attached image, please.
You will be able to see that grey part from first bar is missing.
that one has negative value.
Is there any way / property which says to graph that it must be moved a little bit to the top and to show segnemt with negative value?
Nenad Djukic
Top achievements
Rank 1
 answered on 20 May 2010
1 answer
114 views
I cannot seem to find any documentation at all that shows how to use a WPF RadSplitButton. How do I add drop down items to the list?
Dimitrina
Telerik team
 answered on 20 May 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?