Telerik Forums
UI for WPF Forum
9 answers
558 views
I have a scenario where i have two grids side-by-side in my WPF app and as i scroll one grid id like to scroll the second one to keep in sync. both grids will contain one column that will have a matching key.

how can i accomplish this?
Maya
Telerik team
 answered on 12 Jan 2012
2 answers
81 views
Hi,

I want to disable some buttons when I have more that one dataseries in the chart. So I have chosen DataBound event of chart. But I can not access to number of dataseries which was loaded into grid at that moment. I have seen number of data series in some private properties of chart by using Quick Watch window but I can not see in public ones (number of data series).

Thanks in advance.
MahMah
Top achievements
Rank 1
 answered on 12 Jan 2012
2 answers
109 views

Hi Guys,
              i have a gridView, The idea is to tab throught the different entries in the grid.

Problem:  When I try to tab through the entries a dotted border kind of a thing appears when I tab the first time. When I tab the second time then the focus moves to the next row.
Could anyone please tell me why the dotted border is appearing and how can i get rid of it.

best regards,
prithu

prithu
Top achievements
Rank 1
 answered on 12 Jan 2012
3 answers
950 views
Hi, please help me on this. i've searched everywhere but seems like noting working and it's stressed me out

i have a gridview and need to enable row click event to get the ID of the users.

currently, im able to click at each cell and display the value belong to it. but it should only display the ID of the row even we click different cell (in the same row).

i dont want this function occur at headers. how to do this? and can it works if we dont display the ID in the gridview?

i disclose my codes below

please help me guys, it's very urgent...tq

xaml:
<telerik:RadGridView Grid.Row="1" x:Name="radGridView"
   telerik:Theming.Theme="Expression_Dark" 
   HorizontalAlignment="Stretch"
   VerticalAlignment="Stretch"
   AutoGenerateColumns="False"
   IsReadOnly="True"
   CanUserFreezeColumns="False"
   RowIndicatorVisibility="Collapsed"
   Margin="0,0,0,27" ShowGroupPanel="False">
<telerik:RadGridView.Columns>
   <telerik:GridViewToggleRowDetailsColumn />
   <telerik:GridViewDataColumn DataMemberBinding="{Binding No}" Header="No."/>
   <telerik:GridViewDataColumn DataMemberBinding="{Binding Adm_Date}" Header="Date Admission" />
   <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}" Header="Name" />
</telerik:RadGridView.Columns>
</telerik:RadGridView>

code behind:
this.radGridView.AddHandler(GridViewCell.MouseLeftButtonDownEvent, new MouseButtonEventHandler(MouseDownOnCell), true);
 
private void MouseDownOnCell(object sender, MouseButtonEventArgs e)
{
  try
   {
       object cellValue = ((UIElement)e.OriginalSource).ParentOfType<GridViewCell>().Value;
       MessageBox.Show("Click on : " + cellValue.ToString());
   }
  catch (Exception ex)
   {
       MessageBox.Show(ex.Message);
       return;
   }
}
Maya
Telerik team
 answered on 12 Jan 2012
2 answers
174 views
Hi !

I have a WPF Browser Application, which worked good with Release Q2 of Telerik WPF components.

I just updated them to latest stable Q3 release, and now the the OrientedGroupHeaderContentTemplate does
not work anymore. It will only display the default resource view - i've changed nothing in my xaml ...

can you please help me, it's very urgent

snippet from my xaml

<scheduleView:OrientedGroupHeaderContentTemplateSelector x:Key="GroupHeaderContentTemplateSelector">
            <!-- Default templates: -->
            <scheduleView:OrientedGroupHeaderContentTemplateSelector.VerticalResourceTemplate>
                <DataTemplate>
                    <Border Background="#959595" Width="310" Margin="0 0 0 0">
                        <StackPanel Margin="5 5 5 5" Orientation="Horizontal">
                            <TextBlock Foreground="Black" FontSize="12" FontWeight="Normal" Text="{Binding Name.Group}" HorizontalAlignment="Left" Width="150"/>
                            <TextBlock Foreground="Black" FontSize="12" FontWeight="Normal" Text="|"  HorizontalAlignment="Center" Width="10"/>
                            <TextBlock Foreground="Black" FontSize="12" FontWeight="Normal" Text="{Binding Name.Name}"  HorizontalAlignment="Left" Width="150"/>
                        </StackPanel>
                    </Border>
                </DataTemplate>
            </scheduleView:OrientedGroupHeaderContentTemplateSelector.VerticalResourceTemplate>
            <scheduleView:OrientedGroupHeaderContentTemplateSelector.HorizontalResourceTemplate>
                <DataTemplate>
                    <Border Background="#959595" Width="310" Margin="0 0 0 0">
                        <StackPanel Margin="5 5 5 5" Orientation="Horizontal">
                            <TextBlock Foreground="Black" FontSize="12" FontWeight="Normal" Text="{Binding Name.Group}" HorizontalAlignment="Left" Width="150"/>
                            <TextBlock Foreground="Black" FontSize="12" FontWeight="Normal" Text="|"  HorizontalAlignment="Center" Width="10"/>
                            <TextBlock Foreground="Black" FontSize="12" FontWeight="Normal" Text="{Binding Name.Name}"  HorizontalAlignment="Left" Width="150"/>
                        </StackPanel>
                    </Border>
                </DataTemplate>
            </scheduleView:OrientedGroupHeaderContentTemplateSelector.HorizontalResourceTemplate>
        </scheduleView:OrientedGroupHeaderContentTemplateSelector>

