Telerik Forums
UI for WPF Forum
3 answers
386 views

Dear Support,

I try to use filtering but in distinct value area the values are not appear.
Any idea why?

Here is my xaml code:

<telerikGridView:RadGridView Grid.Row="1" Margin="5" x:Name="SearchGrid" AutoGenerateColumns="False"
             ItemsSource="{Binding Path=ValuesOfQuestions, Mode=OneWay}"
             DistinctValuesLoading="SearchGrid_DistinctValuesLoading"
             IsReadOnly="True" IsFilteringAllowed="True" ShowGroupPanel="False"
             ShowColumnFooters="False" ShowColumnSortIndexes="True">
 <telerikGridView:RadGridView.Columns>
     <telerikGridView:GridViewDataColumn x:Name="ID" Header="ID" ShowDistinctFilters="True" DataMemberBinding="{Binding Path=ID}" />
     <telerikGridView:GridViewDataColumn x:Name="Date" Header="Date" DataMemberBinding="{Binding Path=Date}" />
     <telerikGridView:GridViewDataColumn x:Name="Value" Header="Value" DataMemberBinding="{Binding Path=Value}" />
 </telerikGridView:RadGridView.Columns>
 </telerikGridView:RadGridView>

XAML code behind:

private void SearchGrid_DistinctValuesLoading(object sender, GridViewDistinctValuesLoadingEventArgs e)
        {
            e.ItemsSource = ((Telerik.Windows.Controls.RadGridView)sender).GetDistinctValues(e.Column, false);
        }

C# code:

public class ValuesOfQuestion
    {
        public int ID { get; set; }
        public string Value { get; set; }
        public DateTime Date { get; set; }
    }
 
     ValuesOfQuestions = new ObservableCollection<ValuesOfQuestion>();
for (int i = 0; i < 10; i++)
     {
      ValuesOfQuestions.Add(new ValuesOfQuestion { ID = i, Date = DateTime.Now, Value = "Value " + i.ToString() });
     }

And I attached a picture for my problem.

Thanks,

Robert.

Yoan
Telerik team
 answered on 13 Apr 2016
3 answers
265 views

Hi, 

how can I make tabs on the left side that are per default collapsed (see picture) and which should expand to the right side resizing the rest of the window (Grids, etc). I've made the tab on the left side setting TabStrip left but I can't do the rest. there is no collapse property on the tab? 

 

telerik:RadTabControl   Align="Right" BackgroundVisibility="Collapsed" TabStripPlacement="Left" Grid.RowSpan="4" Grid.Row="1" >
            <telerik:RadTabItem  Header="Something" >
                <telerik:RadTreeView Grid.Row="1" IsDragDropEnabled="True"   Grid.RowSpan="4" >
                    <telerik:RadTreeViewItem Header="Football" />
                    <telerik:RadTreeViewItem Header="Tennis" />
                    <telerik:RadTreeViewItem Header="Cycling" />
                    <telerik:RadTreeViewItem Header="Basketball" />
                </telerik:RadTreeView>
            </telerik:RadTabItem>
        </telerik:RadTabControl>

 

 

Ivan
Telerik team
 answered on 13 Apr 2016
4 answers
376 views

Hi! I use RadGridView in one of the views of my WPF MVVM Prism 6 application. The view was created on the base of Prism UserControl (WPF). The
solution of my application was created as empty Telerik project. After I had created the solution I added here RadWindow as Shell and also Prism 6
library for WPF via NuGet. I want to map RadGridView.AddingNewDataItem event to a command in viewmodel but unfortunately I can't. Below is RadGridView' XAML snippet from view' markup:

<telerik:RadGridView Grid.Row="1" Grid.Column="0" HorizontalAlignment="Center"  Margin="8,5,0,0" VerticalAlignment="Top" AutoGenerateColumns="False"
            IsReadOnly="True" ItemsSource="{Binding DeviceRecords}" SelectedItem="{Binding SelectedDevice}">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding DeviceName}" Header="Name"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding SerialNumber}" Header="Serial Number"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding MountingLocation}" Header="Mounting place"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding CompanyOwnerOfDevice}" Header="Device' owner"/>
            </telerik:RadGridView.Columns>

            <telerik:EventToCommandBehavior.EventBindings>
                <telerik:EventBinding
                    Command="{Binding HandleAddingNewRecordToDevicesGridCommand}"
                    EventName="AddingNewDataItem"
                    PassEventArgsToCommand="True"/>
            </telerik:EventToCommandBehavior.EventBindings>
</telerik:RadGridView>

Below is HandleAddingNewRecordToDevicesGridCommand command that is in viewmodel:

public DelegateCommand<object> HandleAddingNewRecordToDevicesGridCommand { get; private set; }

private void handleAddingNewRecordToDevicesGrid(object parameter)
{
            // Get RadGridView that is sender.
            Telerik.Windows.Controls.RadGridView gridView =
                ((parameter as GridViewAddingNewEventArgs).OwnerGridViewItemsControl) as Telerik.Windows.Controls.RadGridView;
            // Get new item inserted in the RadGridView.
            Telerik.Windows.Controls.GridViewDataColumn newItem =
                ((parameter as GridViewAddingNewEventArgs).NewObject) as Telerik.Windows.Controls.GridViewDataColumn;
            // Prepair to select this new item in the RadGridView.
            Telerik.Windows.Controls.GridViewDataColumn[] aItem = { newItem };
            System.Collections.IEnumerable selectedItem = aItem;
            // Select the new item in the RadGridView.
            gridView.Select(selectedItem);
}

this.HandleAddingNewRecordToDevicesGridCommand = new DelegateCommand<object>(this.handleAddingNewRecordToDevicesGrid); // (in viewmodel constructor)

