This is a migrated thread and some comments may be shown as answers.

Error when renaming first node in self referenced dtabase binded radTree

2 Answers 96 Views
Treeview
This is a migrated thread and some comments may be shown as answers.
Anoop
Top achievements
Rank 1
Anoop asked on 27 Dec 2012, 06:24 PM
I am using sql server database.
1. It is a self referencing database created as per Binding to Self Referencing Data in help document
2.Table definition is given below.
CREATE TABLE [dbo].[Node] (
[ID] INT IDENTITY (1, 1) NOT NULL,
[ParentID] INT NULL,
[Name] TEXT NULL,
[Note] TEXT NULL,
PRIMARY KEY CLUSTERED ([ID] ASC)
);

3.code binded as folws
this.radTreeView1.DisplayMember = "Name";
this.radTreeView1.ParentMember = "ParentID";
this.radTreeView1.ChildMember = "ID";
this.radTreeView1.ValueMember = "ID";
radTreeView2.TreeViewElement.EditMode =TreeNodeEditMode.Text;

4.Error occurs in these case.Run project and select first root node rename it ,object reference not set to an instance of object error
5.if i rename any other node and rename first root node error will not occur.Did i done any thing wrong ?






2 Answers, 1 is accepted

Sort by
0
Accepted
Boryana
Telerik team
answered on 28 Dec 2012, 02:49 PM
Hello Anoop,

Thank you for writing.

I replicated the exception you describe. The issue is logged to our Public Issue Tracker under ID 13880. To vote for it and subscribe to its status updates follow this link: http://www.telerik.com/support/pits.aspx#/public/winforms/13880. Please excuse us for the caused inconvenience. We will do our best to address the issue in a future release. I have updated your Telerik points for this report report.

One approach to avoid the exception is to create a custom RadTreeViewElement and override its EndEditCore method. This suggestion is implemented in the attached sample project. I hope you find it useful.

Let me know if you encounter further issues.

Regards,
Boryana
the Telerik team
Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
0
Anoop
Top achievements
Rank 1
answered on 29 Dec 2012, 06:21 AM
Thanks for the solution.First i am unable to get design view so i ha changed  private CustomRadTreeView radTreeView1; to public CustomRadTreeView radTreeView1; and i got design view
Tags
Treeview
Asked by
Anoop
Top achievements
Rank 1
Answers by
Boryana
Telerik team
Anoop
Top achievements
Rank 1
Share this question
or