Telerik Forums
UI for Silverlight Forum
4 answers
329 views
Hi,

Can you show me how to execute the the following xaml or equivalent in code.  I need to execute this in the

RadGridView_DataLoading event.

Thanks
Rich



<telerik:GridViewColumn Header="">
                <telerik:GridViewColumn.CellTemplate>
                    <DataTemplate>
                        <telerik:RadButton Click="Button_Click"
                                           Name="Expression"
                                           IsBackgroundVisible="False"
                                           ToolTipService.ToolTip="Add column"
                                           Margin="0">
                            <Image Source="Images/Expression_16.png"
                                   Height="16"
                                   Width="16"></Image>
                        </telerik:RadButton>
                    </DataTemplate>
                </telerik:GridViewColumn.CellTemplate>
            </telerik:GridViewColumn>
Martin Ivanov
Telerik team
 answered on 31 Jul 2019
7 answers
367 views
I have a RadGridView that is not using groups or heirarchies. It just contains items and has a RowDetailsTemplate defined with a ToggleRowDetailsColumn as well.

I am trying to add a button outside of the RadGridView that espands and collapses all the rowdetails in the grid when clicked.

I can get the rows to expand by setting the following:

myGrid.RowDetailsVisibilityMode = Telerik.Windows.Controls.GridView.GridViewRowDetailsVisibilityMode.Visible;

However setting the above property to Collapsed doesn't seem to collapse the details views again.

Is there something I'm missing to be able to collapse the RadGridView's RowDetails?
Dilyan Traykov
Telerik team
 answered on 23 Jul 2019
10 answers
391 views
Hi there,

Only one column in my gridview allows user input. I use a template selector to decide whether the input will be via a textbox or combobox. I need to be able to navigate through the input column, choosing values, and continuing to navigate with just the keyboard. From another thread on here, i found that to navigate with the keyboard arrows, i can use this:

in xaml:
<telerikG:RadGridView  CurrentCellChanged="RadGridView_CurrentCellChanged">

in xaml.cs:

 private void RadGridView_CurrentCellChanged(object sender, GridViewCurrentCellChangedEventArgs e)
        {
            var txtbox = e.NewCell.ChildrenOfType<TextBox>().FirstOrDefault();
            if (txtbox != null)
            {
                Dispatcher.BeginInvoke(() => txtbox.Focus());
            }
           
            var combobox = e.NewCell.ChildrenOfType<ComboBox>().FirstOrDefault();
            if (combobox != null)
            {
                Dispatcher.BeginInvoke(() => combobox.Focus());
            }
        }

However, i find that while it works for textboxes, when it gets to a combobox, pressing the down arrow switches between the combobox options, pressing spacebar opens up the combobox's list, but i cant choose one of the options. Either way, it just gets stuck on the combobox, and there is no way to move to the next row in the grid's input column. Could you help me get keyboard navigation working for this case?

Thanks,
Stephen


Ras Ran
Top achievements
Rank 2
Iron
Veteran
Iron
 answered on 17 Jul 2019
6 answers
183 views


With the settings below, it always seems to auto complete for me.  Say I have a value of 20 (list of strings) in my combo box.  If I type '2'  a zero is always put after no matter what I set the CanAutocompleteSelectItems to .  It's also seems to work very differently on different computers sometimes showing the rest of the item selected, and sometimes not.  I'm working on reproducing more issues.  In one case some valid values are '1', '18' and if I type in a '1' and tab out it would give me 18 instead of 1.  I haven't been able to reproduce this on my machine yet.  It would also be nice if you just had an autocomplete box instead of having to guess on all the settings that change throughout different versions.

UPDATE: about '1', '18, if I change the order and but 18 before 1, that's when I get that error. Is there a way to do it without the order being like that?
    <telerik:RadComboBox x:Name="rc1" OpenDropDownOnFocus="False" Margin="5 0 0 0" IsReadOnly="False"
            LostFocus="rc1_LostFocus" SelectionChanged="rc1_SelectionChanged"
            CanAutocompleteSelectItems="False" ClearSelectionButtonVisibility="Visible"
            ClearSelectionButtonContent="Clear" Width="80" IsEditable="True">
 
</telerik:RadComboBox>

Dimitar Dinev
Telerik team
 answered on 16 Jul 2019
3 answers
95 views
Hello,

I have a gridview.
In one of its columns I have a template with a collection.

When trying to export it to excel this column export only "(Collection)".

How can I export it?

Thank you.

 

