Telerik Forums
UI for Silverlight Forum
6 answers
64 views
I am zipping the file using the Telerik.Windows.Zip. When i extract the zip file manually using winzip, it throws the below error

!   C:\Users\Public\Music\Sample Music\New folder\3.zip: CRC failed in 3.zip.xml. The file is corrupt.

It does work sometime.

using (Stream stream = viewModel.OpenStream())
                    {
                        if (stream != null)
                        {
                            using (ZipPackage zipPackage = ZipPackage.Create(stream))
                            {
                                zipPackage.AddStream(new MemoryStream(GetXmlData(tutorial)),viewModel.Filename+".xml");
                                 
                            }
                        }
                    }


 		    


Dimitar
Telerik team
 answered on 07 May 2021
14 answers
269 views
While viewing a virtual collection in the gridview if I load the first page, select a row, then move down to a page after the second page and attempt to close the multi selection with the shift key (multi-select across pages) the following error is thrown, any way to prevent this short of removing extended selection from the grid (currently have functionality tied to multiselect), maybe reset selection when page moves?:

System.ArgumentException: Cell is not valid  Parameter name: cellInfo    
at Telerik.Windows.Controls.GridView.Selection.CellInfoCollection.Contains(GridViewCellInfo cellInfo)    
at Telerik.Windows.Controls.GridView.Selection.RowTrackingRootSelectionStateChanger.UpdateCellsSelectionState(DataCellsPresenter cellsPresenter, CellInfoCollection cells, Boolean isSelected)    
at Telerik.Windows.Controls.GridView.Selection.RowTrackingRootSelectionStateChanger.UpdateCellSelectionState(LinkedList`1 trackingRoot, CellInfoCollection cells, Boolean isSelected)    
at Telerik.Windows.Controls.GridView.Selection.RowTrackingRootSelectionStateChanger.UpdateCellSelectionState(CellInfoCollection cells, Boolean isSelected)    
at Telerik.Windows.Controls.GridView.Selection.CellSelectionHandler.SetSelectionState(CellInfoCollection cellsCollection, Boolean isSelected)    
at Telerik.Windows.Controls.GridView.Selection.CellSelectionHandler.EndAllowedSelection()    
at Telerik.Windows.Controls.GridView.Selection.CellSelectionHandler.EndPendingSelection()    
at Telerik.Windows.Controls.GridView.Selection.CellSelectionHandler.EndSelection()    
at Telerik.Windows.Controls.GridView.CellSelectionChange.Dispose()    
at Telerik.Windows.Controls.GridView.Selection.CompositeSelectionHandler.Items_CollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)    
at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)    
at Telerik.Windows.Data.DataItemCollection.OnCollectionChanged(NotifyCollectionChangedEventArgs e)    
at Telerik.Windows.Data.DataItemCollection.OnCollectionViewCollectionChanged(NotifyCollectionChangedEventArgs e)    
at Telerik.Windows.Data.DataItemCollection.Telerik.Windows.Data.IWeakEventListener<System.Collections.Specialized.NotifyCollectionChangedEventArgs>.ReceiveWeakEvent(Object sender, NotifyCollectionChangedEventArgs e)    
at Telerik.Windows.Data.WeakEvent.WeakListener`1.Handler(Object sender, TArgs args)    
at Telerik.Windows.Data.QueryableCollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)    
at Telerik.Windows.Data.VirtualQueryableCollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)    
at Telerik.Windows.Data.QueryableCollectionView.ProcessSynchronousCollectionChangedWithAdjustedArgs(NotifyCollectionChangedEventArgs originalArguments, Int32 adjustedOldIndex, Int32 adjustedNewIndex)    
at Telerik.Windows.Data.QueryableCollectionView.ProcessAsynchronousCollectionChanged(NotifyCollectionChangedEventArgs args)    
at Telerik.Windows.Data.QueryableCollectionView.ProcessCollectionChanged(NotifyCollectionChangedEventArgs args)    
at Telerik.Windows.Data.VirtualQueryableCollectionView.ProcessCollectionChanged(NotifyCollectionChangedEventArgs args)    
at Telerik.Windows.Data.QueryableCollectionView.OnSourceCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)    
at Telerik.Windows.Data.QueryableCollectionView.Telerik.Windows.Data.IWeakEventListener<System.Collections.Specialized.NotifyCollectionChangedEventArgs>.ReceiveWeakEvent(Object sender, NotifyCollectionChangedEventArgs args)    
at Telerik.Windows.Data.WeakEvent.WeakListener`1.Handler(Object sender, TArgs args)    
at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)    
at Telerik.Windows.Data.RadObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)    
at System.Collections.ObjectModel.ObservableCollection`1.SetItem(Int32 index, T item)    
at System.Collections.ObjectModel.Collection`1.set_Item(Int32 index, T value)    
at System.Collections.ObjectModel.Collection`1.System.Collections.IList.set_Item(Int32 index, Object value)    
at Telerik.Windows.Data.VirtualQueryableCollectionView.LoadItems(Int32 startIndex, IEnumerable items)    
at Telerik.Windows.Data.VirtualQueryableCollectionView.<>c__DisplayClass26.<Load>b__25()
Chris
Top achievements
Rank 1
Iron
 answered on 27 Apr 2021
