Telerik Forums
UI for WPF Forum
1 answer
719 views

Hi, all. How can I catch click action for any checkbox in GridViewSelectColumn via MVVM or smth else ?

XAML markup contains only one grid with two column (first is selectable checkboxes):

<telerik:RadGridView ...
                             namespace:MySelectedItemsBindingBehavior.SelectedItems="{Binding SelectedItemsHere}"
 ...>
    <telerik:RadGridView.Columns>
        <telerik:GridViewSelectColumn CheckBoxStyle="{StaticResource CheckBoxStyle}"/>
            <telerik:GridViewDataColumn ...>
            <telerik:GridViewDataColumn.CellTemplate>
                <DataTemplate ...>
                    <StackPanel ...>
                        ...
                    </StackPanel>
                </DataTemplate>
            </telerik:GridViewDataColumn.CellTemplate>
        </telerik:GridViewDataColumn>
    </telerik:RadGridView.Columns>
</telerik:RadGridView>

P.S. Exactly click event, not the changing of underlying collection.

Dilyan Traykov
Telerik team
 answered on 27 Dec 2017
3 answers
318 views

Hello,

 

This is my first post here and I sense that it's not last, due to your unhelpfull documentation and demos. I have RadGridView with data bound. Everything is connected to ADO and dynnamically loaded and refreshed. Also, I can pass parameter of my gridView.SelectedItem to Linq query, to retrieve the data. What I want to do is pass parameter of expanted data. For full clarification:

1. After I press "+" button my row is expanding to row details

2. I have 2 tabs there, 1st is a simple grid, 2nd is a grid view with table.

