Telerik Forums
UI for WPF Forum
2 answers
114 views

I use DragAndDrop behavior on gridview  to realize change two rows position , when the rows is many, the scrollview show, it is inconvenient  to  drag a row to top or bottom.

 is any method to let the scrollviewer scroll when drag a row out of the top or bottom?

thanks!

rui
Top achievements
Rank 1
 answered on 22 Mar 2016
1 answer
400 views

Hello,

There easy/fast way to develop Prompt window with combobox and disabled Accept button until there is selected value in combo? Need returned OK/cancel and selected value. Is that  possible? something like:

DialogResult dialog_result;
ComboboxDialog cbd = new ComboboxDialog();
dialog_result=  cbd.ShowDialog();
 
if (dialog_result == DialogResult.Ok)
{
    cbd.SelectedValue...
}

 

Thanks! 

Yana
Telerik team
 answered on 21 Mar 2016
2 answers
226 views

Hello Telerik,

 

I wanted to implement a column chooser for a grid. Then I followed this doc here

http://docs.telerik.com/devtools/wpf/controls/radgridview/features/overview-controlpanel

and found out that I basically just need to add this piece of code inside my grid to achieve the desired feature.

<telerik:RadGridView.ControlPanelItems>
    <telerik:ControlPanelItem ButtonTooltip="Column chooser">
        <telerik:ControlPanelItem.Content>
            <ListBox ItemsSource="{Binding Columns}" BorderThickness="0">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <CheckBox Content="{Binding Header, Mode=OneWay}" IsChecked="{Binding IsVisible, Mode=TwoWay}" />
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
        </telerik:ControlPanelItem.Content>
    </telerik:ControlPanelItem>
</telerik:RadGridView.ControlPanelItems>

 

 

 
Now my question is:
Is there a way I can reuse this block of code in several grids? Such as via usercontrols?

I just want to keep my code clean.
please show me the way.
Thank you!

Vitor
Top achievements
Rank 1
 answered on 21 Mar 2016
1 answer
874 views

I have learned that RadGridView has data validation feature per cell and row. But in my case, I want data validation on GridView level. In my app, I have "Purchase Order Form". In this form, there is RadGridView for Purchase Order Items. The validation scenario is User must add at least one item to this RadGridView.

I use the way of Data Annotation and Validation Attribute in my ViewModel to check this validation.

[CollectionHasElements( ErrorMessage = "Purchase order must have at least one order item." )]
        public ObservableCollection<PurchaseOrderItemDecorator> PurchaseOrderItemDecorators
        {
            get { return _purchaseOrderItemDecorator; }
            set { SetProperty( ref _purchaseOrderItemDecorator, value ); }
        }

The RadGridView successfully notify the error by showing Red Border around the grid. But it somehow failed to show the error message. I attached the screenshot of this RadGridView.

In normal telerik wpf controls, it usually shows the error message on top right corner red block triangle. I wish my Gridview act like that for showing validation error message.

Thanks.

Stefan
Telerik team
 answered on 21 Mar 2016
2 answers
167 views

am facing a problem in richtext box 

 

i want to load data through  "D:\file.ext" but it shows me error 

string cannot convert to stream or byte

Tanya
Telerik team
 answered on 21 Mar 2016
3 answers
173 views

I have created a RadCartesianChart that shows live data coming in from a machine in a factory that charts the weight of each unit.

Using this xaml:

<telerik:RadCartesianChart.HorizontalAxis>
    <telerik:CategoricalAxis />
</telerik:RadCartesianChart.HorizontalAxis>

With this code-behind:

RadObservableCollection<double> dbl = new RadObservableCollection<double>();
this.chart.Series[0].ItemsSource = dbl;

Then as data comes in, I add doubles to the dbl variable. This all works well but my horizontal axis starts with no datapoints, therefore no demarcation ticks, and the spread of the first datapoints is ridiculously wide, until it reaches a hundred and then I start removing the zeroeth point and adding the next one at the end. Then it maintains a stable appearance.

I have written a hack by adding 100 datapoints with "0" value like this:

dbl = new RadObservableCollection<double>() { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };

But I wonder if there isn't a "proper" way to get the desired result.

Bob Graham

 

 

 

 

 

 

 

Martin Ivanov
Telerik team
 answered on 21 Mar 2016
