Telerik Forums
UI for WPF Forum
1 answer
238 views

Hi!

I need to implementation auto start begin edit cell in the same row and next column, after click in previous column.
In begin my table, code works correctly. But in the last row and in penultimate column code doesn't work correctly, it begin start edit in the last row and in third column.
But after how I write value by myself, code start to work correctly. I use telerik framework.
Thank you for your responses!

var element = sender as FrameworkElement;
        ConditionsRadGridView.CommitEdit();
        var parentCell = element.GetVisualParent<GridViewCell>();
        if (parentCell != null)
        {
            var index = ConditionsRadGridView.Columns.IndexOf(parentCell.Column);
            if (index != -1 && index < parentCell.ParentRow.Cells.Count)
            {
                var nextCell = parentCell.ParentRow.Cells[index] as GridViewCell;
                if (nextCell != null)
                {
                    ConditionsRadGridView.CurrentCellInfo = new GridViewCellInfo(nextCell);
                    ConditionsRadGridView.BeginEdit();
                }
            }
        }
<telerik:RadGridView ValidatesOnDataErrors="InViewMode"                      
                     Name="ConditionsRadGridView"
                     Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2"
                     Margin="6 3 6 6" HorizontalAlignment="Left"
                     RowIndicatorVisibility="Collapsed" AutoGenerateColumns="False"
                     CanUserDeleteRows="False" CanUserInsertRows="False" ShowGroupPanel="False" CanUserReorderColumns="False"
                     FrozenColumnCount="1"
                     CanUserFreezeColumns="False"
                     ItemsSource="{Binding Conditions}" EnableColumnVirtualization="False"
                     RowStyle="{StaticResource ValidationFixStyle}"
                     SelectionMode="Extended" 
                     cal:Message.Attach="[Event PreviewKeyUp] = [Action ConditionsKeyUp($this.SelectedItems, $eventArgs)]">
        <telerik:RadGridView.Columns>
            <telerik:GridViewDataColumn CellStyle="{StaticResource SelectedCellStyle}" Header="{x:Static properties:Resources.Station}" DataMemberBinding="{Binding Name, Mode=TwoWay}"
                                CellTemplateSelector="{StaticResource ConditionNameTemplateSelector}"/>
                <telerik:GridViewColumn IsVisible="{Binding IsHaveGroups}">
                <telerik:GridViewColumn.CellTemplate>
                    <DataTemplate>
                        <CheckBox Visibility="{Binding IsGroup, Converter={StaticResource BoolToVisibilityConverter}}" IsChecked="{Binding IsSplitUp, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                  cal:Message.Attach="[Event Click] = [Action IsSplitUpClick($datacontext)]" />
                    </DataTemplate>
                </telerik:GridViewColumn.CellTemplate>
            </telerik:GridViewColumn>
    <telerik:GridViewDataColumn Header="{x:Static properties:Resources.AffinityOperator}" ColumnGroupName="Affinity"
                                    DataMemberBinding="{Binding AffinityOperator, UpdateSourceTrigger=PropertyChanged}" TextAlignment="Center" IsReadOnly="True">
          <telerik:GridViewDataColumn.CellTemplate>
            <DataTemplate DataType="{x:Type vm:StationConditionViewModel}">
              <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                <controls3:RadComboBox IsEnabled="{Binding IsRowEnabled}" SelectionChanged="StartEditNextCell"
                                       SelectedItem="{Binding AffinityOperator, UpdateSourceTrigger=PropertyChanged}"
                                       ItemsSource="{Binding Operators}" VerticalAlignment="Center" HorizontalAlignment="Stretch"/>
                </Grid>
            </DataTemplate>
          </telerik:GridViewDataColumn.CellTemplate>
        </telerik:GridViewDataColumn>
    <telerik:GridViewDataColumn Header="{x:Static properties:Resources.AffinityValue}" ColumnGroupName="Affinity" IsReadOnlyBinding="{Binding AffinityIsReadOnly}"
                                     DataMemberBinding="{Binding Path=AffinityValue}" TextAlignment="Right">
      <telerik:GridViewDataColumn.CellTemplate>
        <DataTemplate DataType="{x:Type vm:StationConditionViewModel}">
          <TextBlock Text="{Binding AffinityValue, StringFormat={}{0:N2}}" Visibility="{Binding AffinityVisibility}" VerticalAlignment="Center" HorizontalAlignment="Right" />
        </DataTemplate>
      </telerik:GridViewDataColumn.CellTemplate>
    </telerik:GridViewDataColumn>
Martin Ivanov
Telerik team
 answered on 26 Jul 2018
1 answer
135 views

Hello,

 

I would like to have fixed heights for the slots even when I change the Minor/MajorTickLength.

Currently I get this (5minutes.jpg, 15minutes.jpg and 30minutes.jpg)

and the result I would like to have is: 5minutesRight.jpg, 15minutes.jpg, 30minutesRight.jpg

I tried setting the VerticalWeekMinor/MajorItemTemplate or the MinAppointmentHeight to fixed height but that didn't yield the result I was looking for.

Any help would be appreciated.

 

Best regards!

 

 

Dinko | Tech Support Engineer
Telerik team
 answered on 26 Jul 2018