1 answer
3 views
Anybody have any suggestions on good books/resources on silverlight and asp.net? I'm looking namely for more a textbook approach than google search approach on these topics.
MSDN doesn't seem to have what I'm looking for out of silverlight at least.
 
Ricer
Top achievements
Rank 1
 answered on 02 Apr 2021
8 answers
43 views
Hi,

I have a grid with a lot of columns (20+) and when you sort on the column the horizontal scroll bar resets to the left most position which often hides the column you just sorted (or filtered) on.  I read this was fixed in the Q3 2010 build which we have installed, but the problem persists.  Note, we also freeze several of the columns.

jerry
Stone
Top achievements
Rank 1
 answered on 24 Mar 2021
5 answers
77 views
I am hoping you have some examples of using the Stacked Bar Chart with databinding in XAML to a MVVM Property.  What I am trying to do is create a chart with "Month" along the horizontal access and to series ("Planned" & "Actual") and then stack the values by the "GroupLvl" Column


GroupLvl Xcat Planned Actual
CENTRAL NOV 30 45
CENTRAL OCT 0 1
CENTRAL SEP 0 0
CENTRAL YTD 0 1
SOUTHEAST APR 0 1
SOUTHEAST AUG 1 0
SOUTHEAST DEC 1173 6840
TENNESSEE/KENTUCKY NOV 3560 3231
TENNESSEE/KENTUCKY OCT 2126 3869
TENNESSEE/KENTUCKY SEP 2756 2174
TENNESSEE/KENTUCKY YTD 1537 2634

here is what I have been trying in XAML, but I am still far from the desired mark.

 

 

 

 

<telerik:RadChart x:Name="CxPerformance"
                            ItemsSource="{Binding CurrentCXCompletedProjectPerformances, Mode=TwoWay}"
                            VerticalAlignment="Top" 
                            Margin="2" 
                            Grid.Column="0" 
                            telerik:StyleManager.Theme="Windows7">
                            <telerik:RadChart.DefaultView>
                               <telerik:ChartDefaultView>
                                   <telerik:ChartDefaultView.ChartTitle>
                                       <telerik:ChartTitle Content="Project Performance" />
                                   </telerik:ChartDefaultView.ChartTitle>
                               </telerik:ChartDefaultView>
                           </telerik:RadChart.DefaultView>
  
                            <telerik:RadChart.SeriesMappings>
                                <telerik:SeriesMapping>
                                    <telerik:SeriesMapping.SeriesDefinition>
                                        <telerik:BarSeriesDefinition ShowItemLabels="True" StackGroupName="{Binding GroupLvl}"/>
                                    </telerik:SeriesMapping.SeriesDefinition>
                                    <telerik:SeriesMapping.ItemMappings>
                                        <telerik:ItemMapping FieldName="Planned" DataPointMember="YValue"/>
                                        <telerik:ItemMapping FieldName="GroupLvl" DataPointMember="LegendLabel"/>
                                        <telerik:ItemMapping FieldName="Xcat" DataPointMember="XCategory"/>
                                    </telerik:SeriesMapping.ItemMappings>
                                </telerik:SeriesMapping>
                                <telerik:SeriesMapping>
                                    <telerik:SeriesMapping.SeriesDefinition>
                                        <telerik:BarSeriesDefinition ShowItemLabels="True" StackGroupName="Actual"/>
                                    </telerik:SeriesMapping.SeriesDefinition>
                                    <telerik:SeriesMapping.ItemMappings>
                                        <telerik:ItemMapping FieldName="Actual" DataPointMember="YValue"/>
                                        <telerik:ItemMapping FieldName="GroupLvl" DataPointMember="LegendLabel"/>
                                        <telerik:ItemMapping FieldName="Xcat" DataPointMember="XCategory"/>
                                    </telerik:SeriesMapping.ItemMappings>
                                </telerik:SeriesMapping>
                            </telerik:RadChart.SeriesMappings>
                        </telerik:RadChart>

 

 




any help you can provide would be greatly appreciated.

Martin Ivanov
Telerik team
 answered on 16 Mar 2021
