Telerik Forums
UI for WPF Forum
2 answers
481 views
I have a GridView in a WPF page. I've got the "Click here to add new item" row to appear in the grid, but when I click anywhere in the row, nothing happens. I cannot get the new row to appear. I've got "ShowInsertRow" and "CanUserInsertRow" both set to True. Am I missing something? Is there something else I have to do to make the new line appear?

Here's my XAML for the control, Thanks for your help.:

<telerik:RadGridView Name="rgvParameters" Grid.Column="1" HorizontalAlignment="Left" Margin="134,476,0,0" VerticalAlignment="Top" Height="171" Width="496" ItemsSource="{Binding}" IsFilteringAllowed="False" ShowGroupPanel="False" AutoGenerateColumns="False" SelectionUnit="Cell" ShowInsertRow="True" ActionOnLostFocus="None" CanUserInsertRows="True" CanUserReorderColumns="False" CanUserSortGroups="False" CanUserDeleteRows="False" SelectionChanged="rgvParameters_SelectionChanged">
                        <telerik:RadGridView.Columns>
                            <telerik:GridViewDataColumn Name="rgcParameterID" DataMemberBinding="{Binding [ParameterID]}" Width="0" MaxWidth="0" MinWidth="0" />

                            <telerik:GridViewDataColumn Name="rgcApplicationID" DataMemberBinding="{Binding [ApplicationID]}" Width="0" MaxWidth="0" MinWidth="0" />
                            <telerik:GridViewDataColumn Name="rgcParameterName" DataMemberBinding="{Binding [ParameterName]}" 
                                Header="Key" />
                            <telerik:GridViewDataColumn Name="rgcParameterValue" DataMemberBinding="{Binding [ParameterValue]}"
                                Header="Value" />
                        </telerik:RadGridView.Columns>
                    </telerik:RadGridView>


Edit: One thing I just noticed. If I bring up the page and immediately click the new row, the new row line does appear. If I populate the grid with current data from the database with this line of code, the insert new row command no longer works:

rgvParameters.ItemsSource = businessRules.GetParameters(dsApp.Tables[0].Rows[0]["ApplicationID"].ToString()); 

Why does setting the ItemSource value invalidate the user's abiity to add a new record to the grid?
Wilfred
Top achievements
Rank 1
 answered on 12 Feb 2019
0 answers
153 views

     Hello, 

Im using RadTabControl for my project and everything is working fine with validations

Im using the same viewmodel for all tabs 

and I want to highlight the tab that has errors

Is it possible ?

 

thanks alot

moe
Top achievements
Rank 1
 asked on 12 Feb 2019
1 answer
45 views

Hi Team,

Is it possible to search fields in the RadPivotFieldList and filter the same? We have many fields that are populated in the RadPivotFieldList and it is difficult to navigate to a particular field in the list.

Regards,

Swapnil

Dinko | Tech Support Engineer
Telerik team
 answered on 12 Feb 2019
3 answers
258 views

Hello,

I can't open this pdf with PdfDocumentSource

>> https://    ufile.io/    rkqtk

Here the full error : 

System.IndexOutOfRangeException: Index was outside the bounds of the array.<br>   at Telerik.Windows.Documents.Fixed.FormatProviders.Old.Pdf.PdfReader.Parsers.PdfParser.TryReadIndirectObject(Int64 offset, Boolean isEncrypted, IndirectObjectOld& indirectObject)<br>   at Telerik.Windows.Documents.Fixed.FormatProviders.Old.Pdf.PdfReader.Parsers.PdfParser.ReadCrossReferenceStream(Int64 offset, CrossReferenceStreamOld& stream, Byte[]& data)<br>   at Telerik.Windows.Documents.Fixed.FormatProviders.Old.Pdf.PdfReader.Parsers.PdfParser.InitTrailerAndCrossReferenceStream(Int64 offset)<br>   at Telerik.Windows.Documents.Fixed.FormatProviders.Old.Pdf.PdfReader.Parsers.PdfParser.ReadCrossReferenceCollection(Int64 offset)<br>   at Telerik.Windows.Documents.Fixed.FormatProviders.Old.Pdf.PdfReader.Parsers.PdfParser.InitializeCrossReferences()<br>   at Telerik.Windows.Documents.Fixed.FormatProviders.Old.Pdf.PdfReader.PdfContentManager..ctor(PdfFormatProvider provider, Stream stream)<br>   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.PdfFormatProvider.Import()<br>   at Telerik.Windows.Documents.Fixed.PdfDocumentSource.CreateDocumentFromStreamOverride(Stream stream, FormatProviderSettings settings)<br>   at Telerik.Windows.Documents.Fixed.FixedDocumentStreamSource.CreateDocumentFromStream(Stream stream, FormatProviderSettings settings)

 

