Telerik Forums
UI for WPF Forum
1 answer
107 views
How can I increase a custom Shape area to below? Connection point and connection line should remain in the same position.
Martin Ivanov
Telerik team
 answered on 26 Oct 2018
1 answer
86 views

I have a timebar used to selecting time range. However sometimes when the interval is short and located far to the right, the text showing the selected time is cut off, like this: https://i.gyazo.com/179cc9d932da3bcfa08fe38558cbb0ca.png

How can I prevent this? For example make the label right aligned instead of left aligned if it's too far to the right.

Martin Ivanov
Telerik team
 answered on 26 Oct 2018
16 answers
2.9K+ views
Hi,

I'm trying to find out if you guys make the source code available for download for the WPF Controls Examples. I would do the clickonce app that you guys link to in your help (i.e. http://demos.telerik.com/wpf) but it requires SQL Server Express '08. I don't have that installed nor do I want to install it just to get to your demos...What's my alternative?

Thanks
Martin Ivanov
Telerik team
 answered on 26 Oct 2018
1 answer
137 views

I'm needing the datetimepicker to allow the user to select an option for each second over the day, but when i'm down to just 15 minutes the boxes get too small for being able to see the text. 

I've scrolled view documentation and the forum and can't find any solution.

Vladimir Stoyanov
Telerik team
 answered on 25 Oct 2018
3 answers
1.7K+ views
None of the solutions presented in the following threads works:

https://www.telerik.com/forums/how-to-disable-the-user-input

https://www.telerik.com/forums/disable-input-field-force-user-choose-date-by-click-on-calendar

https://www.telerik.com/forums/how-to-disable-input

The objective in unable the user to type a text and allow him to choose a date only by clicking button.
Dilyan Traykov
Telerik team
 answered on 25 Oct 2018
2 answers
891 views

Hi,

I have a grid with 4 columns. On selecting/changing value for 3rd column(i.e.: NewFamily) I want to programmatically set some value for the combobox in 4th column (selected value as well as list)

Here is the xaml:
        <telerik:RadGridView Grid.Row="0"  x:Name="PartFamilyGrid" AutoGenerateColumns="False" 
                             ColumnWidth="*" MinHeight="150"
                             RowIndicatorVisibility="Collapsed" SelectionChanged="PartFamilyGrid_SelectionChanged"
                             >  
                <telerik1:StyleManager.Theme>
                    <telerik1:VisualStudio2013Theme/>
                </telerik1:StyleManager.Theme>
                <telerik:RadGridView.Columns>
                
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Family}"    IsReadOnly="True" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Part}"      IsReadOnly="True" />

                <telerik:GridViewDataColumn>
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <telerik:RadComboBox ItemsSource ="{Binding NewFamily}" SelectionChanged="NewFamilySelected" />
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                    <telerik:GridViewDataColumn.Header>New Family</telerik:GridViewDataColumn.Header>
                </telerik:GridViewDataColumn>

                <telerik:GridViewDataColumn>
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <telerik:RadComboBox ItemsSource ="{Binding NewPart}" SelectionChanged="NewPartSelected" />
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                    <telerik:GridViewDataColumn.Header>New Part</telerik:GridViewDataColumn.Header>
                </telerik:GridViewDataColumn>
                
                
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>

Items of this RadGridView are objects of this class
    public class PartFamilyGridItem : INotifyPropertyChanged
        {
        public string Family
            {
            get; set;
            }
        public string Part
            {
            get; set;
            }
        public List<string> NewFamily
            {
            get; set;
            }
        public List<string> NewPart
            {
            get; set;
            }

        public event PropertyChangedEventHandler PropertyChanged;
        }

In the SelectionChanged event (NewFamilySelected) for the RadComboBox in 3rd column i want to handle this task. But I am not sure how to do it.
Do I need to get the row of the RadComboBox (from 3rd col) for which value is modified, select the RadComboBox from 4th col and finally change the selectedValue?

 

A similar issue is handled here https://www.telerik.com/forums/change-the-cell-content-at-runtime#MtiwER8x9USdCWTtLyu5_A

but I am not getting how to handle it for combobox

