Telerik Forums
UI for WinForms Forum
5 answers
238 views
Hi,

I just installed the Q3 2011 and I'm having a lot of problems. My installation process was like this:
1. Uninstall prevous release (Q2 2011)
2. Install Q3 2011
3. Start VS - 2010
4. When I try to use the "Telerik|Radcontrols for WinForms|Upgrade Wizard" menu option I'm receive the following error message:
---------------------------
Microsoft Visual Studio
---------------------------
Object reference not set to an instance of an object.
---------------------------
OK  
---------------------------

Any suggestions?

Francisco
Aylin
Telerik team
 answered on 22 Nov 2011
1 answer
93 views
Hello,
I'm unsing the RadChart and it's very interesting. but sometimes my Rachart datasource has many datas and the XAxis can not display them all (of course, because sometimes more than a thousand chartitems are returned to the radChart).
So I want to use a bindingnavigator to navigate through them. is it possible? how?
Else, can you explain me another solution to navigate through my radchart when there is a lot of datas returned?

Thank you.
Ves
Telerik team
 answered on 22 Nov 2011
3 answers
279 views
Hello,

Is there a way to capture the Escape key just before the RadTreeView controls exists the edit mode? We have a workflow in which a node can be added and the control is set to the edit mode, so the user is foced to update the node text. But if the user cancels editing by pressing Escape we want to remove the node and keep it if the user pressed Enter. Which we could do in the standard TreeView control by using the KeyPress event. But the RadTreeView does not fire the KeyPress event when it enters the edit mode. Is there a work around this issue or i will need to submit a feature request?

Thanks,
Grigoriy
V
Top achievements
Rank 1
 answered on 22 Nov 2011
1 answer
106 views
Hi,

in the same column, I can have 2 different types of cells?

i have this need:

Col1      Col 2     Col 3
text text text
text text text
text text Image
text text Image

Thank


Jack
Telerik team
 answered on 21 Nov 2011
3 answers
293 views
I have my RadPageView control setup as ViewMode "Outlook" in my winforms C# application. In my requirement, I have a limited space to display the control (about 600px of height). When the control has more than 5 pages added, the view panel (the open area above the page selectors) is made smaller and cuts off the content. I would like to know if there is a way to enforce a minimum height on this area so that the control will automatically collapse page selectors it cannot fit in this confined space. I need about 300px of height for each page.

I have already tried setting the MinimumSize property on each RadPageViewPage. However, when I do this, the page view page "bleeds" over the top of the page selectors. I was expecting the grip to automatically resize to allow for this minimum height requirement.

Please see the screen shots from my sample application attached.

Edit:
I am using the RadPageView control from Q2 2011 SP1

Update:
I was able to achieve what I was looking for using the following code snippet and calling it from the "Initialized" and "Resized" events. I would still like to know if the control already supports this without having to write this snippet.

private void adjustPageViewGrip()
{
    RadPageViewOutlookElement viewElement = (RadPageViewOutlookElement)radPageView.ViewElement;
    int minHeight = 310;
    int itemHeight = radPageView.SelectedPage.Item.Size.Height;
    int selectedPageHeight = radPageView.SelectedPage.Height;
 
    if (selectedPageHeight < minHeight)
    {
        int hide = (int)Math.Ceiling((double)(minHeight - selectedPageHeight) / (double)itemHeight);
        if (hide > 0)
        {
            viewElement.HideItems(hide);
        }
    }
    else if ((selectedPageHeight + itemHeight) >= minHeight)
    {
        int show = (int)Math.Floor((double)(selectedPageHeight - minHeight) / (double)itemHeight);
        if (show > 0)
        {
            viewElement.ShowItems(show);
        }
    }
}


Stefan
Telerik team
 answered on 21 Nov 2011
2 answers
69 views
I was just looking at some demos, looked at code and decided to do a copy and paste to Visual Studio 2010.

I was surprised to see all of the code render onto ONE LINE.

Using JustCode Reformat -- semi-fixed it... at least until the first comment line... repeated until the code was across.