Thanks for your help :)

JC
Top achievements
Rank 1
 answered on 11 Feb 2019
1 answer
223 views
I was wondering if I would be able to use the spreadsheet to satisfy the following requirements:
1. Data should be shown to the user in a 2D control, with a finite amount of columns and rows
2. The user should be able to add columns or rows to the control to the beginning, middle of the sheet
3. The user should be able to copy data from the control to excel
4. The user should be able to copy data from excel to the control.
5. The user should be able to mark any row or column as a "header" (Just allows for different formatting and input)
6. The user should be able to save this data from the control to a database and retrieve it at a later date, where each cell will be given a unique id.
7. The user should be able to apply steps 1-6 without overwriting the cell id for any existing cell.

From what I've seen the RadSpreadsheet does everything perfectly other than keeping track of properties on the cell, such as a unique id. I see that I can programmatically set the data with a class that implements ICellValue, but as soon as the user starts typing in the cell that data is overridden to become another type of CellValue, such as TextCellValue or NumericCellValue. Is there a way to force each cell to map to a custom ICellValue?

I see there are events for the WorkbookChanging, WorkbookChanged, and CommandExecuting but they don't really tell you what is changing to override the action. Perhaps using the history to keep track of what data was mutated can help to go back and set Id's on the cells which need an Id. 

The reason why the Id is so important is because, for good or bad, once persisted other tables can reference that cell ID and make calculations based off the value of the cell. So if I modify the table to add new rows or columns to the table, or modify the contents of the cell, the ids need to be tracked.
Boby
Telerik team
 answered on 11 Feb 2019
5 answers
907 views
I have problem with RadGridView and grid splitter. it happens when the columns are more than the visible part of RadGridView and you try to move grid splitter doesn't move here is example code:   StyleManager.ApplicationTheme = new FluentTheme();
<telerik:RadRibbonWindow x:Class="TelerikWpfApp1.MainWindow"
                         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                         xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                         xmlns:prism="http://prismlibrary.com/"
                         Title="MainWindow" Height="350" Width="525" WindowState="Maximized"
                         prism:ViewModelLocator.AutoWireViewModel="True">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <telerik:RadGridView ItemsSource="{Binding Models}" AlternationCount="2"
                             AutoGenerateColumns="False"
                             IsReadOnly="True"
                             Grid.Column="0"
                             IsFilteringAllowed="True"
                             FilteringMode="Popup"
                             BorderThickness="1">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Test1}" Header="Test 1" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Test2}" Header="Test 2" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Test2}" Header="Test 3" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Test4}" Header="Test 4" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Test5}" Header="Test 5" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Test6}" Header="Test 6" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Test7}" Header="Test 7" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Test8}" Header="Test 8" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Test9}" Header="Test 9" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Test10}" Header="Test 10" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Test11}" Header="Test 11" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Test12}" Header="Test 12" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Test13}" Header="Test 13" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Test14}" Header="Test 14" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Test15}" Header="Test 15" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Test16}" Header="Test 16" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Test17}" Header="Test 17" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Test18}" Header="Test 18" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Test19}" Header="Test 19" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Test20}" Header="Test 20" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Test21}" Header="Test 21" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Test22}" Header="Test 22" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Test23}" Header="Test 23" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Test24}" Header="Test 24" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Test25}" Header="Test 25" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Test26}" Header="Test 26" />
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
        <GridSplitter Grid.Column="1" Width="10" ResizeBehavior="PreviousAndNext" ResizeDirection="Columns"/>
        <WebBrowser Grid.Column="2"/>
    </Grid>
</telerik:RadRibbonWindow>
Dinko | Tech Support Engineer
Telerik team
 answered on 11 Feb 2019
5 answers
274 views
When I AutoFit() my diagram, I want all nodes to be visible on screen. However, this is impossible when the diagram is too large. The zooming restriction gets in the way.

I want to be able to zoom out until all nodes are visible on screen, no matter the size of the diagram! It doesn't matter if the rendering of the nodes suffers. In a complex diagram, I must be able to see all nodes to get an overview of its structure. This is absolutely crucial for our application so please provide us with a patch/workaround! Thanks.

I really don't understand why the zooming works this way. I get the same result if I set the Zoom to 0.1 or 0.05...
Vladimir Stoyanov
Telerik team
 answered on 11 Feb 2019
