Telerik Forums
UI for WPF Forum
2 answers
222 views

I have a very simple RadComboBox but you cannot select an item with the mouse it only accepts a different item by pressing enter!!!

I've found there is a tiny, perhaps 1 pixel border around the edge of the ComboBoxItem, where you can click with the mouse and the selection works. But this is totally unacceptably and far too fiddly. How can I get this most basic functionality working?

Andrew

Nasko
Telerik team
 answered on 25 Nov 2016
10 answers
332 views

How do I get the first item in the list to be the top most item in the carousel view by default?

I've uploaded a sample project here - https://1drv.ms/u/s!AlTc1v3Zi2qjiad16m_HibRZA6awag

 

Phoenix
Top achievements
Rank 1
 answered on 24 Nov 2016
9 answers
1.5K+ views

Hi Peshito,

I have one more question,  how to remove the "MouseOver" color in RadGridView column Header? please help me

Regards,

Bennit.

Stefan
Telerik team
 answered on 24 Nov 2016
13 answers
2.3K+ views

Hi,

We are currently using Telerik's RadGridView control with extended/mixed mode selection enabled.

Is there any way to Bind directly to the:

a) SelectedItem/SelectedItems

b) The SelectedCells' Column and Item(s) properties

c) FilterDescriptors (to suspend/resume notifications)

Using a RadContextMenu for Pure MVVM?

We are currently using an approach with references RadGridView UI elements via the ViewModel, which we'd like to avoid. We have also considered the SelectedItems approach through a behavior, as illustrated here:

http://www.telerik.com/blogs/how-to-synchronize-your-ui-selected-items-with-your-data-context-using-mvvm-and-blend-behaviors-for-silverlight-and-wpf

However, the performance of the selection slows the larger the number of items highlighted, since the behavior is triggering the Transfer method in the behavior for each row highlighted in the RadGridView. We'd like to avoid using a behavior, if possible, as our users are working with large datasets and will need to be able to selected 1M+ rows at a time.

Currently, we are using this approach, where we are able to pass the RadGridView to the ViewModel as a CommandParameter from a RadContextMenu in its entirety:

<telerik:RadGridView Grid.Row="1" 
                             Name="dtgMyData" 
                             ItemsSource="{Binding Path=MyDataCollection}" 
                             AutoGenerateColumns="False" 
                             IsReadOnly="False" 
                             RowIndicatorVisibility="Visible"
                             HorizontalAlignment="Stretch"
                             SelectionMode="Extended"
                             SelectionUnit="Mixed">

...

<telerik:RadContextMenu.ContextMenu>
                <telerik:RadContextMenu x:Name="MyDataGridContextMenu">
                    <telerik:RadContextMenu.Items>
                        <telerik:RadMenuItem Header="Filter Selected" Command="{Binding DataContext.FilterSelectionCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:RadContextMenu}}}" CommandParameter="{Binding Path=UIElement, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=telerik:RadContextMenu}}"/>
                </telerik:RadContextMenu>
            </telerik:RadContextMenu.ContextMenu>

...

...<columns>...

Where the Command and CommandParameters are bound to the ViewModel.

Is there a way to avoid binding to the ViewModel directly referencing UI controls using a RadContextMenu without using behaviors? For example, is there another Binding option for the CommandParameter above that is shown to reference the entire RadGridView, such that we can reference SelectedCells.Item(s) or SelectedItem/SelectedItems bound to our Model (i.e. MyData) directly, and if at all possible, the Column and/or Column FilterDescriptors without having to use code-behind and avoiding the use of a behavior?

 

Kind regards

 

Stefan
Telerik team
 answered on 24 Nov 2016
10 answers
943 views

Good afternoon. How can I save the geometry of the selected objects to RadDiagram in xaml file? Now I take the RadDiagramShape geometry, convert it to a string and written in the xaml file. But when I try the reverse conversion, an error is thrown

1) the RadDiagramShape declare

<telerik:RadDiagramShape x:Name="ConditionShape"
 IsEditable="False"
AllowCopy="False" AllowCut="False" AllowDelete="False" AllowDrop="False" AllowPaste="True" Background="Azure" 
Geometry="{telerik:CommonShape ShapeType=RectangleShape }" StrokeThickness="1" Height="100" Width="100" RenderTransformOrigin="0.5,0.5" Position="180,50"/>

2) the entry in the xaml file

