Telerik Forums
UI for WPF Forum
8 answers
468 views
Hi There,

I have a problem with RadPanes isHidden property, i want to set IsHidden by using a binding, but when i do this it is not working, but if i set the IsHidden="True" at XAML then its working properly, can you please guide me in this case ?

Thanks in advance,
Srinivas.
AEDT developer
Top achievements
Rank 1
 answered on 21 Apr 2017
2 answers
638 views

Hi Team,

I have used the RadSplitButton to show the drop down along with button. But the drop down popup is opened outside window, please share any idea to load the popup only within window. Please refer the below code 

 

<telerik:RadSplitButton Margin="20,152,0,0"
                        Foreground="#8F8F8F"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                                Content="DROP DOWN">
    <telerik:RadSplitButton.DropDownContent>
        <StackPanel Orientation="Vertical">
            <telerik:RadListBox ItemsSource="{Binding AddressBooks}"
                                        BorderThickness="0">
                <telerik:RadListBoxItem>AAA AAA AAA AAA</telerik:RadListBoxItem>
                <telerik:RadListBoxItem>BBB BBB BBB BBB</telerik:RadListBoxItem>
                <telerik:RadListBoxItem>CCC CCC CCC CCCC CCC</telerik:RadListBoxItem>
            </telerik:RadListBox>
            <Button Content="ADD NEW"
                            BorderThickness="0,1,0,0"/>
        </StackPanel>
    </telerik:RadSplitButton.DropDownContent>
</telerik:RadSplitButton>

 

Please refer the attached image to know more about the issue. And I am using Windows 8.1 OS.

 

Regards,

Antony Raj

 

Antony
Top achievements
Rank 1
 answered on 21 Apr 2017
2 answers
255 views

Hi. Im trying to create a DataFormDataField for comments. The requirements are that the textbox needs to accept return, wrap and always show 3 lines no matter the ammount of text.

 

my first attempt i came up with the following

 

                                <telerik:DataFormDataField x:Name="Comm"
                                                           Label="Comments"
                                                           LabelPosition="Above"
                                                           Width="355"
                                                           Canvas.Left="10"
                                                           Canvas.Top="61">
                                    <TextBox Height="50"
                                             AcceptsReturn="True"
                                             TextWrapping="Wrap"
                                             Text="{Binding BIGCOMMENTS, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                             IsReadOnly="{Binding IsReadOnly, ElementName=Comm, Mode=OneWay}"
                                             VerticalContentAlignment="Top"
                                             TabIndex="18" />
                                </telerik:DataFormDataField>

 

works nice until you need to resize, it gets a bit wonky. second attempt was to modify the template in blend.

 

  <ControlTemplate x:Key="WBDataFormMultiLineDataField"
                     TargetType="{x:Type telerik:DataFormDataField}">
        <Border x:Name="PART_RootElement"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                Background="{TemplateBinding Background}"
                CornerRadius="{DynamicResource {x:Static telerik:Office2016ResourceKey.CornerRadius}}"
                UseLayoutRounding="True">
            <Grid x:Name="PART_DataFormDataFieldGrid"
                  Margin="{TemplateBinding Padding}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="2*" />
                    <ColumnDefinition Width="24" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>
                <ContentControl x:Name="PART_Label"
                                ContentTemplate="{TemplateBinding LabelTemplate}"
                                Content="{TemplateBinding Label}"
                                Foreground="{TemplateBinding Foreground}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                IsTabStop="False"
                                Margin="4,0"
                                VerticalAlignment="Center"
                                VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" />
                <TextBox x:Name="PART_ContentPresenter"
                         Grid.Column="1"
                         HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                         Grid.Row="1"
                         Text="{Binding DataMemberBinding, RelativeSource={RelativeSource TemplatedParent}}"
                         VerticalAlignment="Stretch"
                         AcceptsReturn="True"
                         TextWrapping="Wrap"
                         VerticalContentAlignment="Top"
                         TabIndex="18" />

                <Grid x:Name="DescriptionIcon"
                      Background="Transparent"
                      Grid.Column="2"
                      HorizontalAlignment="Center"
                      Margin="4,0,0,0"
                      Grid.Row="1"
                      VerticalAlignment="Center">
                    <Grid.ToolTip>
                        <ToolTip Content="{TemplateBinding Description}" />
                    </Grid.ToolTip>
                    <Grid.Visibility>
                        <Binding Path="Description"
                                 RelativeSource="{RelativeSource TemplatedParent}">
                            <Binding.Converter>
                                <dataForm:DescriptionVisibilityConverter />
                            </Binding.Converter>
                        </Binding>
                    </Grid.Visibility>
                    <TextBlock Foreground="{DynamicResource {x:Static telerik:Office2016ResourceKey.IconBrush}}"
                               FontWeight="Normal"
                               FontStyle="Normal"
                               FontSize="16"
                               FontFamily="/Telerik.Windows.Controls;component/Themes/Fonts/TelerikWebUI.ttf#TelerikWebUI"
                               HorizontalAlignment="Center"
                               Margin="1,0,0,0"
                               Text="&#xE402;"
                               VerticalAlignment="Center"><Run Text="&#xE402;" /></TextBlock>
                </Grid>
            </Grid>
        </Border>
    </ControlTemplate>

 

I basically replaced the content presenter (which was showing a text box) with an acutal textbox. this works much better in terms of resizing, however i lose functionality for 'DataMemberBinding', which i need.

 

Any ideas to an ideal solution?

Mike
Top achievements
Rank 1
 answered on 20 Apr 2017
1 answer
181 views
Hi,
I add a column to my grid dynamically:

FrameworkElementFactory fef = null;
var template = new DataTemplate();
fef = new FrameworkElementFactory(typeof(Button));
fef.AddHandler(Button.PreviewMouseLeftButtonUpEvent, new MouseButtonEventHandler(MainWindow_MouseLeftButtonUp), true);
template.VisualTree = fef;
var column = new GridViewDataColumn();
column.CellTemplate = template;
column.CellTemplate.Seal();
grid.Columns.Add(column);


private void MainWindow_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{
 //...
}

but when I clicked the Button, no event raised.
how can I handle the Event?
Stefan Nenchev
Telerik team
 answered on 20 Apr 2017
2 answers
395 views

Hi,

I have a problem regarding to Gridview update. I am using ObservableCollection to bind the data and whenever ObservableCollection is updated the grid is updated as well. However the scrollbar goes to the top at each update. For example, I am dealing (reading the details about a selected row, updating the row, etc..) with a row and at the same time more data is added to Grid continuously. However, at each update UI is also updated and scrollbar goes to the top. This interrupts my work with the selected row. 

I also don't want to save the current row and focus UI to this row again after each update because that also interrupts my process with the selected row and freezes it. I basically do not want an update on the current rows of my Grid. When new data comes, it should be added to the end of my grid and this process should not interrupt my work with the previous rows. Thanks for any kind of help.

 

Kind Regards,

Baris Cakar

Baris
Top achievements
Rank 1
 answered on 20 Apr 2017
6 answers
389 views

Hi!

When clicking the filter button on a column the time before the filter list appears gets longer and longer. The more records the table on which the grid is based has, the longer it takes until the list is shown.

First, I use a QueryableCollectionView as the ItemsSource of the grid. All filtering and sorting is done on this qcv first, then on the UI of the grid itself. So the base query of the qcv means: load all records of table x.
I use my own logic for "DistinctValuesLoading" since I use some enums as filter but mainly I call "GetDistinctValues(e.Column, true, null)" which normally worked fine. I found the place where the delay happens but have no idea how to fix it.
When calling "GetDistinctValues" on the grid, the QueryableSourceCollection is passed to a number of functions and finally a function in "/Core/Data/Collections/EnumerableExtensions.cs" is called which is named "Any(...)". This function finally does a "foreach (...)" on the QueryableSourceCollection which means that ALL data is loaded - this is how the QueryableSourceCollection is working, I presume. Which in the end means the more records I have, the longer this function takes to finish.

I know this sounds complicated, but it is a real showstopper at the moment since my customer is waiting more than 10 seconds before the filter list comes up. Any idea how to fix it?

Regards
Heiko

Heiko
Top achievements
Rank 1
Iron
Veteran
 answered on 20 Apr 2017
2 answers
64 views
I'm trying to use a GridViewSelectColumn in a paged grid, but if i select some rows in the 1st page and change pages and go back to the 1st, i seem to lose the original selection and the 1st row of the page gets automatically selected. Is there a way to persist selection of rows across pages and avoid this automatic selection of the 1st row when i change pages?
Paulo
Top achievements
Rank 1
 answered on 19 Apr 2017
1 answer
247 views

I don't know why I am having trouble with this, I have read all the documentation available and every post I can find, but can someone please post a VB code snippet for collapsing the Row Indicator in a dataviewgrid using WPF (2016 Q3)

Assuming my dvg is named "RadGridView1", what do I do to hide the row indicator?

Thanks in advance.

 

Dilyan Traykov
Telerik team
 answered on 19 Apr 2017
3 answers
296 views

Hi Guys,

I am using the 2016 UI for WPF. I am using the DragDropManager.AllowDrag, DragDropManager.AllowCapturedDrag properties. They are bound to one of my attached property.

Checkbox.IsChecked <=> two way binding to my attachd property IsAvailable 

DragDropManager.AllowDrag & AllowCapturedDrag => bound to IsAvailable.

On doing the following steps, the bug is reproduced.

1. Click on check box to "Check" the checkbox

{EXPECTED} IsAvailable = true, AllowDrop = true, AllowCapturedDrop = true

{ACTUAL} IsAvailable = true, AllowDrop = true (value source = local) , AllowCapturedDrop = true (value source = Parent Template)

2. Click on check box to "Uncheck" the checkbox. 

{EXPECTED} IsAvailable = false, AllowDrop = false, AllowCapturedDrop = false

{ACTUAL}  IsAvailable = false, AllowDrop = ***true*** , AllowCapturedDrop =false

Note that I have looked in my code to make sure that none of my code is setting the AllowDrag directly or indirectly.

However, when I use the now obsolete RadDragDropManager.AllowDrag instead of the DragDropManager.AllowDrag/AllowCapturedDrag, everything works as expected.

I would like to know if you know of this bug and have fixed it. It is replicating with latest version which I have downloaded as a trial.

Thanks

Nasko
Telerik team
 answered on 19 Apr 2017
1 answer
78 views
we are currently using the following to initialize grouping:
 
<tk:GridViewColumn.AggregateFunctions>
    <tk:CountFunction ResultFormatString="{}{0} Items" />
</tk:GridViewColumn.AggregateFunctions>

 

Several items that we group by just return numbers, it does not make a lot of since as to what exactly is being grouped we get headers like 234 236 Items

 

We would like to be able to do something like this: 

<tk:GridViewColumn.AggregateFunctions>
    <tk:CountFunction ResultFormatString="{}{1}:{2} - {0} Items" />
</tk:GridViewColumn.AggregateFunctions>

Where we get something like this  Product Code: 234 - 236 Items

1 ==  Header == Product Code
2 ==  Value    == 234
3==   Count   ==236

Is this possible?

Anthony
Top achievements
Rank 1
 answered on 18 Apr 2017
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
HighlightTextBlock
Security
TouchManager
StepProgressBar
VirtualKeyboard
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?