1 answer
4 views
Hi guys just want to introduce me, I'm Morgan
Martin
Telerik team
 answered on 12 Mar 2021
2 answers
6 views

Hi,

Is it possible to retrieve the position of the mouse on the ruler? I would like to display it in decimal in my control.

 

Best Regards,

Michael

Loic
Top achievements
Rank 1
 answered on 01 Mar 2021
2 answers
6 views

Hello.

I need update value of RadGridView GridViewCell then she in Edit Mode.

I use MainGrid.BeginningEdit event:

private void MainGridOnBeginningEdit(object sender, GridViewBeginningEditRoutedEventArgs args)
        {
            if(args == null || args.Cell.Value != null) return;

            if (BeginningCellEditEvent != null)
                BeginningCellEditEvent.Invoke(args);
        }

In BeginningCellEditEvent handler i try set new cell value:

private void ActivityDateFactTable_OnBeginningCellEditEvent(GridViewBeginningEditRoutedEventArgs args)
        {
            if((args?.Cell == null || args.Cell.Value != null)) return;
            if(!(args.Row.DataContext is ViewModel viewModel)) return;

            var bindingPath = args.Cell.DataColumn.DataMemberBinding.Path
                                                                            .Path
                                                                            .Replace("[", "")
                                                                            .Replace("]", "")
                                                                            .Split('_');
            if(bindingPath.Length < 3) return;            
            var calcValue = viewModel.GetCalculatedValue(bindingPath[0]);
            if (calcValue != null)
            {                
                args.Cell.Value = calcValue;                
                args.Cell.UpdateLayout();
            }
        }

or

private void ActivityDateFactTable_OnBeginningCellEditEvent(GridViewBeginningEditRoutedEventArgs args)
        {
            if((args?.Cell == null || args.Cell.Value != null)) return;
            if(!(args.Row.DataContext is ViewModel viewModel)) return;

            var bindingPath = args.Cell.DataColumn.DataMemberBinding.Path
                                                                            .Path
                                                                            .Replace("[", "")
                                                                            .Replace("]", "")
                                                                            .Split('_');
            if(bindingPath.Length < 3) return;            
            var calcValue = viewModel.GetCalculatedValue(bindingPath[0]);
            if (calcValue != null)
            {    
                this.Dispatcher.BeginInvoke
                ((Action) delegate
                    {
                        args.Cell.Value = calcValue;
                        args.Cell.UpdateLayout();                   
                    }
                );
            }
        }

Cell.Value is changed, but in UI not updated (as seen on screenshot).

How i can update value in UI after changing him in code and i need that cell stays in edit mode?

Anton
Top achievements
Rank 1
 answered on 24 Feb 2021
3 answers
89 views
Hi

I am developing an application that should be able to preview a set of documents of different types.
Word, txt, html seems to work fine, but what would really be useful is the ability to preview pdf documents since most of the documents that are going to be previewed in this application is just that.

I noticed in version 2010.3.1129.1040 that a PdfFormatProvider had been included, but the PdfFormatProvider.Import()-method throws a NotSupportedException.

I was just wondering as to when such a method will be supported or if there is another way to preview pdf documents that I have yet to discover?

Regards
Sindre
Tanya
Telerik team
 answered on 19 Feb 2021
1 answer
4 views

Hi, In my tile view, Items disappear when I apply style on headers of items.

As
---

 <Window.Resources>
        <Style x:Key="TileViewItemHeaderStyle" TargetType="tileView:TileViewItemHeader">
            <Setter Property="Foreground" Value="Black"/>
            <Setter Property="Background" Value="LightGray" />
        </Style>
        <Style x:Key="TileViewItemCustomStyle" TargetType="telerik:RadTileViewItem">
            <Setter Property="Header" Value="{Binding Title}" />
        </Style>
    </Window.Resources>

----

 <telerik:RadTileView                      
                        ItemsSource="{Binding Tiles}"
                        MinimizedItemsPosition="Bottom"  
                        HeaderStyle="{StaticResource TileViewItemHeaderStyle}" 
                        ItemContainerStyle="{StaticResource TileViewItemCustomStyle}"
                        MaximizedItem="{Binding MaximizedTile, Mode=TwoWay}"
                        PreservePositionWhenMaximized="True"
                        MinimizedColumnWidth="200"
                        MinimizedRowHeight="200">
                    </telerik:RadTileView>

---


However when I remove these lines 

HeaderStyle="{StaticResource TileViewItemHeaderStyle}" 
ItemContainerStyle="{StaticResource TileViewItemCustomStyle}"

 

Tiles aappear but obviously without custom 

Martin Ivanov
Telerik team
 answered on 08 Dec 2020