Init.overview.LibraryItems.FunctionItem[end].Data = Convert.ToString(ShapeFactory.GetShapeGeometry(FlowChartShapeType.DecisionShape));

 FunctionLibrary Done = new FunctionLibrary();
            Done = Init.overview;
            XmlSerializer xml = new XmlSerializer(typeof(FunctionLibrary));
            file.Close();
            using (var fStream = new FileStream(path: "./****.xml", mode: FileMode.Create, access: FileAccess.Write, share: FileShare.ReadWrite))
            {
                xml.Serialize(fStream, Done);
                fStream.Close();
            }

3) the result in a file

      <Data>M56;0,5L111,5;37,5 56;74,5 0,5;37,5z</Data>
4)  and the inverse transform

var converter = new System.Windows.Media.GeometryConverter();

var data = (Geometry) converter.ConvertFromString(ListCode[i].Data);

ConditionShape.Geometry = data;

this line is not recognized as geometry. how to convert in the required format?

Martin Ivanov
Telerik team
 answered on 24 Nov 2016
26 answers
752 views
As the thread title says, is there any built in localization of your GridView control? I only find examples how to localize on my own in your documentation.

Does that mean I have to translate myself or is there some functionality where I basically set a culture property or something and the GridView strings are for example in German instead of English?


sai
Top achievements
Rank 1
 answered on 24 Nov 2016
1 answer
54 views

Hello,

I want to use telerik toolbar with radrichtextbox, i want to import word document and highlight with the tollbar button a number of words.

Then i want to get the content of theese words and to save it in an xml file.

Question : How can i get the content of highlited text ? If you know another technology that can provides me with those features please tell me about it.

Thank you.

Tanya
Telerik team
 answered on 23 Nov 2016
3 answers
438 views

Hi, 

Is there a way to set edit triggers on the cell level? I need that in the same column, some of the cells will have a different edit trigger value from other cells (depends on a certain bushiness logic condition that can be implemented in a converter, for example).

Yoan
Telerik team
 answered on 23 Nov 2016
7 answers
98 views

Hi to all,

I'm seeing a demo, I would to goto at last char, but not last char of mask.

I try to explane more clearly, I have example that I attached, when I get focus of control, Carrer appears at first position, I have a value of some characters and thay are less than max length of mask (a20), if a try to press "End", it goto to last char of mask, I would to goto at last inserted char.

Other question, how can I select all, but only inserted value?

 

SelectionOnFocus gives me several mode when I get focous, it would be nice to have "SelectAllValue" or "CarretToEndValue"

Can I do it or custom it?

Dario Concilio
Top achievements
Rank 2
 answered on 23 Nov 2016
4 answers
92 views

Hello,

We want to use the enter key to traverse between the cells in the row of a RadGridView, this works fine at the moment only the transition to the next row is a problem.

We want the RadGridView to behave as follows,

  • When the last cell is reached, a enter will commit the changes in the last cell without creating a new row;
  • If the user gives another enter, a new row is created and focus is traversed to the first editable cell in the new row.

We have created a CustomKeyboardCommandProvider as suggested in this blog post.

The function ProvideCommandsForKey(..) is only called for the first enter, then the keyboardfocus is moved out of the grid while the last cell has still some sort of focus, a rectangle is shown in the cell, but it doesn't respond on the keyboard enter presses anymore. We tried using commands to select the cell or row after the commit but these are not working, the focus is still leaving the grid after the commit is done.

 

public override IEnumerable<ICommand> ProvideCommandsForKey(Key key)
{
    List<ICommand> commandsToExecute = base.ProvideCommandsForKey(key).ToList();
 
    /* IF Enter key is pressed and we are in the last cell */
    if (key == Key.Enter && (_parentGrid.CurrentColumn.DisplayIndex == _parentGrid.Columns.Count - 1))
    {
        if (_firstEnterHandled == false)
        {
            _firstEnterHandled = true;
            commandsToExecute.Clear();
            commandsToExecute.Add(RadGridViewCommands.CommitCellEdit);
            commandsToExecute.Add(RadGridViewCommands.SelectCurrentUnit);  // DOESNT WORK
        }
        else
        {
            commandsToExecute.Clear();
            commandsToExecute.Add(RadGridViewCommands.BeginInsert);
                 
            /* Reset flag */
            _firstEnterHandled = false;
        }
    }
    else
    {               
        /* Reset flag */
        _firstEnterHandled = false;
    }
 
    return commandsToExecute;
}

 

 

Any help would be appreciated.

Marcel

Marcel
Top achievements
Rank 1
 answered on 23 Nov 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?