Telerik Forums
UI for WPF Forum
4 answers
379 views
Hello !

I'm using a custom hierarchy on a RadGridView as defined below :

<telerik:RadGridView x:Name="rgvAttributes" AutoGenerateColumns="False" CanUserDeleteRows="False"
                     IsReadOnlyBinding
="{Binding IsEditAttributesGrid,Mode=TwoWay}"
                    
ItemsSource="{Binding ListEntries}"
                    
SelectedItem="{Binding SelectedAttribute, Mode=TwoWay}" SelectionMode="Single">
    <i:Interaction.Behaviors>
        <helper:IsExpandableBehavior IsExpandableSourcePropertyName="IsExpandable" />
    </i:Interaction.Behaviors>
    <telerik:RadGridView.ChildTableDefinitions>
        <telerik:GridViewTableDefinition />
    </telerik:RadGridView.ChildTableDefinitions>
    <telerik:RadGridView.Columns>
        [...]
    </telerik:RadGridView.Columns>
    <telerik:RadGridView.HierarchyChildTemplate>
        <DataTemplate>
            <Control:ContentStepVisualizer />
        </DataTemplate>
    </telerik:RadGridView.HierarchyChildTemplate>
</telerik:RadGridView>

In order to hide the Expand/Collapse Hierarchy button on several rows, I'm using the following method :
  1. As the name explains, the simple behavior "IsExpandableBehavior" is used to bind the "IsExpandable" property of each GridViewRow to the corresponding object property of the ObservableCollection<Attribute> ListEntries in my ViewModel,
  2. Setting the "IsExpandable" property of one of the Attribute object to False correctly hide the Expand/Collapse Hierarchy button of the corresponding row in the RadGridView.

When calling ExpandAllHierarchyItems() on the RadGridView, every hidden Expand/Collapse Hierarchy buttons appears back and every row expands.

It seems that the ExpandAllHierarchyItems() of RadGridView methods doesn't consider the state of the "IsExpandable" property before expanding a GridViewRow.

Is this the desired behavior or I have done something wrong provoking it ?

Many thanks for your help !

TheFlo

Aaron
Top achievements
Rank 1
 answered on 17 Sep 2012
0 answers
68 views
Hi,

What's the easiest/most efficient way of showing sums (or other aggregates) in a different currency than the current culture. For example, if my current culture is fr-FR but I have a column that's in USD, how would I go about showing the values and the totals in USD?
SADHANA
Top achievements
Rank 1
 asked on 17 Sep 2012
1 answer
180 views
The RadRibbonView control appears to require a minimum height to display, leaving dead whitespace below it, the following does not display the actual ribbon bar:

<Grid x:Name="LayoutRoot">
<Grid.RowDefinitions>
<RowDefinition Height="150" />
<RowDefinition />
</Grid.RowDefinitions>
<telerik:RadRibbonView Grid.Row="0"  >
<telerik:RadRibbonTab Header="Home">
<telerik:RadRibbonGroup Header="Clipboard">
<telerik:RadRibbonSplitButton Text="Paste" 
                    telerik:ScreenTip.Title="Paste(Ctrl+V)"
                    telerik:ScreenTip.Description="Paste the contents the Clipboard.">
<telerik:RadRibbonSplitButton.DropDownContent>
<telerik:RadContextMenu BorderThickness="0">
<telerik:RadMenuItem Header="Paste" />
<telerik:RadMenuItem Header="Paste Form" />
</telerik:RadContextMenu>
</telerik:RadRibbonSplitButton.DropDownContent>
</telerik:RadRibbonSplitButton>
</telerik:RadRibbonGroup>
</telerik:RadRibbonTab>
</telerik:RadRibbonView>


<t:RadDocking Grid.Row="1" x:Name="_docking" PreviewClose="_docking_OnPreviewClose">
<t:RadDocking.DocumentHost>
<t:RadSplitContainer>
<t:RadPaneGroup x:Name="_paneGroup">
</t:RadPaneGroup>
</t:RadSplitContainer>
</t:RadDocking.DocumentHost>
</t:RadDocking>
</Grid>

