Telerik Forums
UI for WPF Forum
4 answers
167 views
Dear Telerik,

When i am exporting to excel its creating a folder with the same excel file name and it contains (filelist.xml, sheet001.htm, stylesheet.css, tabstrip.htm) if i want to give this file to anyone i have to send this folder along with excel file and the other issue is when i try to open excel file it says "The file you are trying to open 'StockLedger.xls', is in a different format than specified by the file extension.
Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?" 

 I am using MS Office 2010 and I am using Build WPF 2012.2.0703.

Thanks in advance...

Regards,
Mohammed
Manjula
Top achievements
Rank 1
 answered on 10 Sep 2012
1 answer
112 views
Hi everyone,

I'm trying to make a spline chart with thousands of values with the Y-Axis being an integer value and the X-Axis being a datetime value and I don't know how to fill both the integer and the datetime values. I was trying to set the itemsource of the chart as an array, but I couldn't get it, I couldn't show the datetime values. The charge of the information is made in a dynamic way. Any help would be appreciated.

Thanks!!
Petar Marchev
Telerik team
 answered on 10 Sep 2012
1 answer
131 views
Hi all. I have several problems with rotated gridview. So, when grid rotated to 270 degrees and Horizontal Alignment set to Left it's makes as square and don't grow up when populating data take more space than he had. It's look like alignment applied to both vertical and horizontal sides.
Second issue with... it's hard to describe. I have two grid's. First does not rotated, second rotated to 270 degrees. When i set IsFilteringAllowed to false for rotated grid it's start jump... or have a long love with not rotated grid. I think it's some problems with window size and scrolling of gridview... You can see this at video: https://skydrive.live.com/redir?resid=8921E2784A54CF76!137&authkey=!AKe9e5QHUKdJtEw
Alex
Top achievements
Rank 1
 answered on 10 Sep 2012
0 answers
141 views
Hello!, I have a RadGridView, that it's itemsSource is an Observable Collection, and when an item of the collection changes, it also changes in the RadGridView, the problem is that the changed element moves to the last row, and I don't want it to move, or to move to the first row, but not the last, anybody knows how to change it? or how I can get the RadGridView ordered when it happens?
Thanks!
Rocio
Top achievements
Rank 1
 asked on 10 Sep 2012
1 answer
177 views
My group header has a custom background, some text that need to align to the left, and some to the right. But now they are all crammed to the left of the header row. How can I make it stretch?

My header template:

<DataTemplate x:Key="alarmGridGroupTemplate">
    <Grid Background="{Binding Group.Key, Converter={StaticResource priorityToBrushConverter}}" Height="26" VerticalAlignment="Center">
        <Grid.Resources>
            <Style TargetType="{x:Type TextBlock}">
                <Setter Property="FontSize" Value="14" />
                <Setter Property="Foreground" Value="White" />
                <Setter Property="VerticalAlignment" Value="Center" />
            </Style>
        </Grid.Resources>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="Auto" />
        </Grid.ColumnDefinitions>
 
        <TextBlock Text="{Binding Path=Group.Key, Converter={StaticResource priorityToDescriptionConverter}}" Margin="3.5,0" />
        <TextBlock Grid.Column="1" Text="Count:" />
        <TextBlock Grid.Column="2" Text="{Binding Group.ItemCount}" TextAlignment="Right" Margin="5,0,11,0" />
    </Grid>
</DataTemplate>
Maya
Telerik team
 answered on 10 Sep 2012
1 answer
341 views
Hi

I have the following simple Objects (Tablist):

class tabObject
  
{
       public string Header { set; get; }
   }

class
tabsObjects
   {
       public string Header { set; get; }
       private List<tabObject> _tabs = new List<tabObject>();
       public tabsObjects()
       {
           _tabs.Add(new tabObject { Header = "Tab1" });
           _tabs.Add(new tabObject { Header = "Tab2" });
           _tabs.Add(new tabObject { Header = "Tab3" });
       }
       public List<tabObject> Tabs
       {
           get { return _tabs; }
           set { _tabs = value; }
       }
   }

my xaml:

<Window x:Class="RibbonTest.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:code="clr-namespace:RibbonTest"
                Title="MainWindow" Height="350" Width="525">
    <Window.DataContext>
        <code:tabsObjects/>
    </Window.DataContext>
    <Window.Resources>
        <DataTemplate DataType="{x:Type code:tabObject}">
            <telerik:RadRibbonTab Header="{Binding Path=Header}">
                <telerik:RadRibbonGroup Header="Group1">
                </telerik:RadRibbonGroup>
                <telerik:RadRibbonGroup Header="Group2">
                </telerik:RadRibbonGroup>
                <telerik:RadRibbonGroup Header="Group3">
                </telerik:RadRibbonGroup>
            </telerik:RadRibbonTab>
        </DataTemplate>
    </Window.Resources>
    <Grid>
        <telerik:RadRibbonView VerticalAlignment="Top" ItemsSource="{Binding Tabs}">
        </telerik:RadRibbonView>
    </Grid>
</Window>

the result is attached, as you see the 3 Tabs were generated as expected, but the RibbonGroups are missing.

In the DesignView i get an Exception if i click in the line <telerik:RadRibbonTab Header="{Binding Path=Header}"> or </telerik:RadRibbonTab> the Designer crashes with this Exception: ArgumentException: Property Items not found in the property collection

has anyone an idea whats missing or wrong?

Thanks in advance

unfortunately attaching the project is not allowed
jed
Top achievements
Rank 1
 answered on 09 Sep 2012
0 answers
117 views

Hi,

I have a gridview with 3 
GridViewComboBoxColumn's first comboboxcolumn holds different states, based on the selection the second and third comboboxes are populated. the second comboboxcolumn holds different Id's and the third comboboxcolumn holds descriptions. Each row has its own set of states, id's  and descriptions. each Id can have one or more descriptions and the user can select either the Id first or description first, so both this comboboxes are populated with same data with different properties. till now everything works fine. but we have a requirement that whenever the selected Id has only one description associated, we should default the description selection to that on the other hand it there are more than one description associated with the id we should sort the descriptions to have selected Id's descriptions to the top. After this change for some reason the getter for description comboboxcolumn itemsourcebinding property is called continuously and the entire application hangs. Below is the code snippet of the view and viewmodel. Please let me know if you need addtional information and what am I doing wrong?


View:  

 

<telerik:GridViewComboBoxColumn Header="State" IsComboBoxEditable="TrueDisplayMemberPath="StateAbbr" SelectedValueMemberPath="StateAbbr" DataMemberBinding="{Binding State, Mode=TwoWay, NotifyOnValidationError=True, ValidatesOnExceptions=True}" ItemsSourceBinding="{Binding DataContext.RLStates,RelativeSource={RelativeSource AncestorType=UserControl}}">  

  <telerik:GridViewComboBoxColumn.CellTemplate>  

    <DataTemplate>

         <TextBlock Text="{Binding State}" /> 

    </DataTemplate>

 </telerik:GridViewComboBoxColumn.CellTemplate>  

</telerik:GridViewComboBoxColumn>

 

<telerik:GridViewComboBoxColumn Header="Id" IsComboBoxEditable="True"

DisplayMemberPath="Id" SelectedValueMemberPath="Id" DataMemberBinding="{Binding MemberId, Mode=TwoWay,NotifyOnValidationError=True, ValidatesOnExceptions=True}ItemsSourceBinding="{Binding Ids, Mode=TwoWay}">

    <telerik:GridViewComboBoxColumn.CellTemplate>  

        <DataTemplate>  

            <TextBlock Text="{Binding MemberId}" />  

        </DataTemplate>

     </telerik:GridViewComboBoxColumn.CellTemplate>

 </telerik:GridViewComboBoxColumn>

 

<telerik:GridViewComboBoxColumn Header="Desc" IsComboBoxEditable="True" DisplayMemberPath="Descrition"

 SelectedValueMemberPath="DescritionDataMemberBinding="{Binding MemberDescrition, Mode=TwoWay, NotifyOnValidationError=True, ValidatesOnExceptions=True}ItemsSourceBinding="{Binding Descritions, Mode=TwoWay}">

 <telerik:GridViewComboBoxColumn.CellTemplate>  

    <DataTemplate>  

        <TextBlock Text="{Binding MemberDescrition}" />

     </DataTemplate
  </telerik:GridViewComboBoxColumn.CellTemplate>  

</telerik:GridViewComboBoxColumn>

 

ViewModel:

 

public string State

