Telerik Forums
UI for WPF Forum
8 answers
373 views
Hi,

I would like my application to save the grid state (sort, column order, filters, etc) and then when restarted I would like to re-apply these settings.

I started playing around with this idea only to find the SortDescription and CompositeFilterDescription are not Serializable.  Can we please make these serializable in a future release?  Even better can we add the methods:
RadGridView.SaveGridState(string filename)
RadGridView.LoadGridState(string filename)

Thanks

Guido Tapia
Maya
Telerik team
 answered on 30 Nov 2012
4 answers
132 views
Hi,

I'm having trouble changing the dictionary to en-GB when the RadRichTextBox control is hosted in a RadWindow rather than a standard window.
It will be easier to see some coding examples of my problem.

Initial Loading Code:
public Editor2(int _userID)
{
    InitializeComponent();
 
    //Set Language
    this.Language = XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.IetfLanguageTag);
 
    //Make RadWindow a normal window (to show taskbar icon etc)
    RadWindowHelper2 windowHelper = new RadWindowHelper2();
    windowHelper.TaskBarDisplayed += new EventHandler(windowHelper_TaskBarDisplayed);
    windowHelper.ShowWindowInTaskBar();
 
    //Set Document Styles
    RadDocumentStyles.AddStylesToDocumentRepository(this.radRichTextBox1.Document);
 
    //Set dictionary to English GB
    Stream stream = Application.GetResourceStream(new Uri("en-GB.tdf", UriKind.RelativeOrAbsolute)).Stream;
    this.LoadDictionary(stream);
}


Notice that I'm using a class called RadWindowHelper2 and a method windowHelper_TraskBarDisplayed(). I obtained this code somewhere in these forums so that a taskbar item is displayed.
At the end of the initial code I then call LoadDictionary() to change the dictionary to en-GB.


RadWindowsHelper2 class
public class RadWindowHelper2
{
    public event EventHandler TaskBarDisplayed;
 
    public void ShowWindowInTaskBar()
    {
        if (this.TaskBarDisplayed != null)
        {
            this.TaskBarDisplayed(this, new EventArgs());
        }
    }
}

windowHelper_TaskBarDisplayed()
void windowHelper_TaskBarDisplayed(object sender, EventArgs e)
{
    this.Show();
    //this.WindowState = WindowState.Maximized;
    this.BringToFront();
    var window = this.ParentOfType<Window>();
    window.ShowInTaskbar = true;
    window.Title = "Template Editor (Printing)";
}


LoadDictionary()
private void LoadDictionary(Stream tdfFileStream)
{
    RadDictionary dictionary = new RadDictionary();
    dictionary.Load(tdfFileStream);
    ((DocumentSpellChecker)this.radRichTextBox1.SpellChecker).AddDictionary(dictionary, CultureInfo.CurrentUICulture);
 
}