13 answers
2.8K+ views
Hello,

I'm trying to implement a "find" feature where the user can enter a value in a textbox (outside of the grid) then click a button to find the row that matches the search criteria.  I'm able to programmatically set the selectitem on the grid successfully, but if the item is not in the current scroll region the user has to scroll down to to the item.  Is there a way to ensure that the selected item is always in view?  Also, I should mention that we are using MVVM, so there is no code behind.

Thanks.
Vladimir Stoyanov
Telerik team
 answered on 11 Feb 2019
3 answers
181 views

Hello,

I like to have the width of the WeekView always equal to the width of the current parrent. But as soon as I have more Appointments ScheduleView is displaying a horizontal scrollbar and I have to scroll horizontally to see the last days of the week. (See attached Screens)

Is there an option to shrink the Appointments in width so I see always the complete week without scrolling horizontally?

Kind regards,

Markus

Dinko | Tech Support Engineer
Telerik team
 answered on 11 Feb 2019
3 answers
539 views

Hello. I use a DataTemplate for labels in BarSeries. Please see XAML below:

<telerik:RadCartesianChart Grid.Row="0" Grid.Column="0" Visibility="{Binding IsAbsoluteBarChartVisible}">
    <!--Annotation line-->
    <telerik:RadCartesianChart.Annotations>
        <telerik:CartesianGridLineAnnotation Axis="{Binding ElementName=verticalAxis}" Value="{Binding AnnotationValue}" Label="{Binding AnnotationLabel}" Stroke="Red"
                                         StrokeThickness="2" DashArray="8 2" Visibility="{Binding IsAnnotationVisible}">
            <telerik:CartesianGridLineAnnotation.LabelDefinition>
                <telerik:ChartAnnotationLabelDefinition Location="Inside"  VerticalAlignment="Bottom"  HorizontalAlignment="Center">
                    <telerik:ChartAnnotationLabelDefinition.DefaultVisualStyle>
                        <Style TargetType="TextBlock">
                            <Setter Property="FontSize" Value="14"/>
                            <Setter Property="FontWeight" Value="DemiBold"/>
                            <Setter Property="Foreground" Value="Red" />
                        </Style>
                    </telerik:ChartAnnotationLabelDefinition.DefaultVisualStyle>
                </telerik:ChartAnnotationLabelDefinition>
            </telerik:CartesianGridLineAnnotation.LabelDefinition>
        </telerik:CartesianGridLineAnnotation>
    </telerik:RadCartesianChart.Annotations>
    <!--X - axis-->
    <telerik:RadCartesianChart.HorizontalAxis>
        <telerik:CategoricalAxis/>
    </telerik:RadCartesianChart.HorizontalAxis>
    <!--Y - axis-->
    <telerik:RadCartesianChart.VerticalAxis>
        <telerik:LinearAxis x:Name="verticalAxis" Title="{Binding Title_Y}"  Minimum="{Binding AbsoluteMinimum_Y}" Maximum="{Binding AbsoluteMaximum_Y}" MajorStep="{Binding AbsoluteStep_Y}"/>
    </telerik:RadCartesianChart.VerticalAxis>
    <!--Here is bar chart itself-->
    <telerik:RadCartesianChart.Series>
        <telerik:BarSeries ShowLabels="True" CategoryBinding="Category" ValueBinding="Value" ItemsSource="{Binding Data}">
            <telerik:BarSeries.LabelDefinitions>
                <telerik:ChartSeriesLabelDefinition Margin="0 20 0 0">
                    <telerik:ChartSeriesLabelDefinition.Template>
                        <!-- !!! HERE IS PROBLEMATIC TEMPLATE !!! -->
                        <DataTemplate>
                            <TextBlock Foreground="White"/>
                        </DataTemplate>
                    </telerik:ChartSeriesLabelDefinition.Template>
                </telerik:ChartSeriesLabelDefinition>
            </telerik:BarSeries.LabelDefinitions>
        </telerik:BarSeries>
    </telerik:RadCartesianChart.Series>
</telerik:RadCartesianChart>

But the labels are not visible in Bars in the chart in this case!

But when I comment the following code:

<!--telerik:ChartSeriesLabelDefinition.Template>
       <DataTemplate>
             <TextBlock Foreground="White"/>
       </DataTemplate>
</telerik:ChartSeriesLabelDefinition.Template-->

Then the labels are visible nice. Why this has plase. Please help.

Dinko | Tech Support Engineer
Telerik team
 answered on 11 Feb 2019
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?