and the scheduleview

<scheduleView:RadScheduleView x:Name="SchedulerMonat"
                                          ActiveViewDefinitionIndex="0"
                                          AppointmentsSource="{Binding Appointments}"
                                          ResourceTypesSource="{Binding ResourcesTypes}"
                                          GroupDescriptionsSource="{Binding GroupDescirptionSource}"
                                          GroupHeaderContentTemplateSelector="{StaticResource GroupHeaderContentTemplateSelector}"
                                          SpecialSlotsSource="{Binding SpecialSlots}"
                                          SpecialSlotStyleSelector="{StaticResource SpecialSlotStyleSelector}"
                                          ToolTipTemplate="{StaticResource AppointmentToolTipTemplate}"
                                          AppointmentCreating="SchedulerMonat_AppointmentCreating"
                                          AppointmentEditing="SchedulerMonat_AppointmentEditing"
                                          ShowDialog="SchedulerMonat_ShowDialog"
                                          VisibleRangeChanged="SchedulerMonat_VisibleRangeChanged"
                                          Margin="0,103,0,0"
                                           
                                          VisibleRangeChangedCommand="{Binding VisibleRangeChanged}"
                                          VisibleRangeChangedCommandParameter="{Binding VisibleRange, RelativeSource={RelativeSource Self}}"
                                          AppointmentEdited="SchedulerMonat_AppointmentEdited"
                                          SnapAppointments="True"
                                          >
                <scheduleView:RadScheduleView.AppointmentStyleSelector>
                    <monatsmatrixWPF_extension:AppointmentStyleSelector Level200HorizontalStyle="{StaticResource Level200HorizontalStyle}" Level200HorizontalStyleCrossed="{StaticResource Level200HorizontalStyleCrossed}" Level200HorizontalStyleLeft="{StaticResource Level200HorizontalStyleLeft}" Level200HorizontalStyleRight="{StaticResource Level200HorizontalStyleRight}" HorizontalStyle="{StaticResource Level200HorizontalStyle}" />
                </scheduleView:RadScheduleView.AppointmentStyleSelector>
                <scheduleView:RadScheduleView.ViewDefinitions>
                    <scheduleView:TimelineViewDefinition VisibleDays="30" TimerulerGroupStringFormat="{}{0:dd ddd}" TimerulerMajorTickStringFormat="" Title="Monatsansicht - " LargeChangeInterval="31d"/>
                </scheduleView:RadScheduleView.ViewDefinitions>
                <telerik:RadContextMenu.ContextMenu>
                    <telerik:RadContextMenu Name="ContextMenu" IsOpen="{Binding IsContextMenuOpen, Source={StaticResource ContextMenueDataModel},Mode=TwoWay}" ScrollViewer.CanContentScroll="True">
                        <telerik:RadMenuItem Name="ContextMenuNew" Header="Neuer Termin" Command="{Binding NewCommand, Source={StaticResource ContextMenueDataModel}}" CommandParameter="{Binding Menu.UIElement.SelectedSlot, RelativeSource={RelativeSource Self}}" Click="FabaContextMenue_Click">
                            <telerik:RadMenuItem.Icon>
                                <Image Source="/monatsmatrixWPF;component/img/Neu.png"></Image>
                            </telerik:RadMenuItem.Icon>
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem IsSeparator="True" />
                        <telerik:RadMenuItem Name="ContextMenuRead" Header="Termin lesen" Command="{Binding ReadCommand, Source={StaticResource ContextMenueDataModel}}" CommandParameter="{Binding Menu.UIElement.SelectedAppointments, RelativeSource={RelativeSource Self}}" Click="FabaContextMenue_Click">
                            <telerik:RadMenuItem.Icon>
                                <Image Source="/monatsmatrixWPF;component/img/Lesen.png"></Image>
                            </telerik:RadMenuItem.Icon>
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem Name="ContextMenuEdit" Header="Termin bearbeiten" Command="{Binding EditCommand, Source={StaticResource ContextMenueDataModel}}" CommandParameter="{Binding Menu.UIElement.SelectedAppointments, RelativeSource={RelativeSource Self}}" Click="FabaContextMenue_Click">
                            <telerik:RadMenuItem.Icon>
                                <Image Source="/monatsmatrixWPF;component/img/bearbeiten.png"></Image>
                            </telerik:RadMenuItem.Icon>
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem Name="ContextMenuDelete" Header="Termin löschen" Command="{Binding DeleteCommand, Source={StaticResource ContextMenueDataModel}}" CommandParameter="{Binding Menu.UIElement.SelectedAppointments, RelativeSource={RelativeSource Self}}" Click="FabaContextMenue_Click">
                            <telerik:RadMenuItem.Icon>
                                <Image Source="/monatsmatrixWPF;component/img/loeschen.png"></Image>
                            </telerik:RadMenuItem.Icon>
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem IsSeparator="True" />
                        <telerik:RadMenuItem Name="Group1" Header="Guppe 1">
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem Name="Group2" Header="Guppe 2">
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem Name="Group3" Header="Guppe 3">
                        </telerik:RadMenuItem>
                    </telerik:RadContextMenu>
                </telerik:RadContextMenu.ContextMenu>
            </scheduleView:RadScheduleView>