It would be nice to have:
  • Copy Code button on the demo page... which keeps the formatting...
  • Have the ability to copy selections while retaining formats.
Thanks!
Stefan
Telerik team
 answered on 21 Nov 2011
5 answers
202 views
I am building a virtual mode grid where I manage everything from loading, sorting and filtering

But I am stuck in filtering where I want to display my own controls at the top of each column with filtering enabled nad then start filtering over my data source when user press enter

I search the forumn regarind any similar solution but with no luck

Plese help
Julian Benkov
Telerik team
 answered on 21 Nov 2011
1 answer
76 views
Hello!

I've build a CustomControl derived from RadTreeView and overwritten the Click method from the RadTreeView.
I want to use the default Telerik - Theme like in my other RadControls
Properties:
         ThemeClassName: Telerik.WinControls.UI.*RadTreeView*,
         ThemeName: ControlDefault or mostly string empty

When i use the CustomControl i loose all the default view settings of the RadTreeView.
Selection and Mouse Over etc. displayed as white.
Functionality works as expected.
I tried to copy the Telerik.WinControls.UI.RadTreeView to the ThemeClassName property of the Control.
But this doesn't work.
How can i use the default behaviour view of the RadTreeView in my CustomControl?

Thanks and kind regards
Ivan Petrov
Telerik team
 answered on 21 Nov 2011
5 answers
262 views
We're using a custom collection to handle the modifications to the items bound to the RadGridView. Everything's working as expected for all but adding items. We've found out that the Telerik grid is using IList<T> data sources as IList, which means that our custom collection have to implement it as well, in order to respect our logic.

When the grid is trying to add a new item to the collection, the grid calls the IList.Add(object item) instead of IList<T>.Add(T item).

The error message displayed by the grid is "The collection is read-only."

We would expect the grid to determine the proper type of the collection in the data source.

Current version (without IList implementation):
public class EntityStateCollection<T> : IList<T> where T : new()
{
    #region Membres
    private List<EntityState<T>> _entityStates;
    private Enumerator<T> _innerEnumerator;
  
    public event EventHandler ItemAdded;
    public event EventHandler ItemDeleted;
    public event EventHandler ItemModified;
    #endregion
  
    #region Enumerator
  
    [Serializable, StructLayout(LayoutKind.Sequential)]
    public struct Enumerator<T> : IEnumerator<T>, IDisposable, IEnumerator where T : new()
    {
        private List<EntityState<T>> list;
        private int index;
        private T current;
        internal Enumerator(List<EntityState<T>> list)
        {
            this.list = list;
            this.index = 0;
            this.current = default(T);
        }
  
        public void Dispose()
        {
        }
  
        public bool MoveNext()
        {
            List<EntityState<T>> list = this.list;
            if (this.index < list.Count)
            {
  
                this.current = list[this.index].InnerObject;
                this.index++;
                return true;
            }
            else
            {
                this.current = default(T);
                return false;
            }
        }
  
        public T Current
        {
            get
            {
                return this.current;
            }
        }
        object IEnumerator.Current
        {
            get
            {
                return this.Current;
            }
        }
        void IEnumerator.Reset()
        {
            this.index = 0;
            this.current = default(T);
        }
    }
    #endregion Enumerator
  
    public EntityStateCollection()
    {
        _entityStates = new List<EntityState<T>>();
        _innerEnumerator = new Enumerator<T>(_entityStates);
    }
  
    public void SetModified(T item)
    {
        EntityState<T> entity = _entityStates[this.IndexOf(item)];
  
        if (entity.ObjectState != State.Added)
        {
            entity.ObjectState = State.Modified;
            this.ItemModified(entity, null);
        }
    }
  
    /// <summary>
    /// Returns true if all T entities are at Current state.
    /// </summary>
    /// <returns></returns>
    public bool IsInCurrentState()
    {
        for (int i = 0; i < _entityStates.Count; i++)
        {
            if (_entityStates[i].ObjectState != State.Current)
            {
                return false;
            }
        }
  
        return true;
    }
  
    public EntityState<T> GetEntityState(int i)
    {
        return _entityStates[i];
    }
  