2 answers
64 views

Hi ,the png display July,i want to get all the date in the png , from June 25 to August 5。

How can i do that ?

And How can i get all the date when i clicked the RepeatButton to MoveLeft or MoveRight ?

 

Thanks.

guo
Top achievements
Rank 1
 answered on 26 Jul 2018
3 answers
206 views
Our enterprise has chosen Telerik as our tool to convert XLSX files to PDF.  One limitation that has become an issue for our clients is that Telerik's API doesn't seem to support images in the XLSX header/footer.  I've been trying to get around this limitation using the Telerik.Windows.Documents.Spreadsheet.Model.Shapes.FloatingImage class, but when I move the image past the top margin into the header region, the image gets cut off.  Is it possible to work around this somehow?  I was hoping to see a z-index parameter in the FloatingImage class, but nothing like that seems to exist.
Tanya
Telerik team
 answered on 25 Jul 2018
11 answers
2.1K+ views

I have two columns in the GridView. I want one column's text(including header) is on the left, the other column is on the right.

<telerik:GridViewDataColumn  Header="Content" DataMemberBinding="{Binding Content}"  TextAlignment="Left" HeaderTextAlignmemt="Left" />
    
   <telerik:GridViewDataColumn  Header="Date" DataMemberBinding="{Binding Date}"  TextAlignment="Right" HeaderTextAlignmemt="Right" />

But it is not working, two columns are always aligned to the left. Then I used Visual Tree to check the properties. For the GridViewCell.

PART_CellBorder [Border]
   Background_Over [Border]
   Background_Selected[Border] etc

The default HorizontalAlignment is Stretch. I am not sure how to set the styles for the alignment.

Thanks.

Dilyan Traykov
Telerik team
 answered on 25 Jul 2018
6 answers
353 views

I'm looking for a way of not just selecting files for upload but entire folder structures. I was hoping I could use the CreateOpenFileDialog delegate to return the RadOpenFolderDialog however this function expects a return type of Microsoft.Win32.OpenFileDialog which the Telerik controls do not inherit from.

Any suggestions?

Neil
Top achievements
Rank 1
 answered on 25 Jul 2018
6 answers
1.3K+ views

I am trying to get the GridView to work in a rather complex scenario that involves numerous dynamic columns all with their own editing and display criteria. I have come up with a solution that involves storing a metadata object on the column and then I bind to the properties on the metadata object in the Tag property.

This approach has been working fine or non-dynamic columns but I am unable to successfully determine the property to bind to in the cell template as the property name is decided at runtime, hence why I store it in the DynamicPropertyName property in the metadata.

 

I tried using a MultiValueConverter which works fine for the ConvertTo, but I am unable to provide the correct values in the ConvertBack.

This is my current cell template with the binding issue highlighted - if there is a way to also bind the Column.Tag.DynamicPropertyName property on the ParentRow. object which is a DynamicObject, then this approach would work in its current form.

 

 

 

 

Dilyan Traykov
Telerik team
 answered on 25 Jul 2018
1 answer
493 views

Hi,

In RadGridView on click "Click Here to Add New Item" is not adding new row to the RadGridView. It is designed with the property as below

<telerik:RadGridView Name="radGridSizeDetails" Grid.Row="1"
                                         ShowGroupPanel="False" AutoExpandGroups="True" ShowGroupFooters="False"
                                         ShowColumnFooters="True" CanUserSortColumns="True" ShowColumnHeaders="True"
                                         AutoGenerateColumns="False"
                                         CanUserInsertRows="True"
                                         NewRowPosition="Top"
                                         GroupRenderMode="Flat"
                                         ShowColumnSortIndexes="True"
                                         ItemsSource="{Binding SizeDetailsList}"
                                         SelectionMode="Single"
                                         RowIndicatorVisibility="Visible"
                                         VerticalAlignment="Stretch"
                                         IsReadOnly="False" AddingNewDataItem="radGridSizeDetails_AddingNewDataItem">

 

Let me know if I miss anything.

 

Thanks

Dilip

Dinko | Tech Support Engineer
Telerik team
 answered on 25 Jul 2018
2 answers
138 views

I need to get the fit of the maximum on the length of the control, either that or move the label below the line. 

For the first option, I was thinking of reducing the value,and then customizing the labeltext that shows up. Only issue is, not sure how to modify the textblock that shows that value. 

Second option, kind of related to the first one, how can I use a datatemplate to have a template where the label is below the line?

 

Please refer to image attached.

 

Thanks!

Martin Ivanov
Telerik team
 answered on 25 Jul 2018
13 answers
751 views
Hello,

I am struggling to include a  <telerik:RadLegendtag in my code. I have been using your documentation at http://www.telerik.com/help/wpf/radlegend-overview.html as a reference but always get an error message. 

I have included a reference to Telerik.Windows.Controls.dll as well as including xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" as a namespace declaration in my XAML, but whenever I try to use a <telerik:RadLegendtag I get an error stating "The type 'telerik:RadLegend' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been build."

Any help on this would be appreciated.

Andrew.




Martin Ivanov
Telerik team
 answered on 25 Jul 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
Slider
Expander
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
WebCam
CardView
DataBar
Licensing
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?