Hello,
I haven't been able to replicate this issue. Please can you try the sample below and let me know if this works for you.
Form1 Designer
namespace RadControlsWinFormsApp1
{
partial class Form1
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.radGridView1 = new Telerik.WinControls.UI.RadGridView();
((System.ComponentModel.ISupportInitialize)(this.radGridView1)).BeginInit();
this.SuspendLayout();
//
// radGridView1
//
this.radGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.radGridView1.Location = new System.Drawing.Point(0, 0);
this.radGridView1.Name = "radGridView1";
this.radGridView1.Size = new System.Drawing.Size(284, 262);
this.radGridView1.TabIndex = 0;
this.radGridView1.Text = "radGridView1";
this.radGridView1.UserAddedRow += new Telerik.WinControls.UI.GridViewRowEventHandler(this.radGridView1_UserAddedRow);
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(284, 262);
this.Controls.Add(this.radGridView1);
this.Name = "Form1";
this.Text = "Form1";
((System.ComponentModel.ISupportInitialize)(this.radGridView1)).EndInit();
this.ResumeLayout(false);
}
#endregion
private Telerik.WinControls.UI.RadGridView radGridView1;
}
}
Form 1
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Telerik.WinControls.UI;
namespace RadControlsWinFormsApp1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
List<Person> people = new System.Collections.Generic.List<Person>();
people.Add(new Person(1, "Richard",5));
people.Add(new Person(2, "Chris", 10));
people.Add(new Person(3, "Pete", 7));
radGridView1.DataSource = people;
this.radGridView1.AddNewRowPosition = Telerik.WinControls.UI.SystemRowPosition.Bottom;
}
private void radGridView1_UserAddedRow(object sender, Telerik.WinControls.UI.GridViewRowEventArgs e)
{
MessageBox.Show(e.Row.Cells[1].Value.ToString());
}
}
public class Person
{
public Person(int userId, string userName, int totalStuff)
{
UserId = userId;
UserName = userName;
TotalStuff = totalStuff;
}
public Person()
{ }
public int UserId
{
get;
set;
}
public string UserName
{
get;
set;
}
public int TotalStuff
{
get;
set;
}
}
}
hope that helps, but let me know if you have any questions
Richard