I'm in need of abovementioned code for selecting new inserted row in the RadGridView. So after new row has been inserted into RadGridView then this row is selected in the RadGridView. But HandleAddingNewRecordToDevicesGridCommand command doesn't fire at all! Why? Please help me.

Eugene
Top achievements
Rank 1
 answered on 13 Apr 2016
5 answers
69 views

My chart having logic which switching between Point and Line series at run time.Issue is after switching series chart not retain the selection with new series selected.

 

Please help to resolve this issue.

Sivakumar
Top achievements
Rank 1
 answered on 13 Apr 2016
21 answers
1.9K+ views
Hi Guys,

    I have made it to hide/show value column of a property individually, but does not make it work to show/hide the whole property row(not only the value column, but also the label column). What's more how to hide a whole group?

    You are really appreciated if you could share some code. Thank you very much.
Ivan Ivanov
Telerik team
 answered on 12 Apr 2016
1 answer
128 views

I can not understand how to solve the following problem: There is real-time chart of Security.

<
<telerik:RadCartesianChart x:Name="chart" Grid.Column="0"    >
                <telerik:RadCartesianChart.Grid>
                    <telerik:CartesianChartGrid MajorLinesVisibility="Y"/>
                </telerik:RadCartesianChart.Grid>
 
 
                <telerik:RadCartesianChart.Behaviors>
                    <telerik:ChartCrosshairBehavior/>
                    <telerik:ChartPanAndZoomBehavior DragToZoomThreshold="0" MouseWheelMode="Zoom" DragMode="Pan" ZoomMode="Both" PanMode="Both"/>
                </telerik:RadCartesianChart.Behaviors>
 
                <telerik:RadCartesianChart.HorizontalAxis>
                    <telerik:DateTimeContinuousAxis x:Name="AxisX"  LabelFormat="HH:mm" LabelFitMode="Rotate" SmartLabelsMode="SmartStep" PlotMode="OnTicksPadded"  />
                </telerik:RadCartesianChart.HorizontalAxis>
 
                <telerik:RadCartesianChart.VerticalAxis>
                    <telerik:LinearAxis MajorStep="1" LineThickness="1" SmartLabelsMode="SmartStepAndRange" />
                </telerik:RadCartesianChart.VerticalAxis>
 
               <telerik:CandlestickSeries  ItemsSource="{Binding Candls}" CategoryBinding="Time" CloseBinding="Close" HighBinding="High" LowBinding="Low" OpenBinding="Open" DefaultVisualStyle="{DynamicResource #CandleStickStyle}" />
 </telerik:RadCartesianChart>

public ObservableCollectionEx<Candle> Candls = new ObservableCollectionEx<Candle>();

 

New candles appear immediately. Change the "Close" is not displayed in the candle when changes occur between the extreme values of the "Close". in a stream of data received and the change correctly. This can be seen on the grid.

 I tried to delete data from the collection of the last candle and insert new data, not to make changes to existing ones. The result remained the same :(

How can I display all the changes in the closing candle?

 

Martin Ivanov
Telerik team
 answered on 12 Apr 2016
2 answers
84 views
Hi,



I use a RadGridView and when I click on a GridViewRow which is not entire visible, I scroll automatically.

This is an illustration with the GridViewRow number 0, and the GridViewRow number 4, before and after a click.
http://image.noelshack.com/fichiers/2016/14/1460041764-telerik2.png
http://image.noelshack.com/fichiers/2016/14/1460041552-telerik3.png

When I click on it, the ScrollViewer is called. And I don't want ! But impossible to prevent this comportment. Could you help me ?



Thank you.
Ludovic
Top achievements
Rank 1
 answered on 12 Apr 2016
0 answers
120 views

Hi All,

i am using the radgridview control, added the custom filters to it successfully and all the default styles are working great. i have a requirement of infinite scrollbar and display row number on thumb. so i implemented the Data Virtualization but that did not match my requirement, in this the VirtualItemCount has to be set initially(when i tried to set it dynamically all rows data is empty no data is visible in the grid) more over the VirtualQueryableCollectionView maintains its own collection and its like a copy which i don't want. so with the MVVM pattern via observablecollection iam populating the data into the grid and this collection has constant size. now while scrolling when i reach to end of the scroll in the scrollchanged event iam replacing the collection with new data. all this is working but w.r.t this i also need to change the scrollbar's thumb as like inifinite scroll. i had written code to adjust the scrollbar thumb position, length nothing is working. Another issue is like displaying the record number on the thumb i had added the xaml code in style but when i apply the style the gridview is gone, it is not displayed. not sure what is the correct way of displaying the data on the thumb without losing the all default radgridview style.

Anyone please guide me.

Naresh
Top achievements
Rank 1
 asked on 12 Apr 2016
0 answers
105 views
Hi,

At the moment I have an autocomplete box which opens another tab. The autocompletebox list overlaps Tiles, when a selection is selected that overlaps a tile, it'll trigger the selection event AND the tile event. May I ask how do I set it up such that it'll only trigger selection event.

 
Minh
Top achievements
Rank 1
 asked on 11 Apr 2016
0 answers
59 views
Hi,

I currently implemented an intercept, such that when the paste command is triggered, it'll create a stream of the image and upload to s3 and then delete that image and paste an inlineimage of that now resides on S3. The richtextbox is not then converted to html immediately upon paste action, if I hit any key strokes then it'll be converted. Is there any manual way of triggering the htmldataprovider, maybe call that function or do a dirty trick such as enter in key then delete key. 
 
Minh
Top achievements
Rank 1
 asked on 11 Apr 2016
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
Slider
Expander
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
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
WebCam
CardView
DataBar
Licensing
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
HighlightTextBlock
Security
TouchManager
StepProgressBar
VirtualKeyboard
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?