Telerik Forums
UI for WPF Forum
1 answer
221 views
Hi,

I wanted to change header of GridViewColumnGroup in runtime, the values are assigned but not reflected in UI.
How is that possible? how should i change the header of groups?
here is my current code to change it.

  grdTimeRecording.ColumnGroups[1].Header = string.Format("{0:ddd, d MMM}", _firstDate);
            grdTimeRecording.ColumnGroups[2].Header = string.Format("{0:ddd, d MMM}", _firstDate.AddDays(1));
            grdTimeRecording.ColumnGroups[3].Header = string.Format("{0:ddd, d MMM}", _firstDate.AddDays(2));
            grdTimeRecording.ColumnGroups[4].Header = string.Format("{0:ddd, d MMM}", _firstDate.AddDays(3));
            grdTimeRecording.ColumnGroups[5].Header = string.Format("{0:ddd, d MMM}", _firstDate.AddDays(4));
            grdTimeRecording.ColumnGroups[6].Header = string.Format("{0:ddd, d MMM}", _firstDate.AddDays(5));
            grdTimeRecording.ColumnGroups[7].Header = string.Format("{0:ddd, d MMM}", _firstDate.AddDays(6));
Hristo
Telerik team
 answered on 07 Feb 2014
1 answer
105 views
Hi, does anyone have any sample of that?
is it possible using RadGridView on WPF 4.5?

Thanks a lot for your help and comments,
Hristo
Telerik team
 answered on 07 Feb 2014
1 answer
92 views
Hi, I've made a modal dialog using RadWindow (W1), and had another RadWindow (W2) pop up from W1.
What I want to do is when I close W2, W1 should get notified of the closing event of W2, but currently as far as I know, this is impossible.
Please help me!
Kalin
Telerik team
 answered on 07 Feb 2014
5 answers
88 views
Hello all,

I am facing one problem, when i am sorting a data with project ID's and tried to export that data it gives inconsistent records on excel sheet.
it will fetch till page no 4 and after that it will skip the reocrds form page no 5. and next it will take records form page 6..


Code sample  


  private List<ChildDto> GetAllChildrenInGrid(RadGridView grid)
        {
                List<ChildDto> children = new List<ChildDto>();

                for (int i = 0; i < gvPagerBottom.PageCount; i++)
                {
                    gvPagerBottom.PageIndex = i;

                    foreach (var item in grid.Items) : it gives item count 0 here
                    {
                        children.Add(item as ChildDto);
                    }
                }

                return children;
        }

It will be great help if any one suggest on the same


Dimitrina
Telerik team
 answered on 07 Feb 2014
1 answer
111 views
Hi,

I'm using the Office 2013 theme and I would like to know how I can change the background color of the selected items because the constrast between the appointments and the selected appointments is not quite clear?!?

Thank's
Alain
Kalin
Telerik team
 answered on 07 Feb 2014
1 answer
107 views
Hello my question is simple, I would like to take advantage of your rich Layout computation feature to set the position of items inside a Container, is it possible?

After some attempts and a search on the web I couldn't find out. If it's not possible out of the box, is my only solution to nest a diagram inside the container ? (is it possible concretely?)

My need here is to have nested Shape nodes, with a Layout computation for each node.

Thanks
Loic
Top achievements
Rank 1
 answered on 07 Feb 2014
1 answer
308 views
Hi,

I am having trouble with the RadPaneGroup. When the panegroup is filled with panes no scroll buttons appear(see image).

I have given each pane a very long name so they fill everything, see my XAML below:
<telerik:RadDocking.DocumentHost>
    <telerik:RadSplitContainer >
        <telerik:RadPaneGroup Name="hostPaneGroup" OverflowMode="Scroll">
            <telerik:RadPane Name="instrumentsPane" Title="Settingsssssssssssssssfdddddddddddddddddddddddddddddds" telerik:RadDocking.SerializationTag="instrumentsPane" CanUserClose="False" ContextMenuTemplate="{x:Null}"/>
            <telerik:RadPane Name="calibrationPane" Title="Calibrationddddddddddddddddddddd" telerik:RadDocking.SerializationTag="calibrationPane" CanUserClose="False" ContextMenuTemplate="{x:Null}"/>
            <telerik:RadPane Name="commentsPane" Title="Commentffffffffffffffffffffffffffffffff" telerik:RadDocking.SerializationTag="commentsPane" CanUserClose="False"  ContextMenuTemplate="{x:Null}"/>
            <telerik:RadPane Name="ratesWithinPane" Title="Rates Withinffgggggggggggggggggggggggggggggg" telerik:RadDocking.SerializationTag="ratesWithinPane" CanUserClose="False" ContextMenuTemplate="{x:Null}"/>
            <telerik:RadPane Name="ratesWithinBetween" Title="Rates Betweenhhhhhhhhhhhhhhhhhhhhhhhhhhh" telerik:RadDocking.SerializationTag="ratesBetweenPane" CanUserClose="False" ContextMenuTemplate="{x:Null}"/>
            <telerik:RadPane Name="ratesVSConcentration" Title="Rates VS Concentrationjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj" telerik:RadDocking.SerializationTag="rateVSConcentrationPane" CanUserClose="False" ContextMenuTemplate="{x:Null}"/>
        </telerik:RadPaneGroup>
    </telerik:RadSplitContainer>