{

    get { return state; }

    set

    {

        if (!string.IsNullOrEmpty(value))

        {

            state = value.ToUpper();

            NotifyPropertyChanged("State");

            if (GetStateIds != null && !string.IsNullOrEmpty(value)))

             GetStateIds(this); 
        }

    }

}

public ObservableCollection<IdDescList> Ids  

{

    get

    {

        return Ids;

    }

    set

    {

        Ids = value;

        NotifyPropertyChanged("Ids");

    }

}

public ObservableCollection<IdDescList> Descritions

{

    get

    {

        if (string.IsNullOrEmpty(MemberId))

            return descriptions;

        else

        {

            return descriptions;

    }

}

    set

    {

        descriptions = value;

        NotifyPropertyChanged("Descritions");

    }

}

public string MemberDescrition

{

    get { return memberDescrition; }

    set { memberDescrition = value; NotifyPropertyChanged("MemberDescrition"); }

}

public string MemberId

{

    get { return memberId; }

    set

    {

        memberId = value;

        NotifyPropertyChanged("MemberId");

    }

}

 

 

 

Maddy
Top achievements
Rank 1
 asked on 07 Sep 2012
3 answers
114 views
Hello,

I've successfully implemented an editable GridView using a custom row layout.  However, there appears to be a bug that prevents inserting more than 1 new row when using a custom row layout. After the successful initial insertion of a new row, subsquent calls to BeginInsert() return false.  I've tried preceding the call to BeginInsert() with various statements to ensure that any pending edits or insertions are commited, but no success.  

I've replicated the problem using the RadGridView Custom Row Layout online demo and setting the IsReadOnly property to false.  Only the first insertion works.  Can you confirm this behavior and propose a solution?

Thanks in advance..
Vic
Top achievements
Rank 1
Iron
 answered on 07 Sep 2012
0 answers
53 views
Hi Support Team,

I am using following code to create column Group at run time .
To create a new group programmatically use :
GridViewColumnGroup columnGroup = new GridViewColumnGroup();
columnGroup.Name = "XXXXXX"; // replace the XXXX with a name of your choice...

To tell a column it belongs to a given group use : 
this.RadGridView1.Columns[0].ColumnGroupName = "XXXXXXX";
To add a programmatically created group to RadGridView use :
this.RadGridView1.ColumnGroups.Add(columnGroup);
I am creating grid columns at run time based on business requirement and for some columns which are constant and added at design time  is also having column group strip with Black color which user does not like so I want to get rid of that color and make its color as Rad Grid backgroud color. Screen shot of the issue has been attached with this thread.
Please help me to resolve this issue. Please have a look in the attachment. If you do not understand please let me know so I can post code as well. It happens in both the versions which are following:

Telerik\2011\Q3\WPF\2011.3.1220
Telerik\2012\Q2\WPF\2012.2.725



Thanks
Laxman.




Laxman
Top achievements
Rank 1
 asked on 07 Sep 2012
6 answers
363 views
The following is the Markup. 