3. I need to pass parameter (Id of row I'm expanding) to query. 

 

As I mentioned, my connection and data binding works, because I can achieve this by using SelectedItem property. The problem is that, SelectedItem property passes Id of selected item, not expanded one, which means I can pass id of another item, to my expanded item. All I need here is to get something like "ExpandedItem" property, how do I get it?

 

XAML

<Grid>
        <telerik:RadGridView  x:Name="ListaProduktow" GroupRenderMode="Flat"
                                  CanUserFreezeColumns="False"
                                  RowIndicatorVisibility="Collapsed"
                                  ItemsSource="{Binding}"
                                    AutoGenerateColumns="False"
                              ShowGroupPanel="False"
                              FilteringMode="Popup"
                              ShowSearchPanel="True"
                              IsSearchingDeferred="True"
                              AlternationCount="2"
                              LoadingRowDetails="SzczegolyClick"
                             >
 
        <telerik:RadGridView.Columns>
 
            <telerik:GridViewToggleRowDetailsColumn />
 
                <telerik:GridViewDataColumn Header="Departament" TextWrapping="Wrap"
                                                DataMemberBinding="{Binding Departament}"
                                            Width="100"
                                            IsReadOnly="True"
                                            />
 
...OTHER COLUMNS...
 
 
            </telerik:RadGridView.Columns>
            <telerik:RadGridView.RowDetailsTemplate>
                <DataTemplate>
                    <telerik:RadTabControl x:Name="SzczegolyForm"
                                           Width="702"
                                           HorizontalAlignment="Left"
                                           Margin="8"
                                           VerticalAlignment="Center"
                                          >
...1st TAB...
 
 </telerik:RadTabItem>
                        
                            <telerik:RadTabItem Header="Stany Magazynowe"
                                                TabIndex="2"
                                               >
                            <telerik:RadGridView
                                                 Width="Auto"
                                                 HorizontalAlignment="Stretch"
                                                 IsReadOnly="True"
                                                 ShowGroupPanel="False"
                                                 AutoGenerateColumns="False"
                                                ItemsSource="{Binding StanyMagazynowe}"
                                                Name="StanyMagazynoweForm">
                                <telerik:RadGridView.Columns>
                                    <telerik:GridViewDataColumn DataMemberBinding="{Binding Magazyn}"
                                                                Header="Kod Magazynu" />
                                    <telerik:GridViewDataColumn DataMemberBinding="{Binding Ilość}"
                                                                Header="Ilość" />
                                </telerik:RadGridView.Columns>
                            </telerik:RadGridView>
                        </telerik:RadTabItem>
                        </telerik:RadTabControl>
                </DataTemplate>
            </telerik:RadGridView.RowDetailsTemplate>
        </telerik:RadGridView>
</Grid>

 

Code behind:

 

  private void SzczegolyClick(object sender, GridViewRowDetailsEventArgs e)
       {
           WarehouseDetails();
           ListaProduktow.ItemsSource = products;
       }
 
private void WarehouseDetails()
       {
           string productId;
           var selectedProduct = ListaProduktow.SelectedItem as V_PRODUCTS_LIST;
           
           if (selectedProduct != null)
           {
               productId = selectedProduct.Id_Product;
               selectedProduct.StanyMagazynowe = products.Where(e => e.Id_Product == productId).Select(product =>
                   new StanyMagazynowe()
                   {
                       Magazyn = product.Magazyn,
                       Ilość = product.Ilość
                   }).ToList();
           }
      
           
       }
Yoan
Telerik team
 answered on 27 Dec 2017
2 answers
212 views
Hi there,

Is there a way of getting the OpenStreetMapProvider to work through an internet connection which makes use of a proxy server?


Andi
Top achievements
Rank 1
 answered on 27 Dec 2017
2 answers
279 views

I drag a item to a control to create an object ,when drag over it,it should display an allowed dragVisual,when drag over another control is should display an Forbidden dragVisual ,the two DragVisual  is create by different Template

it seems AddGiveFeedbackHandler is useful,  in OnGiveFeedback can change the DragVisual  when the target control is Allow, but  I do not know how to get the target control 

how to resolve this

rui
Top achievements
Rank 1
 answered on 27 Dec 2017
5 answers
164 views
Hi.

The Pane tab header's flow direction is left to right when it added in DocumentHost.
it means that the Pane tab headers are laid out at rear side last added tab header when it add in DocumentHost.
I want to change the flow direction in DocumentHost, but I can't find it.
To be precise, I want to control the tab headers are laid out order flow direction(add to First or Last) when it add.
If I set "FlowtDirection=RightToLeft" or "HorizontalAlignment=Right", it would also apply to inner Tab content. That's not What I want.
I just want to control flow direction in TabStrip.

Could you get me help how can I do that?
Gregorio
Top achievements
Rank 1
 answered on 27 Dec 2017
3 answers
721 views

My application runs under Arabic culture. After setting IsTrackChangesEnabled to true, and user starts making changes, then saves the document. When he opens the document next time the error shown in the image below develops.

I assume that; this occurred because, changes are tracked by date and time, and when displayed later on they must be displayed using their localization culture which is English.

Is there a way to set culture of RadRichTextBox or the component responsible for tracking changes, or any other solution?

Any help will be greatly appreciated....

①Dr Mostafa
Top achievements
Rank 1
 answered on 26 Dec 2017
2 answers
317 views
Hello I have a RadGridView in my application that has grouped items.  All the items group fine but they are all expanded on load, is there any setting to have them collapsed on load?  Any suggestions?
MilesR
Top achievements
Rank 1
 answered on 26 Dec 2017
3 answers
962 views

One of our customers wants to be able to show Google maps in our application. I understand that they have purchased a licence to allow them to use the Goggle API. Has anyone tried to usethis with the RadMap control? Is it legal? Are Telerik planning any support for this?

Thanks

Pete

Martin Ivanov
Telerik team
 answered on 26 Dec 2017
16 answers
657 views
Where can i download the CRM Demo application source code for WPF?
Martin Ivanov
Telerik team
 answered on 26 Dec 2017
1 answer
297 views

Hi I was able to create a custom control template for a GridViewCell as follows (perhaps a bad approach?):

                        <Style x:Key="{x:Type telerik:GridViewCell}" TargetType="{x:Type telerik:GridViewCell}" BasedOn="{StaticResource GridViewCellStyle}">
                            <Setter Property="Template">
                                <Setter.Value>
                                    <ControlTemplate TargetType="{x:Type telerik:GridViewCell}">
                                        <Grid>
                                            <Border x:Name="RowBorder" SnapsToDevicePixels="true" BorderThickness="0,2"  BorderBrush="#222" Background="#222">
                                                <ContentPresenter Content="{TemplateBinding Content}"/> <!--Gets content for GridViewDataColumn DataMemberBinding-->
                                            </Border>
                                            <Border x:Name="AlertBorder" SnapsToDevicePixels="true" BorderThickness="0" Background="#444" Opacity="0"/>
                                        </Grid>

                                          .....Control Template Triggers Data Triggers story board stuff here

    Question is could I do something similar for GridViewRow?????  

                        <Style x:Key="{x:Type telerik:GridViewRow}" TargetType="{x:Type telerik:GridViewRow}" BasedOn="{StaticResource GridViewRowStyle}">
                            <Setter Property="Template">
                                <Setter.Value>
                                    <ControlTemplate TargetType="{x:Type telerik:GridViewRow}">
                                        <Grid>
                                            <Border x:Name="RowBorder" SnapsToDevicePixels="true" BorderThickness="0,2"  BorderBrush="#222" Background="#222">
                                                             ?????????????Can I present the row cells here with an element and some sort of binding????????????
                                            </Border>
                                            <Border x:Name="AlertBorder" SnapsToDevicePixels="true" BorderThickness="0" Background="#444" Opacity="0"/>
                                        </Grid>

Thanks in advance...

 

 

Martin Ivanov
Telerik team
 answered on 26 Dec 2017
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?