I can get the window to load and radrichtextbox to show providing I do one of the following:
  1. Comment out LoadDictionary() method call   (loads RadWindow with a taskbar icon but doesn't change dictionary)
  2. Comment out the code that creates an instance of RadWindowHelper2   (loads RadWindow without a taskbar icon but does change dictionary to en-GB)

For some reason I cannot get both of the above methods to load together.

Here's the exception and stack trace when I try to show a taskbar icon and change the dictionary to en-GB:

Exception:
NullReferenceException was unhandled

Object reference not set to an instance of an object.

stack trace:

call stack:
Telerik.Windows.Documents.dll!Telerik.Windows.Documents.UI.Layers.DecorationUILayerBase.UpdateViewPort(Telerik.Windows.Documents.UI.Layers.UILayerUpdateContext context = {unknown})
Telerik.Windows.Documents.dll!Telerik.Windows.Documents.UI.Layers.TextDecorationLayers.ProofingErrorsDecorationUILayer.ForceUpdateUIViewPort()
Telerik.Windows.Documents.dll!Telerik.Windows.Documents.UI.DocumentPagePresenter.UpdateProofingTextDecoration()
Telerik.Windows.Documents.dll!Telerik.Windows.Documents.UI.DocumentPrintLayoutPresenter.UpdateProofingTextDecoration()
Telerik.Windows.Documents.dll!Telerik.Windows.Controls.RadRichTextBox.InvalidateProofingErrors(bool invalidateIncorrectWordsOnly = {unknown})
Telerik.Windows.Documents.dll!Telerik.Windows.Controls.RadRichTextBox.spellChecker_DataChanged(object sender = {unknown}, System.EventArgs e = {unknown})
Telerik.Windows.Documents.dll!Telerik.Windows.Documents.Proofing.DocumentSpellChecker.OnDataChanged()
Telerik.Windows.Documents.dll!Telerik.Windows.Documents.Proofing.DocumentSpellChecker.AddCustomDictionary(Telerik.Windows.Documents.Proofing.ICustomWordDictionary customDictionary = {unknown}, System.Globalization.CultureInfo culture = {unknown})
Telerik.Windows.Documents.dll!Telerik.Windows.Documents.Proofing.DocumentSpellChecker.AddDictionary(System.Lazy<Telerik.Windows.Documents.Proofing.IWordDictionary> lazyDictionary = {unknown}, System.Globalization.CultureInfo culture = {unknown})
Telerik.Windows.Documents.dll!Telerik.Windows.Documents.Proofing.DocumentSpellChecker.AddDictionary(Telerik.Windows.Documents.Proofing.IWordDictionary dictionary = {unknown}, System.Globalization.CultureInfo culture = {unknown})
> TemplateEditor.exe!TemplateEditor.Editor2.LoadDictionary(System.IO.Stream tdfFileStream = {unknown})
TemplateEditor.exe!TemplateEditor.Editor2..ctor(int _userID = {unknown})
TAS2.exe!TAS2.SpecEditor.btnTemplateEditor_Click(object sender = {unknown}, System.Windows.RoutedEventArgs e = {unknown})
[External Code]


Any advice would be greatly appreciated.

Thanks,

Rob



Robert
Top achievements
Rank 1
 answered on 29 Nov 2012
0 answers
197 views
Hi There,

first i want to explain to you what i want, than how i solved it and finally what my problem is.

I was looking for a SelectionChangedEvent on a GridViewComboBoxColumn because based on the selection i have to calculate another property of my "RowItem".
e.g. A user change the value in my first column ( a GridViewComboBoxColumn ), so the value in column no 3 has to be calculated.

Because i didn't find an event, which i can use.

I created my own column, it work mostly:

public class ComboBoxColumn : GridViewBoundColumnBase
  {
   ######################shorted##############################
 
    public event SelectionChangedEventHandler SelectionChanged;
 
    private void OnSelectionChanged( object sender, SelectionChangedEventArgs e )
    {
      var myEvent = this.SelectionChanged;
      if( myEvent != null )
      {
        myEvent( this,
                 e );
      }
    }
 
    private void ComboBoxSelectionChanged( object sender, SelectionChangedEventArgs e )
    {
      this.OnSelectionChanged( sender,e );
    }
     
     ######################shorted##############################
 
    public override FrameworkElement CreateCellEditElement( GridViewCell cell,
                                                            object dataItem )
    {
      this.BindingTarget = RadComboBox.SelectedValueProperty;
      var comboBox = new RadComboBox
        {
          ItemsSource = this.ItemsSource,
          DisplayMemberPath = this.DisplayMemberPath,
          SelectedValuePath = this.SelectedValuePath
        };
      comboBox.SelectionChanged += this.ComboBoxSelectionChanged;
      comboBox.SetBinding( this.BindingTarget,
                           this.CreateValueBinding( ) );
      return comboBox;
    }

My problem is now that i am unable to get the row item in my gridview to set the property for the third column.
Can somebody helps me by this issue? Or is it the wrong why to solve this problem?

Many thanks in advance for your cooperation


Mark
Top achievements
Rank 1
 asked on 29 Nov 2012
4 answers
189 views
My tileView has tileItems that have an image thumbnail along with other things. The process that loads these images is a time-taking process. I want to load the image thumbnails only if the Tile item is within the viewable area. So if my current viewarea shows 50 tile items out of 100 tile items, I want to load the images for only those 50 that are visible. When the user scrolls the tileview and other tileitems come into view, then I want to load the images for these tileitems too.

Is there any event that I can use, to call my load image code....maybe something like tileitem post rendering or something.
I will be grateful for any code samples.
Thanks,
Subarna
Chris
Top achievements
Rank 1
 answered on 29 Nov 2012
0 answers
126 views
Hi,
I have RadCarousel which contains RadCarouselPanel for its items Panel. I use a horizontal path and have 3 items per page. The HorizontalScrollBarVisibility has been made to hidden and I use the CarouselButtons.
The way it is laid out is I have a grid panel with 3 columns and widht of the grid being 1022. The centre contains the radcarousel, and on either side the carousel scroll buttons with width 38 px each. The centre column occupies the rest of the space in the grid. So I want to specify the width between the panels in the radcarousel.
And also I wanted to know if there is anyway to connect the the items in the rad carousel panel Here is the explanation for the connectors
[prev]=[Main]=[next]
[prev] is the panel that is on the left side of the focussed item on carousel
[Main] is the panel that is the focussed item on carousel
[next] is the panel that is on the right side of the focussed item on carousel
= are the connectors between panels

Is there a way to achieve this requirement. Any help is appreciated. I use the v2012_3_1017_40_noxaml version from telerik.

Thank you
YK
YK
Top achievements
Rank 1
 asked on 29 Nov 2012
2 answers
395 views
Hi,

I'm using a RadGridView to display several thousand objects stored in an ObservableCollection.
The GridView is bound to the PagedItems on a DataPager, which is bound to the ObservableCollection.
I use filters on the columns in the GridView to filter down the data, so that instead of 250 pages, I get 5 pages.

How can I access these items in these pages? That is, all the items that matches the filter, and not only the items on the current page.
(the items on the current page I can access by gridView.Items, but it does not show the whole collection)
Dimitrina
Telerik team
 answered on 29 Nov 2012
2 answers
180 views
Hi,

I am trying to create a cutom look for the RadGridView to suit our application theme. The templates are based on telerik default templates where you have used some converters:
FilterOperatorConverter,FilterCompositionLogicalOperatorConverter,DistinctValueConverter etc..
No matter how I declare them in a resource dictionary I get errors:
<UserControl x:Class="WPFClient.Views.RequestSubmitView"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"          
   xmlns:grid="clr-namespace:Telerik.Windows.Controls.GridView;assembly=Telerik.Windows.Controls.GridView,Version=2012.3.1017.40,Culture=neutral,PublicKeyToken=5803cfa389c90ce7"
   >
<telerik:FilterOperatorConverter x:Key="FilterOperatorConverter1"/>
<grid:FilterOperatorConverter x:Key="FilterOperatorConverter2" />
 
</ResourceDictionary>

The first decleration prompts the error:
Ambiguous type reference. A type named 'FilterOperatorConverter' occurs in at least two namespaces, 'Telerik.Windows.Controls.GridView' and 'Telerik.Windows.Data'. Consider adjusting the assembly XmlnsDefinition attributes. C:\dev\trunk\WPFClient\Views\RequestSubmitView.xaml 1 1 WPFClient

The second decleration prompts the error:
The name "FilterOperatorConverter" does not exist in the namespace "clr-namespace:Telerik.Windows.Controls.GridView;assembly=Telerik.Windows.Controls.GridView,Version=2012.3.1017.40,Culture=neutral,PublicKeyToken=5803cfa389c90ce7". C:\dev\trunk\WPFClient\Views\RequestSubmitView.xaml 90 13 WPFClient

There are a few odd things about this bug.
1)At runtime everything works fine. The problem is limited to design time and the visual studio designer does not work because of this.
2)I've tried this out in an external test application and the second decleration  work fine. It only happens in our project. It is not originally a .net 4 application but was upgraded from 3.5.