</telerik:RadDocking.DocumentHost>

I have set the OverflowMode="Scroll" and i have also tried different scroll modes using the property ScrollMode(Item, Pixel, ViewPort).

I dont understand why the scrolling functionality doesnt show. Have i done something wrong or am i missing something? :)

Best Regards,
Jeppe
Unisense
Top achievements
Rank 1
 answered on 07 Feb 2014
1 answer
260 views
Is there a way to parse an xls/xlsx file using Telerik.Windows.Documents.Spreadsheet in a class library without any reference to a wpf item?
I'm currently using OLEDB to convert excel to csv, but your RadSpreadsheet works better!
Petya
Telerik team
 answered on 06 Feb 2014
0 answers
96 views
Hello,
I need to D&D from GridView to TreeView (+ Treeview on itself).
Everything is OK, b​ased on the examples that are in the WPF Demo (TreeViewDragDropBehavior & GridViewDragDropBehavior).
The problem is I'm not able to reproduce the standard behavior like the one in Windows  explorer :
- If the node is not expanded, I need to expand it after a delay. I tried the DropExpandDelay, but without any success
- There's no effect to show I'm over a node ("over" effect).
Any advices will be welcome
Best regards
Xavier
Top achievements
Rank 1
 asked on 06 Feb 2014
1 answer
205 views
Hello I've a RadGridView that is placed withing a RadWindow and wrapped within an UserControl.

The RadWindow will be initialized by an ContextMenu of a parent RadGridView (selected item) please see the code snippets below.

Code from the ContextMenu to open a new RadWindow:

var tmpItem = row.Item as ItemModel;
.....
case "ViewRelatedItems":
         if ( tmpItem != null )
         {
             RadWindow radWindow = new RadWindow();
             radWindow.Width = 510;
             radWindow.Height = 350;
  
             UserControlRelatedItemsEntries ucTmp = new UserControlRelatedItemsEntries(tmpItem.ID, tmpItem.Type);
               
             radWindow.Content = ucTmp;
             radWindow.Owner = Application.Current.MainWindow;
             radWindow.WindowStartupLocation = WindowStartupLocation.CenterScreen;
             radWindow.ResizeMode = ResizeMode.NoResize;
             radWindow.Header = "Entries:"; //TODO
             radWindow.Show();
         }
         break;


XAML of the UserControl:
<UserControl x:Class="TEST..UserControlViewEntries"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:sys="clr-namespace:System;assembly=mscorlib"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             xmlns:viewModel="clr-namespace:test.ViewModels;assembly=Test.ViewModels"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="500">
    <UserControl.DataContext>
        <viewModel:MyViewModel />
    </UserControl.DataContext>
    <Grid>
         
        <telerik:RadGridView x:Name="radGridEntries" Margin="0,30,0,0"
                             ItemsSource="{Binding Entries}"
                             AutoGenerateColumns="False" DataLoadMode="Asynchronous">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding UserName}" Header="User"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Date}" Header="Date"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding XDoneAsString}" Header="XDone"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Description}" Header="Description"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Type}" Header="Type"/>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
    </Grid>
</UserControl>

Code of the ViewModel
public class MyViewModel : ObservableObjectBase
    {
        #region Properties
        public int SelectedItemID { get; set; }
        public int SelectedItemTypeID { get; set; }
 
        private ObservableCollection<XModel> _items;
 
        public ObservableCollection<XModel> Entries
        {
            get
            {
                if ( _items == null )
                {
                    _items = new ObservableCollection<XModel>();
 
                    var tmpResults = DataService.GetItems( this.SelectedItemID, this.SelectedItemTypeID);
                    tmpResults.ForEach( i => _items.Add( i ) );
                }
                return _items;
            }
        }
        #endregion
 
        #region Methods
         
        #endregion
 
        #region Constructors
        public MyViewModel ()
        { }
        #endregion
    }

I come here not further...

How can i put the two required values ​​SelectedItemID and SelectedItemTypeID to the ViewModel, so that they can be used when the DataBinding request the the Entries?

I'll hold this 2 values inside the ContextMenu "tmpItem" (e.g. tmpItem.ID and tmpItem.Type) but i've no idea how i could put that throuth the UserControl and ViewModel.

I think I am using the wrong approach... hopefully someone could give me an idea how to solve this issue. 

Any help on this would be very welcome!

Kind regards
Daniel


Dimitrina
Telerik team
 answered on 06 Feb 2014
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?