    /// <summary>
    /// Add a list of T objects to the collection with the Current state
    /// </summary>
    /// <param name="lst"></param>
    public void AddRange(List<T> lst)
    {
        foreach (T item in lst)
        {
            _entityStates.Add(new EntityState<T>(State.Current, item));
            //this.ItemAdded(_entityStates[this.IndexOf(item)], null);
        }
    }
  
    #region IList<T> Membres
    public int IndexOf(T item)
    {
        int itemIndex = -1;
        for (int i = 0; i < _entityStates.Count; i++)
        {
            if (_entityStates[i].InnerObject.Equals(item))
            {
                itemIndex = i;
                break;
            }
        }
        return itemIndex;
    }
  
    public void Insert(int index, T item)
    {
        _entityStates.Insert(index, new EntityState<T>(State.Added, item));
        this.ItemAdded(_entityStates[index], null);
    }
  
    public void RemoveAt(int index)
    {
        _entityStates[index].ObjectState = State.Deleted;
        this.ItemDeleted(_entityStates[index], null);
    }
  
    public T this[int index]
    {
        get
        {
            return _entityStates[index].InnerObject;
        }
        set
        {
            _entityStates[index].InnerObject = value;
        }
    }
    #endregion
  
    #region ICollection<T> Membres
    public void Add(T item)
    {
        _entityStates.Add(new EntityState<T>(State.Added, item));
        this.ItemAdded(_entityStates[this.IndexOf(item)], null);
    }
  
    public void Clear()
    {
        _entityStates.Clear();
    }
  
    public bool Contains(T item)
    {
        for (int i = 0; i < _entityStates.Count; i++)
        {
            if (_entityStates[i].InnerObject.Equals(item))
            {
                return true;
            }
        }
  
        return false;
    }
  
    public void CopyTo(T[] array, int arrayIndex)
    {
        throw new NotImplementedException();
    }
  
    public int Count
    {
        get { return _entityStates.Count; }
    }
  
    public bool IsReadOnly
    {
        get { return false; }
    }
  
    public bool Remove(T item)
    {
        for (int i = 0; i < _entityStates.Count; i++)
        {
            if (_entityStates[i].InnerObject.Equals(item))
            {
                _entityStates[i].ObjectState = State.Deleted;
                this.ItemDeleted(_entityStates[i], null);
  
                return true;
            }
        }
  
        return false;
    }
    #endregion
  
    #region IEnumerable et IEnumerable<T> Membres
    public IEnumerator<T> GetEnumerator()
    {
        return this._innerEnumerator;
    }
  
    IEnumerator IEnumerable.GetEnumerator()
    {
        return this._innerEnumerator;
    }
    #endregion
Julian Benkov
Telerik team
 answered on 21 Nov 2011
2 answers
146 views
In your documentation it demonstrates the use of the ExpressionFormattingObject, but I am unable to find the object anywhere in the Telerik.Wincontrols.UI namespace.  Also references are for the 2011.2.11.831 build which is when the documentation said that it was introduced.

Any help would be appreciated...
Bobby Ross
Top achievements
Rank 1
 answered on 18 Nov 2011
Narrow your results
Selected tags
Tags
GridView
General Discussions
Scheduler and Reminder
Treeview
Dock
RibbonBar
Themes and Visual Style Builder
ChartView
Calendar, DateTimePicker, TimePicker and Clock
DropDownList
Buttons, RadioButton, CheckBox, etc
ListView
ComboBox and ListBox (obsolete as of Q2 2010)
Chart (obsolete as of Q1 2013)
Form
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
PropertyGrid
Menu
RichTextBox (obsolete as of Q3 2014 SP1)
Panelbar (obsolete as of Q2 2010)
PivotGrid and PivotFieldList
Tabstrip (obsolete as of Q2 2010)
MaskedEditBox
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
ProgressBar
CheckedDropDownList
TrackBar
MessageBox
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
Styling
Barcode
BindingNavigator
PopupEditor
RibbonForm
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Licensing
Localization
TimePicker
ButtonTextBox
FontDropDownList
BarcodeView
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
DateOnlyPicker
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?