<telerik:GridViewDataColumn Header="Nº Casilla" DataMemberBinding="{Binding Casilla}" IsReadOnly="True" /><telerik:GridViewDataColumn Header="Casilla" DataMemberBinding="{Binding Converter={StaticResource EstructurasConverter}, ConverterParameter=ValoresCasillas }" IsReadOnly="True" Width="auto">
                        <telerik:GridViewDataColumn.CellTemplate>
                            <DataTemplate>
                                    <ListView Background="Transparent" BorderBrush="Transparent" BorderThickness="0"  ItemsSource="{Binding Converter={StaticResource EstructurasConverter}, ConverterParameter=ValoresCasillas }">
                                    <ListView.ItemTemplate>
                                        <DataTemplate>
                                            <Border  BorderThickness="0,0,0,1" Padding="0,0,0,8" AutomationProperties.IsRowHeader="True" BorderBrush="#D0D0D0">
                                                <StackPanel Background="Transparent"   Orientation="Horizontal">
                                                    <StackPanel Orientation="Vertical" Width="265" Background="Transparent" >
                                                        <TextBox BorderThickness="0"  BorderBrush="Transparent" Background="Transparent"  IsReadOnly="True"  Text="{Binding TextoFila, Converter={StaticResource MaxCharactersEpigrafeConverter}}"   Width="auto" />
                                                        <TextBox BorderThickness="0"  BorderBrush="Transparent" Background="Transparent" IsReadOnly="True"  Text="{Binding TextoColumna, Converter={StaticResource MaxCharactersEpigrafeConverter}}"    Width="auto" />
                                                    </StackPanel>
                                                    <TextBox BorderThickness="0" BorderBrush="Transparent" Background="Transparent" IsReadOnly="True"  Text="{Binding FAlta, Converter={StaticResource CofeToNormalConverter}}"  Width="auto" />
                                                    <TextBox BorderThickness="0"  TextWrapping="Wrap"  BorderBrush="Transparent" Background="Transparent" IsReadOnly="True"   Text="-"  Width="auto" />
                                                    <TextBox BorderThickness="0" BorderBrush="Transparent" Background="Transparent" IsReadOnly="True"   Text="{Binding FBaja,Converter={StaticResource CofeToNormalConverter}}"  Width="auto" />
                                                </StackPanel>
                                            </Border>
                                        </DataTemplate>
                                    </ListView.ItemTemplate>
                                </ListView>
                            </DataTemplate>
                        </telerik:GridViewDataColumn.CellTemplate>

 

 

 

 

 

Vladimir Stoyanov
Telerik team
 answered on 18 Jun 2019
5 answers
197 views
When I only have 1 row under certain conditions, I want to expand the row and show second level load on demand items (not 3rd or deeper).

I have populated my child collection in the ViewModel and have TwoWay binding set, but there must be another trick to getting the TreeListView to expand the row.

Any suggestions are appreciated.

-Rob
Martin Ivanov
Telerik team
 answered on 18 Jun 2019
4 answers
215 views
Hi

I'm using RadDiagram (Telerik 2012 Q2), I want to detect my selected shape in a rad diagram. There is an event named ShapeClicked in RadDiagram object, but its sender parameter is a raddiagram (I think it should be a rad shape, i.e. the shape which has been clicked), how can I get the clicked/selected shape? Also shape object has a mouseleftbutton down event which can help me do my work, but it seems that this event is raised only for the first shape object created on the diagram

I've inserted a rad color picker in my project that is used to set/change rad diagram shape colors (it works fine) but I want to enable color detection of my SELECTED shape, so that when user selects a shape, the color picker gets its color, what should I do? I'm dynamically adding shapes to my diagram (diagram.items.add)

thanks
Petar Mladenov
Telerik team
 answered on 12 Jun 2019
3 answers
67 views

Hi,

 

I am using RadListBox for one of my project and are binding the data into the box using Observable collections but its take a long time to render the UI for around 500 items onto the UI.

Vladimir Stoyanov
Telerik team
 answered on 22 May 2019
15 answers
738 views
Hi,

I'm trying to export a huge grid (20/25 columns more or less) to pdf, too large to fit within page width, so i was wondering if maybe i could split grid columns over two or more pages as needed. Up to now I have been using rad document and table object to accomplish the task, and then format provider class to export to pdf. I thought it would have been the best option and maybe it is in normal cases when the grid doesn't have too many columns. Unfortunately this approach doesn't work out when a great number of columns need to be exported to A4 paper. So my idea was to split columns over more then one page, but i could not find any way to do so.
Any suggestions? is it also possible to render pdf over more then one page horizontally, always by using table class and RadDocument?
if not, which other options are available?

Thanks

Luca 
Khiem
Top achievements
Rank 1
 answered on 21 May 2019
1 answer
49 views

Hi!

If i remove some property definition at runtime on code behind, then all other definition is only readonly on UI. I debugging the property definition list, but show is readonly = false after remove items, however UI is disabled.

The removed item is properly removed from UI.
What the problem?

This code using to remove:
EditProperty.PropertyDefinitions.RemoveRange(EditProperty.PropertyDefinitions.Where(x => x.OrderIndex == 500).ToList());

Vladimir Stoyanov
Telerik team
 answered on 16 May 2019
Top users last month
Michael
Top achievements
Rank 2
Iron
Wilfred
Top achievements
Rank 1
Alexander
Top achievements
Rank 2
Iron
Iron
Matthew
Top achievements
Rank 1
Iron
ibra
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?