Telerik Forums
UI for WPF Forum
2 answers
93 views
Hi Telerik,

I have implemented something similar to the Tree to Grid Drag that you have posted as an example on the RadControls for WPF page in my own project.  I need to be able to resize the Column Widths on the RadGridView, but I can no longer do that once I begin to write my own Drag And Drop handlers for the RadGridView.  Your example does the same thing that mine does.  It doesn't allow you to change the Column Widths or re-order the columns in the middle portion labeled "Order".

Please let me know if you have found a solution to this problem.

Thanks,
Scott
Scott
Top achievements
Rank 1
 answered on 08 Jul 2011
1 answer
186 views
Hi,
i have a - maybe - stupid question. My Application uses Entity Framework 4.1 with DBContext. In the MainWindow is a RadGridView bound to a QueryableCollectionView (Customers) to display Data.

<telerik:RadGridView x:Name="uxCustomerGrid" ItemsSource="{Binding Customers,BindsDirectlyToSource=True}" IsReadOnly="True" EnableColumnVirtualization="True" EnableRowVirtualization="true" SelectionMode="Extended" RowIndicatorVisibility="Collapsed" AutoGenerateColumns="False" CanUserDeleteRows="False" CanUserInsertRows="False" GridLinesVisibility="None" IsFilteringAllowed="False" ShowGroupPanel="False" RowStyle="{DynamicResource CustomerRowStyle}">
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn DataMemberBinding="{Binding Kundennummer}" Header="Nummer"/>
<telerik:GridViewDataColumn DataMemberBinding="{Binding Kundenname}" Header="Name" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding Ort.Bezeichnung}" Header="Ort" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding Ort.PLZ}" Header="PLZ" IsVisible="False" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding Einwohneranzahl}" Header="Einwohner" IsVisible="False" />
</telerik:RadGridView.Columns>
</telerik:RadGridView>

        private QueryableCollectionView _customers;
 
        public QueryableCollectionView Customers
        {
            get { return _customers; }
            set
            {
                if (value != _customers)
                {
                    _customers = value;
                    OnPropertyChanged("Customers");
                }
            }
        }
 
....
 
this._context = new MiexUnitOfWork();
_context.Kunde.ToList();
this.Customers = new QueryableCollectionView(_context.Kunde.Local);

The user changes a single row of the grid via a ModalWindow. The Window has it's own dbcontext. After the user has closed the ModalWindow (and the changes are saved to the database) i wan't to refresh the grid in the parent's window.
I tried the following:
_context.Entry(_context.Kunde.Find(Key)).Reload()

This code forces the dbcontext to update the changed entry. But the changes are not reflected in the grid. I tried to call the Refresh() method of the QueryableCollectionView, but the grid still show's the old values.

How can i force the grid to show the changes made in the dbcontext?
Mike
Top achievements
Rank 2
 answered on 08 Jul 2011
4 answers
351 views
Hello,

I have in ribbon a RadRibbonDropDownButton which contains a usercontrol with tabcontrol and RadColorSelector. (to program predefined and personnalized color control).
Some where else i use a RadDropdownButton which contains the same color control.

I see some difference between the both :
   - in RadRibbonDropDownButton, when i choose a color on the colorselector, it close the dropdowncontent, not for RadDropdownButton.
   - in RadRibbonDropDownButton, when i click on tabitem, it will close the dropdowncontent until i add this code . For RadDropdownButton, even with the same code it always close the dropdowncontent.
<TabControl x:Name="tabcontrol" MouseDown="MousedownHandled" SelectionChanged="test">
private void MousedownHandled(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
      if (tabcontrol.SelectedIndex == 1) e.Handled = true;
}
 
private void test(object sender, SelectionChangedEventArgs e)
{
       if (e.OriginalSource == tabcontrol)   e.Handled = true;
}

the function "test" is called elsewhere i click on the control (if i click on a color in ColorSelector also ?!?)


Well, could you explain me
  • the difference of the both components
  • and also when should close the dropdowncontent, and how prevent from closing ?

Thanks
Aurore
I use 2011.1.419.35 dll
Petar Mladenov
Telerik team
 answered on 08 Jul 2011
6 answers
161 views
I think it’s very courageous of you to start with a “msWord-alike” RichTextBox.
You came with a very fine “word” example in the Demo with a lot of functionality. Great!
But of course, starting with this you can expect more questions and more wishes. We are never satisfied!  8-)
Questions like this:
- What about merging? 
- What about Header and Footer?
Iva Toteva
Telerik team
 answered on 08 Jul 2011
3 answers
153 views
My data items look like this:
Public Class ExportData
    Public Property MyDate As Date
    Public Property ItemType As String
 End Class
Now I'd like to get a stacked bar chart that groups the items by month and stacks the count of the different item types. For each month I would have a stacked bar that says for example  "Jan 11 = 3 items of type A, 4 items of type B, 5 items of type C".
Is this possible?