regards
rudi 


Rudolf
Top achievements
Rank 1
 answered on 12 Jan 2012
0 answers
139 views
Hi,

Need your advice on this scenario. I have a ListBox where I drag my items from, to be dropped into a RadTileView. I am able to do a typical drag and drop action, where the dragged item is appended to the ItemsSource of the TileView. But I wish to implement the case where I can drop the item and insert it (instead of append) into the position I want. How do I go about doing this? Thanks for your time.

P.S. I'm not sure this should be posted here or the RadTileView forum. For now, I only posted here.
Ring Lee
Top achievements
Rank 1
 asked on 12 Jan 2012
1 answer
218 views
I'm extending a GridViewComboBoxColumn, setting IsComboBoxEditable to true, and trying to provide code to add typed text as items into the ItemsSource collection.

I hooked the CellEditEnded event of the GridView and added some test code to play with this idea:

private void TestGrid_CellEditEnded(object sender, Telerik.Windows.Controls.GridViewCellEditEndedEventArgs e)
{
    var comboBoxColumn = e.Cell.Column as Telerik.Windows.Controls.GridViewComboBoxColumn;
   
    // only continue if its a cell for the column we're interested in
    if ((comboBoxColumn == null) || (comboBoxColumn.UniqueName != "Lookup"))
        return;

    // get back the object used to represent the row
    var gridItem = e.Cell.DataContext as GridItem;
           
    // only continue if the text typed is not in the list
    if (gridItem.SelectedLookupItem != null)
        return;

    var cellComboBox = (RadComboBox)e.EditingElement;
    var lookupItemCollection = cellComboBox.ItemsSource as ObservableCollection<LookupItem>;

    var newItem = new LookupItem() { Name = cellComboBox.Text };
    lookupItemCollection.Add(newItem);

    //set the typed item as the selected item
    gridItem.SelectedLookupItem = newItem;
}

Works great. Now I want to move that code into my extended GridViewComboBoxColumn. How could I hook/override the CellEditEnded from inside the extended column?

Dimitrina
Telerik team
 answered on 12 Jan 2012
1 answer
77 views
I have two different collections with items of type A and B where B contains a child collection of type A and I'm displaying these two collections in two different RadGridViews and what I want to do is to be able to drag an item from one grid to the other so that I can add the appropriate item to the child collection (thus building a relationship between the two collections). I'm fairly new with WPF and just can't seem to see how to modify the examples to accomplish this DnD scenario. I'm guessing that I have to call the appropriate RadDragAndDropManager static methods for each row of the grid but as my grids are bound to my collection (via a View Model) I'm not sure how to do this or if it's the correct approach.

Any help/pointers would be greatly appreciated!

-Gary
Gary
Top achievements
Rank 1
 answered on 12 Jan 2012
2 answers
178 views
I'm sure there is some property I am missing, but I am having an issue on initial load of the grid.

Given the following code, if I expand the width of "Column 1" to the right, I never get the horizontal scrollbar visible to scroll to view the hidden columns.  This happens with EnableColumnVirtualization set to "True" as well.

<Window x:Class="WpfApplication1.GridWindow"
        Title="GridWindow" Height="300" Width="600">
    <Grid>
        <telerik:RadGridView EnableColumnVirtualization="False">
            <telerik:RadGridView.Columns>
                <telerik:GridViewColumn Header="Column 1" />
                <telerik:GridViewColumn Header="Column 2" />
                <telerik:GridViewColumn Header="Column 3" />
                <telerik:GridViewColumn Header="Column 4" />
                <telerik:GridViewColumn Header="Column 5" />
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
    </Grid>
</Window>
Ievgen
Top achievements
Rank 1
 answered on 11 Jan 2012
0 answers
140 views
how to customize RadDataForm. means how to add manually textbox , combobox , datatime and etc control
and how to bind with database.
please give me example.
aavadesh
Top achievements
Rank 1
 asked on 11 Jan 2012
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
InlineAIAssistant
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?