Telerik Forums
UI for WinForms Forum
1 answer
443 views
When GridView has a GridViewComboBoxColumn that is bound to a list of objects and that list changes a null reference error is thrown.  This error did not get throw in the previous release (2013 Q1), it just started happening in (2013 Q2, specifically 2013.2.612.40).

Here is a code example using a list of Authors and a list of books.  Basically the book object has a reference to the Author object.  When the author list changes the book grid will throw a null reference error.

Here is the stack trace of the error:

   at Telerik.WinControls.UI.GridViewComboBoxColumn.AddItem(Int32 i)
   at Telerik.WinControls.UI.GridViewComboBoxColumn.currencyManager_ListChanged(Object sender, ListChangedEventArgs e)
   at System.ComponentModel.ListChangedEventHandler.Invoke(Object sender, ListChangedEventArgs e)
   at System.Windows.Forms.CurrencyManager.OnListChanged(ListChangedEventArgs e)
   at System.Windows.Forms.CurrencyManager.List_ListChanged(Object sender, ListChangedEventArgs e)
   at System.ComponentModel.BindingList`1.OnListChanged(ListChangedEventArgs e)
   at System.ComponentModel.BindingList`1.Child_PropertyChanged(Object sender, PropertyChangedEventArgs e)
   at GridTest.Author.NotifyPropertyChanged(String info) in c:\Users\SESA124669\Documents\Visual Studio 2012\Projects\GridTest\GridTest\Form1.cs:line 69
   at GridTest.Author.set_Name(String value) in c:\Users\SESA124669\Documents\Visual Studio 2012\Projects\GridTest\GridTest\Form1.cs:line 97
   at GridTest.Form1.button1_Click(Object sender, EventArgs e) in c:\Users\SESA124669\Documents\Visual Studio 2012\Projects\GridTest\GridTest\Form1.cs:line 52
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.Run(Form mainForm)
   at GridTest.Program.Main() in c:\Users\SESA124669\Documents\Visual Studio 2012\Projects\GridTest\GridTest\Program.cs:line 19
   at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
   at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

Here is the code:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Telerik.WinControls.UI;
 
namespace GridTest
{
    public partial class Form1 : Form
    {
        private BindingList<Author> AuthorData = new BindingList<Author>();
        private BindingList<Book> BookData = new BindingList<Book>();
 
        public Form1()
        {
            InitializeComponent();
 
            radGridViewAuthors.DataSource = AuthorData;
 
            radGridViewBooks.MasterTemplate.Columns.Clear();
 
            GridViewComboBoxColumn colAuth = new GridViewComboBoxColumn("Author");
            colAuth.HeaderText = "Author";
            colAuth.Name = "Author";
            colAuth.DataSource = AuthorData;
            colAuth.ValueMember = "Id";
            colAuth.DisplayMember = "Name";
            colAuth.DisplayMemberSort = true;
            radGridViewBooks.MasterTemplate.Columns.Add(colAuth);
 
            GridViewTextBoxColumn colName = new GridViewTextBoxColumn("Name");
            colName.HeaderText = "Name";
            colName.Name = "Name";
            colName.ReadOnly = true;
            radGridViewBooks.MasterTemplate.Columns.Add(colName);
 
            radGridViewBooks.MasterTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
 
            radGridViewBooks.DataSource = BookData;
        }
 
        private void button1_Click(object sender, EventArgs e)
        {
            Author m = new Author();
            m.Id = AuthorData.Count + 1;
            AuthorData.Add(m);
            m.Name = textBoxAuthorName.Text;
        }
 
        private void button2_Click(object sender, EventArgs e)
        {
            Book m = new Book(textBoxBookName.Text);
            BookData.Add(m);
        }
    }
 