I tried to with the following XAML code to configure the chart:
<telerik:RadChart.SeriesMappings>
    <telerik:SeriesMapping x:Name="DataMapping" LegendLabel="Sales">
 
        <telerik:SeriesMapping.SeriesDefinition>
            <telerik:StackedBarSeriesDefinition ShowItemLabels="True" ShowItemToolTips="True" ItemToolTipFormat="#Y">
                <telerik:StackedBarSeriesDefinition.InteractivitySettings>
                    <telerik:InteractivitySettings HoverScope="Series" SelectionScope="None" />
                </telerik:StackedBarSeriesDefinition.InteractivitySettings>
            </telerik:StackedBarSeriesDefinition>
        </telerik:SeriesMapping.SeriesDefinition>
 
        <telerik:SeriesMapping.ItemMappings>
            <telerik:ItemMapping FieldName="ItemType" DataPointMember="YValue" AggregateFunction="Count" />
            <telerik:ItemMapping FieldName="MyDate" DataPointMember="XCategory" />
        </telerik:SeriesMapping.ItemMappings>
 
        <telerik:SeriesMapping.GroupingSettings>
            <telerik:GroupingSettings StackGroupFieldName="ItemType" ShouldFlattenSeries="True">
                <telerik:GroupingSettings.GroupDescriptors>
                    <telerik:ChartYearGroupDescriptor />
                    <telerik:ChartMonthGroupDescriptor />
                    <telerik:ChartGroupDescriptor Member="ItemType" />
                </telerik:GroupingSettings.GroupDescriptors>
            </telerik:GroupingSettings>
        </telerik:SeriesMapping.GroupingSettings>
 
    </telerik:SeriesMapping>
</telerik:RadChart.SeriesMappings>
Thanks for any ideas...
Nikolay
Telerik team
 answered on 08 Jul 2011
1 answer
94 views
Hi !

I have the ScheduleView with a WeekViewDefinition.

My Problem is, the Appointment with is about 98% of the width of a slot in the week.

So if i have 2 appointments e.g. one one monday and one one tuesday at the same time, the space between
the two appointments is very small and it will be hard to select the slot on eg, monday on the same time.

See attached screenshot.

Is there any chance to recude the width of the appointments to eg.: just 70% of the width of a slot for a day ?
Konstantina
Telerik team
 answered on 08 Jul 2011
5 answers
244 views
Hi

I would be great if someone can post an sample project, of Add, Edit, Delete Dataform,using the Entity Frame work, I have all sort of trouble getting it to work

cheers

Jason
Milan
Telerik team
 answered on 08 Jul 2011
3 answers
458 views
Hello,

I am using WPF RadGridView in a common user control, and this control supports many different types of data.  The grid is therefore built dynamically in code, and there is no XAML except to define the grid itself.  The data is bound using the ItemsSource property to a QueryableCollectionView.  Our client has requested that we provide a search on the visible grid elements (i.e. current page only), and they do NOT want to filter based on the search, only highlight the cells where the text was found.

I have implemented the code necessary to perform the search.  However, at the point where I find a match, I need to highlight the cell containing the match.  I know the row and column at this point, but I am unclear how to go about changing the cell style with only this information.  Do you have any suggestions?

Here is the event code to perform the search after the search text box (txtSearch) is filled:
 
private void SearchTextBox_Search(object sender, RoutedEventArgs e)
{
    int foundCellCount = 0;
    foreach (object o in ((QueryableCollectionView)theGrid.ItemsSource))
    {
        if (o != null)
        {
            Type rowType = o.GetType();
            PropertyInfo[] props = rowType.GetProperties(BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static);
 
            foreach (PropertyInfo pi in props)
            {
                if (IsVisibleColumn(pi.Name))
                {
                    object oCellVal = pi.GetValue(o, null);
                    if ((oCellVal != null) &&
                        ((oCellVal.GetType() == typeof(int)) ||
                         (oCellVal.GetType() == typeof(string)) ||
                         (oCellVal.GetType() == typeof(long))))
                    {
                        string cellVal = oCellVal.ToString();
                        if (cellVal.Contains(txtSearch.Text))
                        {
                            // Match found
                            foundCellCount++;
 
                            // NEED TO HIGHLIGHT THE CONTAINING CELL HERE!!!
                        }
                    }
                }
            }
        }
    }
 
    if (foundCellCount > 0)
    {
        MessageBox.Show(string.Format("Match found in {0} cells", foundCellCount));
    }
    else
    {
        MessageBox.Show("Not Found!");
    }
}
Milan
Telerik team
 answered on 08 Jul 2011
0 answers
103 views

 We are using RadControls for WPF Q2 2010.

In our project we need to update the RadGridView which contains about 100 or more strokes several times in minute. We set the property “DataLoadMode” of the RadGridView to Asynchronous but updating of the GridView hinder the program to work fast and correctly.

Can you tell us the way to resolve this problem?

Alexandra
Top achievements
Rank 1
 asked on 08 Jul 2011
1 answer
109 views
Hello,
I creted custom template for input control. But it doesn't work properly
<Style TargetType="telerik:RadMaskedNumericInput">
       <Setter Property="Margin" Value="2 2 2 2"/>
       <Setter Property="IsClearButtonVisible" Value="False"/>
       <Setter Property="TextMode" Value="PlainText"/>
       <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
       <Setter Property="Validation.ErrorTemplate">
           <Setter.Value>
               <ControlTemplate>
               </ControlTemplate>
           </Setter.Value>
       </Setter>
       <Style.Triggers>
           <Trigger Property="Validation.HasError" Value="true">
               <Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}"/>
               <Setter Property="BorderBrush" Value="Red"/>
           </Trigger>
       </Style.Triggers>
   </Style>

First of all ClearButton is still visible.

BorderBrush changed to red after validation error, but only after I focus and unfocus control.
ValidationError don't appear in ToolTip.
I use newest compilation.
Tina Stancheva
Telerik team
 answered on 07 Jul 2011
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?