Telerik Forums
UI for WPF Forum
1 answer
250 views
Hi..
I have a button that adds a new row to the grid. I need to set focus to the new row and open the first cell - which is combo box and set focus.
I have tried the following but it does not work.. any ideas?  thanks

 

this.gridPO_det.ScrollIntoViewAsync(new_det

 

, (f) =>

{

 

GridViewRow row = f as GridViewRow;

 

 

if (row != null)

 

{

 

GridViewCell cell = row.Cells[0] as GridViewCell;

 

cell.BeginEdit();

Dispatcher.BeginInvoke(

new Action(() =>

 

{

((

RadComboBox)cell.GetEditingElement()).IsDropDownOpen = true;

 

}));

}

});

Maya
Telerik team
 answered on 26 Oct 2010
1 answer
166 views
I have several custom WPF controls whose visual representations are defined by a XAML template. My goal is to define a RadContextMenu in a ResourceDictionary and then, in code, assign it to be the context menu for my custom controls, similary to the following:

ResourceDictionary resourceDictionary = new ResourceDictionary();
            resourceDictionary.Source = new Uri(
                "MyLibrary;component/Resources/Resources.xaml", UriKind.Relative);
  
            Grid mainGrid = Template.FindName("mainGrid", this) as Grid;
            if(mainGrid != null)
            {
                RadContextMenu.SetContextMenu(this, (RadContextMenu)resourceDictionary["DefaultControlContextMenu"]);
            }

At runtime, the RadContextMenu gets assigned correctly, but whenever I right-click on my custom control the following exception is thrown:

System.InvalidOperationException: Cannot perform action because the specified Storyboard was not applied to this object for interactive control.

I've noticed that others have gotten a similar exception with the RadTreeView and RadTransitionControl, and I need to know what to do for a workaround on this. Is the problem related to the fact that I am using a control template?

Thanks,

Greg
Hristo
Telerik team
 answered on 26 Oct 2010
1 answer
81 views
I need to show a Confirm prompt one a user is finished editing a cell.

Here is my current CellEditEnded eventhandler:
private void gvAccounts_CellEditEnded(object sender, GridViewCellEditEndedEventArgs e)
{
    if (e.EditAction == Telerik.Windows.Controls.GridView.GridViewEditAction.Cancel)
        return;
 
    oldNickname = e.OldData.ToString();
    newNickname = e.NewData.ToString();
 
    // nothing has changed
    if (oldNickname == newNickname)
        return;
 
    RadWindow.Confirm("Are you sure you want to change this nickname to " + newNickname + "?", this.ChangeNickname);
}

oldNickname and newNickname are global variables so I can keep up with the new/old values.

however, when any button on the prompt is clicked (or anywhere on the screen is clicked) another CellEditEnded event is fired but e.OldData is the same as e.NewData which overwrites my global variables.

I don't understand why the second event is firing.
Maya
Telerik team
 answered on 26 Oct 2010
1 answer
123 views
Hi,

I am drawing a Rad Chart with multiple line series. And although while creating a series I explicitly write code to disable the connector:

 DataSeries lineSeries = new DataSeries();                
 SplineSeriesDefinition lineDataSeries = new SplineSeriesDefinition();
 LabelSettings settings = new LabelSettings();
 settings.ShowConnectors = false;
 settings.Distance = 10;                
 lineDataSeries.LabelSettings = settings;
.
.
.

Later I assign this series to the RadChart's default view. But still it doesn't disable the labels.

LineChartTrancheResults.DefaultView.ChartArea.DataSeries.Add(lineSeries )

Do I need to do something else?

Thanks,
Farhan
Evgenia
Telerik team
 answered on 26 Oct 2010
5 answers
187 views

Hi Telerik 

I have been looking at your trial program specifically using the Charting gauge's and the map 

one thing im struggling to figure out is how to map British postcodes as points on the map.

do you know of any reading or have anything provided to see how to map these, 

if i can get these working i may be able to swing my boss into buying the controls for our team