maria
Top achievements
Rank 1
 answered on 25 Oct 2018
7 answers
867 views
Hi,
I just started to investigate the gridView control and got stuck in to a problem:
Is it possible to change a specific cell content in a grid view?
I want to with something like this:

radGridView.Rows[radGridView.SelectedRow].Cols["Col_Name"].value =   
MY_NEW_VALUE; 
maria
Top achievements
Rank 1
 answered on 25 Oct 2018
1 answer
164 views

Hello again!

I'd like to create custom class that is RadDiagramConnection and has its full functionality within RadDiagram , but with some additional data ( implementation of additional interface).

When I am creating it via inheriting from RadDiagramConnection ( as it is recommended in Telerik documentation here: https://docs.telerik.com/devtools/wpf/controls/raddiagram/howto/create-custom-connectioncap ).

But when I add it to my RadDiagram, I see nothing. As I know where my LineObject is I can click on it and see 2 ancor-points, but I can not see RadDiagramConnection itself. Picture is attached.

Would you be so kind to tell me how I can implement this thing?

This is my .cs file

public class LineObject : RadDiagramConnection
 {
      
}

This is my Xaml file:

    <telerik:RadDiagram  >
        <telerik:RadDiagramConnection StartPoint="250,250" EndPoint="150,150"
                                          SourceCapType="Arrow1Filled" TargetCapType="Arrow1Filled"
                                          SourceCapSize="20,20" TargetCapSize="20, 20"
                                          StrokeThickness="5" Background="Red"
                                          Stroke="Red"
                                          />
        <imageeditor:LineObject StartPoint="150,250" EndPoint="250,150"
                                          SourceCapType="Arrow1Filled" TargetCapType="Arrow1Filled"
                                          SourceCapSize="20,20" TargetCapSize="20, 20"
                                          StrokeThickness="5" Background="Blue"
                                          Stroke="Blue" />
 
</telerik:RadDiagram>

 

Best regards,
Tatiana

Tatiana
Top achievements
Rank 1
 answered on 24 Oct 2018
5 answers
279 views

if before the fixed width  column,there is the "*" column,for example:
  there are five columns,column0=150;column1=*;column2=250;column3=150;column4=250;
It is difficult resize the column width,I search the feedback information,and found there is the feedback in 2016,
but don't disposal ,so i got the old source code,and find some question code :
   in the GridViewColumnCollectionInternal.cs file,the function RecalculateNonStarColumnWidthsOnPositiveResize()
and RecalculateNonStarColumnWidthsOnNegativeResize() have bug.
    the first: adjust the RecalculateNonStarColumnWidthsOnPositiveResize()
change frome
column.SetWidthInternal(new GridViewLength(width.Value, GridViewLengthUnitType.Pixel, width.DesiredValue, width.DisplayValue - columnExcessWidth));
to
  column.SetWidthInternal(new GridViewLength(width.DisplayValue - columnExcessWidth));

then positive resize is OK!
In addition,the other method:
//PositiveResize Non * column
private double RecalculateNonStarColumnWidthsOnPositiveResize(
   double change,
   int index,
   bool retainAuto)
  {
   if (DoubleUtil.GreaterThan(change, 0.0))
   {
                #region calculate the resize total width
                double canAdjustWidth = 0;double totalWidth = 0;
                for (int i = this.Count - 1;  i > index; i--)
                {
                    var column = this.ColumnFromDisplayIndex(i);
                    if (!IsColumnResizable(column))
                    {
                        continue;
                    }
                    var width = column.Width;
                    var minWidth = column.MinWidth;
                    if (!width.IsStar &&
                        DoubleUtil.GreaterThan(width.DisplayValue, minWidth))
                    {
                        canAdjustWidth += width.DisplayValue - minWidth;
                        totalWidth += width.DisplayValue;
                    }
                }
                #endregion
                #region resize column by scale
                double actualAdjustWidth = 0;
                if (change > canAdjustWidth) actualAdjustWidth = canAdjustWidth;
                else actualAdjustWidth = change;
                for (int i = this.Count - 1; i > index; i--)
                {
                    var column = this.ColumnFromDisplayIndex(i);
                    if (!IsColumnResizable(column))
                    {
                        continue;
                    }
                    var width = column.Width;
                    var minWidth = column.MinWidth;
                    if (!width.IsStar &&
                        DoubleUtil.GreaterThan(width.DisplayValue, minWidth))
                    {
                        double adj = width.DisplayValue* actualAdjustWidth / totalWidth;
                        column.SetWidthInternal(new GridViewLength(width.DisplayValue-adj));
                    }
                }
                #endregion
                #region adjust the current column
                if (DoubleUtil.GreaterThan(actualAdjustWidth, 0.0))
                {
                    var column = this.ColumnFromDisplayIndex(index);
                    SetColumnWidth(column, actualAdjustWidth, retainAuto);
                    change -= actualAdjustWidth;
                }
                #endregion
   }
   return change;
  }
 and second modify the NegativeResize code:
  private double RecalculateNonStarColumnWidthsOnNegativeResize(
   double change,
   int index,
   bool retainAuto)
  {
   if (DoubleUtil.GreaterThan(change, 0.0))
   {
                #region calculate the total width of the right resize column
                double canAdjustWidth = 0;
                int needAdjustCount = 0;
                int needAdjustCountStar = 0;
                bool isExistMinWidth = false;
                for (int i = index + 1;  i < this.Count; i++)
                {
                    var column = this.ColumnFromDisplayIndex(i);
                    if (!IsColumnResizable(column))
                    {
                        continue;
                    }
                    var width = column.Width;
                    //include the * column
                    if (!DoubleUtil.AreClose(width.DisplayValue, column.MaxWidth))
                    {
                        canAdjustWidth += width.DisplayValue;
                        if (!width.IsStar) //fixed column
                        {
                            needAdjustCount += 1;
                            if (DoubleUtil.GreaterThan(column.MinWidth*3, width.DisplayValue))
                            {
                                isExistMinWidth = true;
                            }
                        }
                        else
                            needAdjustCountStar += 1;
                    }
                }
                #endregion
                #region  when the fixed column width is small the  three times minvalue,or non * column
                if(!isExistMinWidth && needAdjustCountStar>0) return change;
                #endregion
                #region resize column by scale
                double actualAdjustWidth = 0;
                double totalAdjustWidth = 0;
                if (change > canAdjustWidth)
                    actualAdjustWidth = canAdjustWidth;
                else
                    actualAdjustWidth = change;
                for (int i = this.Count - 1; i > index; i--)
                {
                    var column = this.ColumnFromDisplayIndex(i);
                    if (!IsColumnResizable(column))
                    {
                        continue;
                    }
                    var width = column.Width;
                    if (!width.IsStar &&
                        !DoubleUtil.AreClose(width.DisplayValue, column.MaxWidth))
                    {
                        double adj = width.DisplayValue * actualAdjustWidth / canAdjustWidth;
                        totalAdjustWidth += adj;
                        column.SetWidthInternal(new GridViewLength(width.DisplayValue + adj));
                    }
                }
                #endregion
                #region adjust the current column
                if (DoubleUtil.GreaterThan(totalAdjustWidth, 0.0))
                {
                    var column = this.ColumnFromDisplayIndex(index);
                    SetColumnWidth(column, -totalAdjustWidth, retainAuto);
                    change -= totalAdjustWidth;
                }
                #endregion          
   }
   return change;
  }


Vladimir Stoyanov
Telerik team
 answered on 24 Oct 2018
4 answers
555 views

After editing a cell in a grid, the next row below is automatically selected. But if the grid is sorted, and the edit makes the current row to be moved, the row which is selected after the edit is the row below the new position. I would expect that the row to be selected is the one below the original location.

I've attached an image from a test application, and when comitting the active edit the row will be moved upwards (due to the sorting), and the next row to be selected is the one with IntegerValue 16. I want it to be the row with IntegerValue 32. Almost feels like a bug?

I've tried to override this by storing the selected row when the CellEditEnded-event is triggerd, and then trying to select it at SelectionChanging or SelectionChanged, but my attempts fail. 

Magnus
Top achievements
Rank 1
 answered on 24 Oct 2018
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
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?