    public class Author : INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;
        protected void NotifyPropertyChanged(String info)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(info));
            }
        }
 
        private int id;
        public int Id
        {
            get
            {
                return id;
            }
            set
            {
                id = value;
                NotifyPropertyChanged("Id");
            }
        }
 
        private string name;
        public string Name
        {
            get
            {
                return name;
            }
            set
            {
                name = value;
                NotifyPropertyChanged("Name");
            }
        }
 
        public Author() { }
        public Author(int id, string name)
        {
            Id = id;
            Name = name;
        }
    }
 
    public class Book : INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;
        protected void NotifyPropertyChanged(String info)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(info));
            }
        }
 
        private string name;
        public string Name
        {
            get
            {
                return name;
            }
            set
            {
                name = value;
                NotifyPropertyChanged("Name");
            }
        }
 
        private Author author;
        public Author Author
        {
            get
            {
                return author;
            }
            set
            {
                author = value;
                NotifyPropertyChanged("Author");
            }
        }
 
        public Book() { }
        public Book(string name)
        {
            Name = name;
        }
    }
}
George
Telerik team
 answered on 22 Jul 2013
2 answers
61 views
Hello Telerik support,

I am using Office2010 themes (black, blue and silver) wth RadDock. There seems to be a problem when one want to dock a window under another with these themes: instead of docking under, it docks overs as if over the tab icon instead of the down arrow. There seems to have no problem on Right, top and left arrows. With other themes, I did not see such issue.

Tell me if this is not clear (it is not easy to explain).

Regards.
Amand
Top achievements
Rank 1
 answered on 22 Jul 2013
2 answers
86 views
Hi,
in my scenario I need to know target TileGroupElement of drag and drop operation.
I try to use PreviewDragOver event:
AddHandler RadPanorama1.PanoramaElement.DragDropService.PreviewDragOver, AddressOf PreviewDragOver
and

Private Sub PreviewDragOver(sender As Object, e As RadDragOverEventArgs)
      
        'TARGET NAME
        rlabHello.Text = e.HitTarget.GetType.ToString
 
    End Sub
When I do "Drag Over" RadTileElement I get RadTileElement,  but when I do "Drag Over" TileGroupElement I get RadPanoramaElement.

How I can get TileGroupElement in both cases?

Thanks,
Marek
Marek Kruk
Top achievements
Rank 1
 answered on 22 Jul 2013
1 answer
78 views
Hi
I would need to do something like that:
http://www.radgametools.com/images/telethreads_big.png
Is it possible with your C# controls?
I didn't find how I would do it looking at the demos.
It needs to support thousands of "box"

Thanks

Nicolas Babin
Peter
Telerik team
 answered on 22 Jul 2013
7 answers
156 views
private void SizeModeClick(object sender, EventArgs e)
        {
            RadMenuButtonItem item = sender as RadMenuButtonItem;
            pictureBox1.SizeMode = (PictureBoxSizeMode)Convert.ToInt32(item.Tag);
            sbSizeMode.Text = item.Text;
        }

 

 

 

The above code from the step by step tutorial is throwing a NullReference Exception.  I bolded the line that has the error, VS2012 says it should have a "new", but when i do that it will not compile.


System.NullReferenceException was unhandled
  HResult=-2147467261
  Message=Object reference not set to an instance of an object.
  Source=Winformtutorial
  StackTrace:
       at Winformtutorial.RadForm1.SizeModeClick(Object sender, EventArgs e) in d:\visual studio 12\Projects\Winformtutorial\Winformtutorial\RadForm1.cs:line 43
       at System.Windows.Forms.Control.OnClick(EventArgs e)
       at Telerik.WinControls.RadControl.OnClick(EventArgs e)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at Telerik.WinControls.RadControl.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.Run(Form mainForm)
       at Winformtutorial.Program.Main() in d:\visual studio 12\Projects\Winformtutorial\Winformtutorial\Program.cs:line 18
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.AppDomain.nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException:

Zeeshan
Top achievements
Rank 1
 answered on 19 Jul 2013
1 answer
91 views
Hi,
I need to make a copy when you drag an item instead of moving.
How to do it in the easiest way?

Thanks,
Marek
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 19 Jul 2013
1 answer
148 views
I have a VS.net (VB.net) 2010 project that I built last year and haven't opened since.  I'm sure the version of the controls I had installed at that time was older than what I have now.  Now, when I try to open that project I get a VS error that forces close, which is preventing me from being able to work with my project.  The VS error references Telerik.WinControls.GridView and says essentially "File Not Found".  How can I update this project so that it will now just use the current version of the controls that I have installed?
Missing User
 answered on 19 Jul 2013