JAke

Mick D.
Top achievements
Rank 1
 answered on 25 Oct 2010
3 answers
187 views

I'm using the MVVM pattern for my application.

 

Is it possible to bind the SortDescriptors collection of a RadGridView to a list in my viewmodel, and if so how do I do that?

 

Creating a property of type SortDescriptionCollection in my viewmodel is easy, but I don't know how to bind the gridview to that.

 

Thanks // David

Yavor Georgiev
Telerik team
 answered on 25 Oct 2010
9 answers
187 views
Hi,

When I create one line series, the zoom and scroll work fine.
However, when I add more line series and try to zoom in, the series behave weird. Parts of the lines disappear and they don't actaully look like they're zoomed in.

Is there a limitation to implementing zoom on only one series? Or am I doing something wrong?


Thanks in advance.
Ves
Telerik team
 answered on 25 Oct 2010
2 answers
132 views
I want the images to traverse in a liner path, like an image gallery.
How to define the path?
Vanya Pavlova
Telerik team
 answered on 25 Oct 2010
24 answers
467 views
Hello, it's been hours since I've tried and searched for any samples that implements hierarchical data using Linq to SQL. It says in your feature product that it automatically detects hierarchy relationship. Could you please provide a tutorial on how to implement or bind a datacontext to the datatemplate of my hierarchychildtemplate? 

And, i currenty coded
void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            
            m_dcData = new DataAccessDataContext();
            m_dcData.Log = Console.Out;
            rgvData.ItemsSource = m_dcData.Orders;
 
        }


And I tried to commenting out rgvData.ItemsSource = m_dcData.Orders and tried Binding the Linq to SQL class to xaml but I failed. How do I bind a Linq to SQL Class in xaml file so that in my second hierarchical data grid it shows the table that is related to the parent node?
<Grid>
        <Border telerikQuickStart:ThemeAwareBackgroundBehavior.IsEnabled="True" />
        <telerik:RadGridView x:Name="rgvData" CanUserFreezeColumns="False" GridLinesVisibility="Horizontal" ItemsSource="" IsReadOnly="True" AutoGenerateColumns="False">
            <telerik:RadGridView.ChildTableDefinitions>
                <telerik:GridViewTableDefinition />
            </telerik:RadGridView.ChildTableDefinitions>
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding OrderDate}" Header="Order Date" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding EmployeeID}" Header="Employee" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Freight}" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding ShipCountry}" Header="Ship Country" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding ShipCity}" Header="Ship City" />
            </telerik:RadGridView.Columns>
            <telerik:RadGridView.HierarchyChildTemplate>
                <DataTemplate>
                    <telerik:RadGridView x:Name="RadGridView1" CanUserFreezeColumns="False" AutoGenerateColumns="False" ShowGroupPanel="False" IsReadOnly="True">
                        <telerik:RadGridView.Columns>
                            <telerik:GridViewDataColumn DataMemberBinding="{Binding CustomerID}" Header="Customer ID" />
                            <telerik:GridViewDataColumn DataMemberBinding="{Binding Address}" Header="Address" />
                            <telerik:GridViewDataColumn DataMemberBinding="{Binding City}" Header="City" />
                            <telerik:GridViewDataColumn DataMemberBinding="{Binding Country}" Header="Country" />
                        </telerik:RadGridView.Columns>
                    </telerik:RadGridView>
                </DataTemplate>
            </telerik:RadGridView.HierarchyChildTemplate>
        </telerik:RadGridView>
    </Grid>

Thanks!
Yavor Georgiev
Telerik team
 answered on 25 Oct 2010
5 answers
114 views
I have time series data that has gaps on holidays and weekends that must be omitted from the charts.  I am fine indexing the dates, that actually works good for me.  What I need to do is replace the index that is present on the X axis with the date it represents.  I have not found how to do this on the WPF charting controls.

Thanks!
Ves
Telerik team
 answered on 25 Oct 2010
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
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
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?