Thanks,

Gary


Gary
Top achievements
Rank 1
 answered on 29 Nov 2012
4 answers
230 views
Hi There,

We have  checkbox column in RadGridview for checking the checkbox we need to click three times on the cell. we want to select the check box in a single click or may be with double click is ok.
Can you please help me to achieve this. we are getting many requests from our customers to have this feature.

Thanks in advance,,
Srinivas.
Dimitrina
Telerik team
 answered on 29 Nov 2012
1 answer
732 views
Hi, I'd like to disable drag and drop reordering of columns in a RadGridView. I set CanUserSortColumns to false, but this doesn't seem to make a difference. I setup the grid like so:

public static void SetupGrid(RadGridView gc)
{
  gc.IsFilteringAllowed = false;
  gc.CanUserSortColumns = false;
  gc.CanUserSortGroups = false;
  gc.CanUserReorderColumns = false;
  gc.CanUserDeleteRows = false;
  gc.CanUserInsertRows = false;
  gc.ShowGroupPanel = false;
  gc.ShowInsertRow = false;
}

What do I need to do to disable this feature?
Nick
Telerik team
 answered on 29 Nov 2012
2 answers
152 views
Hi Telerik,

I'm using HierarchicalDataTemplate in RadPanelItem for my datasource. I need to use drag-n-drop to reorder items and groups in RadPanelBar.

1. When user drags HeaderRow (group item) he should be able to change order of this group in list as result.

Original:                                  After drag-n-drop by group header to the begin of list:
Group1                                   Group2
    Item11                                     Item21
    Item12                                     Item22
    Item13                                Group1        
Group2 <--dragged to begin       Item11
    Item21                                     Item12
    Item22                                     Item13


2. User also should be able to reorder item(s) (one or multiply selected) inside one group or move it to another group using drag-n-drop.


I'm more interested in the definition and visualization of position within the list where item should be moved.
Can you help me with direction of search or maybe little example?

Thanks.

Regards,
Alexey Lavrov
Alexey
Top achievements
Rank 1
 answered on 29 Nov 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?