Profile Picture

NTreeList items editing

Posted By Ian Carson 14 Years Ago
Author
Message
Ian Carson
Posted 14 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: Forum Members
Last Active: 14 Years Ago
Posts: 3, Visits: 1

Hi Angel

Thanks for your reply.

I made the assumption that subitems could not be edited even if I built the tree programmatically so I went around the problem and built a tree which populated prgramatically and then selecting nodes populated a datagrid of the required subitems which are then editable.

Not beautiful but definitely functional!



Angel Chorbadzhiev
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)

Group: Forum Members
Last Active: Last Month
Posts: 139, Visits: 184

Hi Ian,

In NTreeList control if EnableItemEdit is set to true you can edit only NTreeListNode items (you can't edit subitems).

When you bind data to NTreeList control all data is displayed into subitems, and it is not possible to be edited.

In order to be able to edit data you should fill it manually into the NTreeListNode items of the control.

Regards,

Angel.



Ian Carson
Posted 14 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: Forum Members
Last Active: 14 Years Ago
Posts: 3, Visits: 1

Hi Angel

Thanks for the quick response. I got the help file working as well so thanks for that too.  

Does your reply mean that I must build the treelist programmatically if I wish to have editing control of the text in the Nodes and subitems? Or is what I am attempting to do simply not possible with this control?

Regards

Ian



Angel Chorbadzhiev
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)Supreme Being (142 reputation)

Group: Forum Members
Last Active: Last Month
Posts: 139, Visits: 184

Hi Ian,

 

When you bind data table to NTreeList control the data from the data table is displayed by the sub items on NTreeList nodes.

NTreeList control has Nodes collection as each node has collection of NTreeListNodeSubItemCollection called SubItems.

All data from the binding data table goes in this sub items. In this case the Text property of the node itself is not set.

EnableItemEdit property comes from the base class of NTreeList control – NTreeViewEx control.

When you enable items editing you actually allows to edit the text of the node itself, not the text of the node’s subitems.

That’s why the text that you input overlaps the text of the first column.

 

Regarding documentation if you using Visual Studio 2005 or 2008 you should have the documentation as a part of Nevron .NET Vision. You should be able to reach it from the Start menu.

In the version for Visual Studio 2010 the documentation is provided as chm file. Again, you can reach it from the Start menu.

However, we can provide you explicitly with documentation in a chm format if you request it.

 

Regards,

Angel.

 



Ian Carson
Posted 14 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: Forum Members
Last Active: 14 Years Ago
Posts: 3, Visits: 1

Hi Guys

I'm trying to set up a TreeList which reads from a table and displays the contents so that some of the table's fields can be edited to indicate a users preference and then written back to the original table. I have "enableItemEdit" set to True but this only seems to allow me to add text which overlays on the first non-grouped field rather than replacing it. I have a boolean field in the dataset as well which I would like the user to be able to check or uncheck. Currently when I read that field into the control all checkboxes are checked even though the data indicate that only some of them should be.

Note that the display of the data is working fine it's the edit and writeback which I am having trouble with. 

I am very new to Nevron and would appreciate any help you could provide.

Also, is it possible to download the programming reference as the online version hangs my browser whenever I attempt to open it.

Thanks in advance

Ian Carson

P.S. Code follows:

 

Public Class frmPortfolio

Private Sub frmPortfolio_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Dim pTableAdapter As New DataSet1TableAdapters.PortfolioTableAdapter()

 

Dim data As NTreeListTableData = New NTreeListTableData()

data.Table = pTableAdapter.GetDataTable()

data.Bind(NTreeList1)

Dim col1 As NTreeListColumn = NTreeList1.Columns("InstrumentType")

Dim col2 As NTreeListColumn = NTreeList1.Columns("InstrumentGroup")

NTreeList1.GroupBy(col1)

NTreeList1.GroupBy(col2)

NTreeList1.SortColumn(col1, TreeListSortMode.Descending)

NTreeList1.SortColumn(col2, TreeListSortMode.Ascending)

NTreeList1.SortColumn(NTreeList1.Columns("InstrumentParentID"), TreeListSortMode.Ascending)

NTreeList1.SortColumn(NTreeList1.Columns("InstrumentName"), TreeListSortMode.Ascending)

NTreeList1.BestFitAllColumns()

NTreeList1.BestFitAllNodes()

'NTreeList1.Expand(2, False)

NTreeList1.Columns("ID").Visible = False

NTreeList1.Columns("InstrumentParentID").Visible = False

NTreeList1.Columns("LastModifiedDate").Visible = False

End Sub

End Class





Similar Topics


Reading This Topic