6 answers
1.1K+ views
I bind ItemsSource property to collection of elements that have 'IsChecked' property. How to bind 'RadTreeViewItem.IsChecked' property to 'MyElement.IsChecked'?

It is needed because I set IsVirtualizing="True" and thus I have to store whether item is checked in separate place.
Martin Ivanov
Telerik team
 answered on 21 Mar 2016
3 answers
138 views

Hello,

It could be possible to represent X axis and Y axis into bottom side and right hand, respectively?

<telerik:RadHeatMap x:Name="radHeatMap" ShowToolTips="True" CellBorderThickness="1" CellBorderColor="#FFE4E4E4">
    <telerik:RadHeatMap.Definition>
        <telerik:CategoricalDefinition ItemsSource="{Binding Path=HeatMapSeries}" RowGroupMemberPath="Z" ColumnGroupMemberPath="X" ValuePath="Y" Colorizer="{StaticResource HeatMapValueGradientColorizer}" />
    </telerik:RadHeatMap.Definition>
</telerik:RadHeatMap>

 

Regards,

Gerard.

Gerard
Top achievements
Rank 1
 answered on 21 Mar 2016
1 answer
97 views

Hi there,

your release notes

UI for WPF 2016.1.314 Version Notes

and

Previous Version 2016.1.302

are identical.

 

Reference:

http://www.telerik.com/account/VersionNotes.aspx?nb=1&id=5352

 

Greets,

Thorsten

 

Peshito
Telerik team
 answered on 21 Mar 2016
1 answer
238 views

Hello.

I need to place an application window (for example, notepad.exe) embedded within a RadPane.

I've managed to do in a Window application but do not get into a RadPane.

XAML user control located in the RadPane:

 
<UserControl x:Class="EmbeddedApp"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:local="clr-namespace:I3TV.GAMA.WPF.UI.Media.Player.Player"
             d:DesignHeight="300"
             d:DesignWidth="300"
             mc:Ignorable="d">
    <StackPanel x:Name="AppContainer" />
</UserControl>

[DllImport("user32.dll", SetLastError = true)]
private static extern long SetParent(IntPtr hWndChild, IntPtr hWndNewParent);
 
[DllImport("user32.dll", EntryPoint = "SetWindowLongA", SetLastError = true)]
public static extern int SetWindowLongA([System.Runtime.InteropServices.InAttribute()] System.IntPtr hWnd, int nIndex, int dwNewLong);
 
[DllImport("user32.dll", SetLastError = true)]
private static extern bool MoveWindow(IntPtr hwnd, int x, int y, int cx, int cy, bool repaint);
 
private const int GWL_STYLE = (-16);
 
private const int WS_VISIBLE = 0x10000000;
 
public EmbeddedApp()
{
    InitializeComponent();
    this.Loaded += new RoutedEventHandler(OnVisibleChanged);
}
 
/// <summary>
/// Create control when visibility changes
/// </summary>
/// <param name="e">Not used</param>
protected void OnVisibleChanged(object s, RoutedEventArgs e)
{
    // If control needs to be initialized/created
    if (_iscreated == false)
    {
        // Mark that control is created
        _iscreated = true;
 
        // Initialize handle value to invalid
        _appWin = IntPtr.Zero;
 
        try
        {
            var procInfo = new System.Diagnostics.ProcessStartInfo(this.exeName);
            procInfo.WorkingDirectory = System.IO.Path.GetDirectoryName(this.exeName);
            // Start the process
            _childp = System.Diagnostics.Process.Start(procInfo);
 
            // Wait for process to be created and enter idle condition
            _childp.WaitForInputIdle();
 
            // Get the main handle
            _appWin = _childp.MainWindowHandle;
        }
        catch (Exception ex)
        {
            Debug.Print(ex.Message + "Error");
        }
 
        // Put it into this form
        var helper = new WindowInteropHelper(Window.GetWindow(this.AppContainer));
        SetParent(_appWin, helper.Handle);
 
        // Remove border and whatnot
        SetWindowLongA(_appWin, GWL_STYLE, WS_VISIBLE);
 
        // Move the window to overlay it on this window
        MoveWindow(_appWin, 0, 0, (int)this.ActualWidth, (int)this.ActualHeight, true);
 
    }
}

 

Thank you!

Yana
Telerik team
 answered on 21 Mar 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
Expander
Slider
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
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
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?