Telerik Forums
UI for WPF Forum
2 answers
144 views

We have a GanttView being used to display data over time, with a column on the left displaying a name associated with each row of data. Upon first rendering a data set onto the GanttView, the name column automatically sizes itself to fit the longest name in the data set. This behavior is nice, and we wish to keep it.

However, if the data set is large, not all rows of the data set will be immediately rendered onto the GanttView; these rows will only be rendered when the GanttView is scrolled down to reveal them. A result of this is that the name column will resize itself to fit the names of newly-rendered rows, if their names are longer than the longest name initially rendered.

This causes an issue for us, as we have functionality that makes use of the width of the name column, and we cannot rely on the GanttView being scrolled down to ensure that the name column is at its final width.

Is there a way to force the GanttView to size the name column to fit the longest name, regardless of whether that name's row has already been rendered?

Or, alternatively, is there a way to force the GanttView to render all of its rows when it is populated with data? I understand that this may cause a significant decrease in performance, but this may be acceptable.

Alexander
Top achievements
Rank 1
 answered on 09 Mar 2020
1 answer
234 views
Hi , I am not able to change the theme of pdf viewer toolbar can you help me to get exact toolbar theme as shown in demos?
Dimitar
Telerik team
 answered on 09 Mar 2020
8 answers
1.4K+ views
How can I create a round (as circle) RadButton, define its radius, and after all put any image (icon) on it surface? Please give me an example if this is possible ofcource. Thank you very much in advance.
Heiko
Top achievements
Rank 1
Iron
Veteran
 answered on 08 Mar 2020
5 answers
283 views

Hi,

I have following RadComboBox:

<telerik:RadComboBox x:Name="cmbSvtAreaManagers" Grid.Row="0" Grid.Column="2"
                ItemsSource="{Binding SvtAreaManagers}"
                TextSearch.TextPath="DisplayPerson"
                DisplayMemberPath="DisplayPerson"
                SelectedValue="{Binding CurrentCustomerFabrics.AreaManagerID, Mode=TwoWay}"
                SelectedValuePath="PersonID"
                ClearSelectionButtonContent="{bx:LocalizeBinding ClearSelectedItem, Global=true}"
                ClearSelectionButtonVisibility="Visible">

As you can see, the SelectedValue is bound to the CurrentCustomerFabrics object (my Model class) defined in my ViewModel.

private CustomerFabricsModel customerFabricsModel;
public CustomerFabricsModel CurrentCustomerFabrics
{
    get { return customerFabricsModel; }
    set
    {
        if (customerFabricsModel != value)
        {
            customerFabricsModel = value;
            NotifyPropertyChanged();
        }
    }
}

 

When the form is launched, the CurrentCustomerFabrics object is null (it's not initialized) so I would expect to see an empty combobox, but instead the first record is shown (SelectedIndex = 0).  How is this possible ?

Regards,
Hans

 

 

 
Dinko | Tech Support Engineer
Telerik team
 answered on 06 Mar 2020
4 answers
527 views

I have a GridViewDataColumn, in the first column is an AutoCompleteBox for searching names in a ObservablceCollection.

I have build the RadGridView with AutoCompleteBox like this:

 

<telerik:GridViewDataColumn DataMemberBinding="{Binding Name}" Width="*" IsReadOnly="False">
     <telerik:GridViewDataColumn.CellTemplate>
      <DataTemplate DataType="{x:Type detailViews:MyViewModel}">
       <Grid>
        <Grid.ColumnDefinitions>
         <ColumnDefinition Width="*"/>
         <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <telerik:RadAutoCompleteBox DisplayMemberPath="Name"
                                    TextSearchMode="Contains"
               WatermarkContent="Suche..."
               AutoCompleteMode="Suggest"
               SelectionMode="Single"
                                    ItemsSource="{Binding Project.Names, RelativeSource={RelativeSource AncestorType=telerik:RadGridView}}"  />
        <telerik:RadButton Grid.Column="1" HorizontalAlignment="Right" Style="{StaticResource RadImageButton}" ToolTip="Search"
                Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=UserControl}, Path=DataContext.SearchFromDatabaseCommand}"
                CommandParameter="{Binding Path=.}">
         <Image Grid.Column="1" Source="{framework:ApplicationImage image}" Width="16" Height="16" />
        </telerik:RadButton>
       </Grid>
      </DataTemplate>
     </telerik:GridViewDataColumn.CellTemplate>
    </telerik:GridViewDataColumn>

 

My Problem is that the items of ObservableCollection not binded in autocompletebox. Is it possible with my type of implemetation of the AutoCompleteBox in the GridViewDataColumn?