4 answers
189 views

Hey there,

I've been looking around for ages and just can't seem to find anything that resembles the problem I have (Or I'm not looking for the right things). This is also why the title is so vague. I just don't know what's going wrong exactly

I'm trying to build hierarchy in a grid. At first I tried to create one programmatically. That one ended up looking like the image attached. So, I thought, perhaps I ended up making an error, thus I tried creating the intended grid through the property builder. But that one too ended up looking like attached image.

The designer code is as followed:
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class SetsForm
    Inherits Telerik.WinControls.UI.RadForm
 
    'Form overrides dispose to clean up the component list.
    <System.Diagnostics.DebuggerNonUserCode()> _
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
        Try
            If disposing AndAlso components IsNot Nothing Then
                components.Dispose()
            End If
        Finally
            MyBase.Dispose(disposing)
        End Try
    End Sub
 
    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer
 
    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer. 
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> _
    Private Sub InitializeComponent()
        Dim GridViewComboBoxColumn1 As Telerik.WinControls.UI.GridViewComboBoxColumn = New Telerik.WinControls.UI.GridViewComboBoxColumn()
        Dim GridViewTextBoxColumn1 As Telerik.WinControls.UI.GridViewTextBoxColumn = New Telerik.WinControls.UI.GridViewTextBoxColumn()
        Dim GridViewTextBoxColumn2 As Telerik.WinControls.UI.GridViewTextBoxColumn = New Telerik.WinControls.UI.GridViewTextBoxColumn()
        Dim GridViewTextBoxColumn3 As Telerik.WinControls.UI.GridViewTextBoxColumn = New Telerik.WinControls.UI.GridViewTextBoxColumn()
        Dim SortDescriptor1 As Telerik.WinControls.Data.SortDescriptor = New Telerik.WinControls.Data.SortDescriptor()
        Dim GridViewRelation1 As Telerik.WinControls.UI.GridViewRelation = New Telerik.WinControls.UI.GridViewRelation()
        Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(SetsForm))
        Dim GridViewTextBoxColumn4 As Telerik.WinControls.UI.GridViewTextBoxColumn = New Telerik.WinControls.UI.GridViewTextBoxColumn()
        Dim GridViewTextBoxColumn5 As Telerik.WinControls.UI.GridViewTextBoxColumn = New Telerik.WinControls.UI.GridViewTextBoxColumn()
        Dim GridViewTextBoxColumn6 As Telerik.WinControls.UI.GridViewTextBoxColumn = New Telerik.WinControls.UI.GridViewTextBoxColumn()
        Dim GridViewTextBoxColumn7 As Telerik.WinControls.UI.GridViewTextBoxColumn = New Telerik.WinControls.UI.GridViewTextBoxColumn()
        Me.RadGridView1 = New Telerik.WinControls.UI.RadGridView()
        Me.GridViewTemplate1 = New Telerik.WinControls.UI.GridViewTemplate()
        CType(Me.RadGridView1, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.RadGridView1.MasterTemplate, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.GridViewTemplate1, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.SuspendLayout()
        '
        'RadGridView1
        '
        Me.RadGridView1.AutoGenerateHierarchy = True
        Me.RadGridView1.BackColor = System.Drawing.Color.FromArgb(CType(CType(191, Byte), Integer), CType(CType(219, Byte), Integer), CType(CType(255, Byte), Integer))
        Me.RadGridView1.Cursor = System.Windows.Forms.Cursors.Default
        Me.RadGridView1.Dock = System.Windows.Forms.DockStyle.Fill
        Me.RadGridView1.EnterKeyMode = Telerik.WinControls.UI.RadGridViewEnterKeyMode.EnterMovesToNextCell
        Me.RadGridView1.Font = New System.Drawing.Font("Segoe UI", 8.25!)
        Me.RadGridView1.ForeColor = System.Drawing.Color.Black
        Me.RadGridView1.ImeMode = System.Windows.Forms.ImeMode.NoControl
        Me.RadGridView1.Location = New System.Drawing.Point(0, 72)
        '
        'RadGridView1
        '
        Me.RadGridView1.MasterTemplate.AllowColumnReorder = False
        Me.RadGridView1.MasterTemplate.AllowDragToGroup = False
        Me.RadGridView1.MasterTemplate.AutoGenerateColumns = False
        Me.RadGridView1.MasterTemplate.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill
        GridViewComboBoxColumn1.AllowGroup = False
        GridViewComboBoxColumn1.EnableExpressionEditor = False
        GridViewComboBoxColumn1.FieldName = "ProductSet_CompanyID"
        GridViewComboBoxColumn1.HeaderText = "Bedrijf"
        GridViewComboBoxColumn1.Name = "ProductSet_CompanyID"
        GridViewComboBoxColumn1.Width = 93
        GridViewTextBoxColumn1.AllowGroup = False
        GridViewTextBoxColumn1.EnableExpressionEditor = False
        GridViewTextBoxColumn1.FieldName = "ProductSet_SetReference"
        GridViewTextBoxColumn1.HeaderText = "Set-Referentie"
        GridViewTextBoxColumn1.MaxLength = 50
        GridViewTextBoxColumn1.Name = "ProductSet_SetReference"
        GridViewTextBoxColumn1.Width = 139
        GridViewTextBoxColumn2.FieldName = "ProductSet_SetName"
        GridViewTextBoxColumn2.HeaderText = "Set-Naam"
        GridViewTextBoxColumn2.MaxLength = 255
        GridViewTextBoxColumn2.Name = "ProductSet_SetName"
        GridViewTextBoxColumn2.Width = 417
        GridViewTextBoxColumn3.FieldName = "ProductSet_ID"
        GridViewTextBoxColumn3.HeaderText = "column1"
        GridViewTextBoxColumn3.IsVisible = False
        GridViewTextBoxColumn3.Name = "ProductSet_ID"
        GridViewTextBoxColumn3.SortOrder = Telerik.WinControls.UI.RadSortOrder.Ascending
        GridViewTextBoxColumn3.Width = 47
        Me.RadGridView1.MasterTemplate.Columns.AddRange(New Telerik.WinControls.UI.GridViewDataColumn() {GridViewComboBoxColumn1, GridViewTextBoxColumn1, GridViewTextBoxColumn2, GridViewTextBoxColumn3})
        Me.RadGridView1.MasterTemplate.EnableFiltering = True
        Me.RadGridView1.MasterTemplate.EnableGrouping = False
        SortDescriptor1.PropertyName = "ProductSet_ID"
        Me.RadGridView1.MasterTemplate.SortDescriptors.AddRange(New Telerik.WinControls.Data.SortDescriptor() {SortDescriptor1})
        Me.RadGridView1.MasterTemplate.Templates.AddRange(New Telerik.WinControls.UI.GridViewTemplate() {Me.GridViewTemplate1})
        Me.RadGridView1.Name = "RadGridView1"
        GridViewRelation1.ChildColumnNames = CType(resources.GetObject("GridViewRelation1.ChildColumnNames"), System.Collections.Specialized.StringCollection)
        GridViewRelation1.ChildTemplate = Me.GridViewTemplate1
        GridViewRelation1.ParentColumnNames = CType(resources.GetObject("GridViewRelation1.ParentColumnNames"), System.Collections.Specialized.StringCollection)
        GridViewRelation1.ParentTemplate = Me.RadGridView1.MasterTemplate
        GridViewRelation1.RelationName = "SetProductRelation"
        Me.RadGridView1.Relations.AddRange(New Telerik.WinControls.UI.GridViewRelation() {GridViewRelation1})
        Me.RadGridView1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.RadGridView1.ShowGroupPanel = False
        Me.RadGridView1.Size = New System.Drawing.Size(668, 313)
        Me.RadGridView1.TabIndex = 0
        Me.RadGridView1.Text = "3"
        Me.RadGridView1.UseScrollbarsInHierarchy = True
        '
        'GridViewTemplate1
        '
        Me.GridViewTemplate1.AutoGenerateColumns = False
        Me.GridViewTemplate1.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill
        GridViewTextBoxColumn4.FieldName = "ProductSetProduct_ID"
        GridViewTextBoxColumn4.HeaderText = "ID"
        GridViewTextBoxColumn4.Name = "ProductSetProduct_ID"
        GridViewTextBoxColumn5.FieldName = "ProductSetProduct_SetID"
        GridViewTextBoxColumn5.HeaderText = "SetID"
        GridViewTextBoxColumn5.IsVisible = False
        GridViewTextBoxColumn5.Name = "ProductSetProduct_SetID"
        GridViewTextBoxColumn6.FieldName = "ProductSetProduct_ProductReference"
        GridViewTextBoxColumn6.HeaderText = "Product-Reference"
        GridViewTextBoxColumn6.MaxLength = 50
        GridViewTextBoxColumn6.Name = "ProductSetProduct_ProductReference"
        GridViewTextBoxColumn7.FieldName = "ProductSetProduct_ProductName"
        GridViewTextBoxColumn7.HeaderText = "Product-Naam"
        GridViewTextBoxColumn7.MaxLength = 255
        GridViewTextBoxColumn7.Name = "ProductSetProduct_ProductName"
        Me.GridViewTemplate1.Columns.AddRange(New Telerik.WinControls.UI.GridViewDataColumn() {GridViewTextBoxColumn4, GridViewTextBoxColumn5, GridViewTextBoxColumn6, GridViewTextBoxColumn7})
        Me.GridViewTemplate1.EnableFiltering = True
        Me.GridViewTemplate1.EnableGrouping = False
        '
        'SetsForm
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.ClientSize = New System.Drawing.Size(668, 385)
        Me.Controls.Add(Me.RadGridView1)
        Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow
        Me.Name = "SetsForm"
        '
        '
        '
        Me.RootElement.ApplyShapeToControl = True
        Me.Text = "Sets"
        CType(Me.RadGridView1.MasterTemplate, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.RadGridView1, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.GridViewTemplate1, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me, System.ComponentModel.ISupportInitialize).EndInit()
        Me.ResumeLayout(False)
 
    End Sub
    Friend WithEvents RadGridView1 As Telerik.WinControls.UI.RadGridView
    Friend WithEvents GridViewTemplate1 As Telerik.WinControls.UI.GridViewTemplate
End Class

Any ideas as to why this is happening? I use version 2013.1.321.40 of the telerik components

Thanks in advance,

Jasper

EDIT: Of course, I should state as to what's wrong of course...
I expected the columns of the second level to be
- ID
- Product-Reference
- Product-Naam

And the last column just 'not be there'
Jasper
Top achievements
Rank 1
 answered on 19 Jul 2013
1 answer
155 views
Hi,
I have a data source which is a BindingList<Project> where Project is a class containing a Parent and a Children properties (as well as other properties like Id, Name, Description etc). The Parent property is of type Project and the Children property is of type BindingList<Project>. Suppose i don't know in advance the depth of this hierarchy, how can i configure the GridView to display it right? I couldn't find any useful demo, are there any that concern my issue?

Thanks ahead,
Uri

---------------------------------------------------
I figured it out!
I've added a ParentId property to the Project class and added a self reference to the gridview's relations collection:
this.radGridView1.Relations.AddSelfReference(this.radGridView1.MasterTemplate, "Id", "ParentId");
Dimitar
Telerik team
 answered on 19 Jul 2013
4 answers
281 views
Hello,

I can't seem to figure this error out.  When I add the code below to the code for my main form it will throw the exception "An error occurred creating the form. See Exception.InnerException for details.  The error is: Object reference not set to an instance of an object."

The form is to manage a series of applications I have been creating.  The grid view shows a list of banned users and allows for Editing of the records as well as showing them.  I have a few text boxes that act as a form so when a row is selected, data is shown there.
Private Sub Bans_Grid_CurrentRowChanged(sender As Object, e As Telerik.WinControls.UI.CurrentRowChangedEventArgs) Handles Bans_Grid.CurrentRowChanged
Bans_Name_txt.Text = e.CurrentRow.Cells.Item(3).Value.ToString  'It breaks on this line.
End Sub

I know its this line because if I comment it out the form loads perfectly fine.
Stefan
Telerik team
 answered on 19 Jul 2013
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
CheckedDropDownList
ProgressBar
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
Barcode
BindingNavigator
PopupEditor
RibbonForm
Styling
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?