but if I set the first row definition to 300 then it displays it with about 150px of dead white space below, why does the height of the control not work (incidentally specifying the RadRibbonView controls Height explicitly also does not change anything).  This is on Windows XP  Any ideas?
Tina Stancheva
Telerik team
 answered on 17 Sep 2012
1 answer
172 views
Hi,

I searched why some documents were very slow to refresh when we typed text (enough to was three to four words forward than the one that appears) and very long to load the document. Finally, the problem is when we have tables in the document. It begins to be slow with one table and more you have tables, slower is the refresh. Am I alone with this issue? My WPF RadControls version is the 2012.2.912.40.

Patrick
Petya
Telerik team
 answered on 17 Sep 2012
1 answer
126 views
Hi all,

i would design a header for floating window like that file attached.

how do i design it with WPF?
thank for any your help.
Boyan
Telerik team
 answered on 17 Sep 2012
3 answers
98 views
Hi,
I think that my TreeListView simply does not respect the AutoExpandItems=false setting. In design time, sometimes when I open the designer for the first time, indeed items are not expanded. But not always. On runtime, everything is expeded if the property bound to the ItemsSource changes.
I want all my items to be collapsed during the initial binding. Any ideas?
Dimitrina
Telerik team
 answered on 17 Sep 2012
9 answers
1.8K+ views
Hi

I have a RadGridView in this I wants to iterate on rows but I cannot get radgridview1.Rows for this which library,namespaces used.how to slove this proble.how can i achive this proble.
Rocio
Top achievements
Rank 1
 answered on 17 Sep 2012
4 answers
217 views
Hello,

I've created a sample chart in Telerik with stacked bars, and a line (TelerikChart.png). When I export to PNG with the following code:

PngBitmapEncoder testEncoder = new PngBitmapEncoder();
Telerik.Windows.Media.Imaging.ExportExtensions.ExportToImage(RadCartesianChart, "c:\\temp\\test.png", testEncoder);

The PNG is created, but it appears the line has moved from it's original values (the points have not). See ExportedChart.png.

Also, how can I get the exported PNG to contain the legend as well?
Ves
Telerik team
 answered on 17 Sep 2012
1 answer
109 views
Hello Everyone,

Whenever we double click on any appointment, it displays the Edit Appointment Dialog Box. I have requirement to stop showing this DialogBox and allows some background changes in Appointment_Editing event without using this Dialog box.  I have already tried doing e.Cancel = true, however no success. Please let me know if there is any other way around to achieve this.

private void RadScheduleView_AppointmentEditing(object sender, AppointmentEditingEventArgs e)
{
    e.Cancel = true;
    //my custom logic goes here
}

 

Regards,
Kshamesh

 


Yana
Telerik team
 answered on 17 Sep 2012
5 answers
245 views
Hello! I have a GridView in wich the EnableRowVirtualization is selected, I have read this means that the only rows generated are those that are visible. this is how I try to get the visible rows:
var rows = this.gridAlarm.ChildrenOfType<GridViewRow>();
 
            foreach (var row in rows)
            {
                if (row is GridViewNewRow)
                    continue;
 
                if (row.IsVisible)
                    logger.Debug("It's a visible row");
                var cell = row.Cells[7];
                TextBlock tx = (TextBlock)cell.Content;
                String content  = tx.Text;              
            }

My grid only has 7 rows, but it's small so at first it only shows 4 rows, but when I execute that code in "rows" I have all rows, not only the visible ones, and when I iterate thorough "rows", and row.IsVisible is allways true, for the 7 rows, no matter that only 3 rows are printed (you have to scroll down to see the others.

How can I recover only those rows that are visible actually in the grid?
Thanks a lot!
Rocio
Top achievements
Rank 1
 answered on 17 Sep 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?