Dinko | Tech Support Engineer
Telerik team
 answered on 06 Mar 2020
1 answer
219 views

     Hello,

 

I have a RadMap that is throwing an exception which is putting my wpf application into 'break mode'. I am unable to locate where exactly the exception is occurring as it seems to be within the RadMap library. Any suggestions?

 

System.NullReferenceException

  HResult=0x80004003
  Message=Object reference not set to an instance of an object.
  Source=Telerik.Windows.Controls.DataVisualization
  StackTrace:
   at Telerik.Windows.Controls.Map.MapShapeData.SetLogicalWidth(Int32 zoomLevel)
   at Telerik.Windows.Controls.Map.MapShapeData.CalculateScreenGeometry(Int32 zoomLevel, Boolean raisePropertyChanged)
   at Telerik.Windows.Controls.Map.ShapeCoordinatesProcessor.StartProcessing(Object paramObject)
   at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

Vladimir Stoyanov
Telerik team
 answered on 05 Mar 2020
3 answers
249 views

  We need to change the appointment height per appointment in the RadScheduleView timeline view. Since we have multiple appointment types

with different information (amount of information), we need to change the size. We don't want scrollable content.

So my plan was to set the MinAppointmentHeight to the smallest appointment and than scale them. But if I set the MinAppointmentHeight,

all appointments just have the same size. Event if we change it in the style.

 

Thanks a lot!

Dinko | Tech Support Engineer
Telerik team
 answered on 05 Mar 2020
1 answer
158 views
I am using Telerik RadGridView for WPF. I have a scenario where a user types some value in the RadGridView cell and then clicks on the save button. I want to get the updated value that the user just typed in the cell. When I tab-out from the cell then I can get the updated value in CellEditEnded event. But in my scenario I don't want to tab-out from the RadGridView cell.
Martin Ivanov
Telerik team
 answered on 04 Mar 2020
7 answers
1.7K+ views

Hi,

I'm disappointed to not successfully bind a column on a custom object: is it possible to display a custom object in a cell of a grid ?

If i use DataMemberBinding jointly with CellTemplate, the dataContext of the gridviewcell is not my property but still the 'row object':

Is GridViewDataColumn's purpose to bind on 'simple properties' ?

Thanks a lot,

Example: The 2nd column doesn't display the button content neither bind the command because the datacontext of the cell is still a 'Row' object and not and 'Item' object.

 

Code:

public class MyViewModel : Telerik.Windows.Controls.ViewModelBase
    {
        public MyViewModel()
        {
            this.ItemsSource = new ObservableCollection<Row>()
            {
                new Row() { RowName = "Row 1" },
                new Row() { RowName = "Row 2" },
                new Row() { RowName = "Row 3" },
            };
        }
 
        public ObservableCollection<Row> ItemsSource { get; set; }
    }
 
    public class Row
    {
        public Row()
        {
            this.Item = new Item();
        }
 
        public Item Item { get; private set; }
        public string RowName { get; set; }
    }
 
    public class Item
    {
        private static Random rnd = new Random();
 
        public Item()
        {
            this.Display = string.Format("Item {0}", rnd.Next(1, 999));
            this.FireItem = new Telerik.Windows.Controls.DelegateCommand((object o) =>
            {
                System.Diagnostics.Debug.WriteLine("Double click on " + this.Display);
            });
        }
 
        public string Display { get; set; }
 
        public ICommand FireItem { get; set; }
    }

 

Xaml : 

<Window.Resources>
        <local:MyViewModel x:Key="MyViewModel" />
        <DataTemplate x:Key="ItemTemplate">
            <Button Width="75"
                    Height="75"
                    Command="{Binding FireItem}"
                    Content="{Binding Display}" />
        </DataTemplate>
    </Window.Resources>
    <Grid>
        <telerik:RadGridView AutoGenerateColumns="False"
                             DataContext="{Binding Source={StaticResource MyViewModel}}"
                             IsReadOnly="True"
                             ItemsSource="{Binding ItemsSource}">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding RowName}"
                                            Header="Stage" />
 
                <telerik:GridViewDataColumn CellTemplate="{StaticResource ItemTemplate}"
                                            DataMemberBinding="{Binding Item}"
                                            Header="Item" />
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
    </Grid>
Yoan
Telerik team
 answered on 04 Mar 2020
3 answers
316 views

Please, I need show a RadWindow inside to RadNavigationView.

 

Could you help me!

Vicky
Telerik team
 answered on 04 Mar 2020
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
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?