<Grid Grid.Row="4" Grid.Column="0" >
            <Grid.RowDefinitions>
                <RowDefinition Height="*"></RowDefinition>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
            </Grid.ColumnDefinitions>
                          <!--RadGridView for View Workforce Plan-->
            <Tele:RadGridView Name="RgvViewWorkforcePlan" GridLinesVisibility="Both" IsReadOnly="True" AutoGenerateColumns="False" VerticalAlignment="Stretch"
                              CanUserFreezeColumns="False" ShowGroupPanel="False" RowIndicatorVisibility="Collapsed" Width="Auto"
                              ScrollViewer.VerticalScrollBarVisibility="auto"  ScrollViewer.CanContentScroll="True" ScrollViewer.HorizontalScrollBarVisibility="auto" SnapsToDevicePixels="False" VerticalContentAlignment="Top"
                              ItemsSource="{Binding TempGridData,Mode=OneWay}" CanUserResizeColumns="False"   SelectionMode="Single" SelectionUnit="FullRow" SelectedItem="{Binding SelectedGridItem,Mode=TwoWay}"
                              Background="#EAF3FC">
                <!--It creates a column group in which we can merge column headers as needed-->
                    <Tele:RadGridView.ColumnGroups>
                        <Tele:GridViewColumnGroup Name="MonthName">
                            <Tele:GridViewColumnGroup.HeaderTemplate>
                                <DataTemplate>
                                    <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="#EAF3FC" >
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="23"></RowDefinition>
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="*"></ColumnDefinition>
                                            <ColumnDefinition Width="Auto"></ColumnDefinition>
                                        </Grid.ColumnDefinitions>
                                        <Label  Name="lblMonthName"  Grid.Row="0" Grid.Column="0" Content="August - 2012" HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" Padding="0.3" ></Label>
                                         <StackPanel Grid.Row="0" Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Stretch" Width="Auto">
                                            <Button Name="btnFirst" HorizontalAlignment="Center" VerticalAlignment="Center" Content="&lt;&lt;"/>
                                            <Button Name="btnPrevious" HorizontalAlignment="Center" VerticalAlignment="Center" Content="&lt;"/>
                                            <Button Name="btnNext" HorizontalAlignment="Center" VerticalAlignment="Center" Content="&gt;" Click="btnNext_Click"/>
                                            <Button Name="btnLast" HorizontalAlignment="Center" VerticalAlignment="Center" Content="&gt;&gt;"/>
                                        </StackPanel>
                                    </Grid>
                                </DataTemplate>
                            </Tele:GridViewColumnGroup.HeaderTemplate>
                        </Tele:GridViewColumnGroup> 
                       
                    </Tele:RadGridView.ColumnGroups>
                        <Tele:RadGridView.Columns>
                          <Tele:GridViewDataColumn Header=""   HeaderCellStyle="{StaticResource GridDropHeaderCell}">
                            <!--<Tele:GridViewColumn.Header>
                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="30"></RowDefinition>
                                    </Grid.RowDefinitions> 
                                    <Button Grid.Row="0" Grid.Column="0" Content="test Button" ></Button>
                                </Grid>
                            </Tele:GridViewColumn.Header>-->
                                <Tele:GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <Tele:RadButton Name="BtnDeleteComponent" Width="21" Style="{StaticResource GridButton}" ToolTip="Delete" VerticalAlignment="Top" HorizontalAlignment="Center" Grid.Row="0" Grid.Column="0" Margin="0,1,0,0" Background="Transparent" Height="21" Padding="0" Foreground="Transparent" BorderBrush="Transparent" BorderThickness="0" DataContext="{Binding componentCode}">
                                    <Image Name="ImgSearchGenCode" Source="Images\DeleteButton.png" Width="21" Height="21" Cursor="Hand"  OpacityMask="#D3E6FF" AllowDrop="False" HorizontalAlignment="Center" VerticalAlignment="Top"></Image>
                                </Tele:RadButton>
                            </DataTemplate>
                        </Tele:GridViewColumn.CellTemplate>
                    </Tele:GridViewDataColumn>
                    <Tele:GridViewDataColumn Header="Job Type" DataMemberBinding="{Binding jobType,Mode=OneWay}"  HeaderCellStyle="{StaticResource GridDropHeaderCell}">
                    </Tele:GridViewDataColumn>
                    <Tele:GridViewDataColumn Header="Branch/Gen" DataMemberBinding="{Binding branchGeneratorCode,Mode=OneWay}" HeaderCellStyle="{StaticResource GridDropHeaderCell}" Width="80">
                    </Tele:GridViewDataColumn>
                    <Tele:GridViewDataColumn Header="Custom Data field TBD" DataMemberBinding="{Binding customDataField,Mode=OneWay}" HeaderCellStyle="{StaticResource GridDropHeaderCell}" Width="132"  >
                    </Tele:GridViewDataColumn>
</<Tele:RadGridView>
 <Grid>
In the above markup I added a Label control, Panel and controls in GridViewColumnGroup.HeaderTemplate. In  the Panel added 4 buttons. My issue is I can't able to find those control which are added in GridViewColumnGroup.HeaderTemplate in code behind .cs file. I need to update the Label content and set the button enable and disable as per business requirement.  

Please help me to resolve this issue.

one more issue I have is I am adding columns in the grid at run time and assigning those column ColumGroupName="MonthName" which I set in Markup but first time it work fine when and sets a comon Column Group Header. I click on next button I am creating some more columns again in the grid and adding with same  ColumGroupName="MonthName" in that case, for next time dynamically added columns the ColumnGroupName is not working so It is not putting next time dynamically added column in the same Colum Group Header.

Waiting for your quick response.

Thanks
Laxman


Laxman
Top achievements
Rank 1
 answered on 07 Sep 2012
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?