Hello,
I'm looking for a way to put the treelistview control in editing mode from code-behind. More precisely, I need the selected line to be set to editable when the user clicks on a 'Modify' button on the form.
I know pressing F2 seems to set the editable mode on with the TreeView, but it doesn't work yet on the TreeListView?
Thank you
-Simon
I'm looking for a way to put the treelistview control in editing mode from code-behind. More precisely, I need the selected line to be set to editable when the user clicks on a 'Modify' button on the form.
I know pressing F2 seems to set the editable mode on with the TreeView, but it doesn't work yet on the TreeListView?
Thank you
-Simon
4 Answers, 1 is accepted
0
Hello Simon,
Thank you for your interest in the TreeListView! Please note that the control is a CTP, so it may change in future versions.
This should put the currently selected item in edit mode:
To get the editing working, you need to set the IsEditable property on the TreeList and the same property on the column you want to be editable. In this version you need to specify a CellEditTemplate for the column explicitly.
Hopefully this will work for you,
Greetings,
Miroslav
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Thank you for your interest in the TreeListView! Please note that the control is a CTP, so it may change in future versions.
This should put the currently selected item in edit mode:
if
(treeList.SelectedContainer !=
null
)
{
treeList.SelectedContainer.BeginEdit();
}
To get the editing working, you need to set the IsEditable property on the TreeList and the same property on the column you want to be editable. In this version you need to specify a CellEditTemplate for the column explicitly.
Hopefully this will work for you,
Greetings,
Miroslav
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
VH
Top achievements
Rank 1
answered on 09 Mar 2010, 03:47 AM
Sorry, solved. my bad...
0
Ketaki
Top achievements
Rank 1
answered on 07 Apr 2010, 10:03 AM
Hi,
I am using tree control RadTreeListView, where isEditable is set to true in XAML file.
I want to enable/disable the property "isEditable" depending upon certain conditions.
for e.g. if the DTO object binded with tree contains "allow"(proeprty in DTO object) proeprty to "true", make "isEditable" to true otherwise dont allow user to edit the column/value.
Right now I am trying to set isEditable to false in code behind, but its not taking effect and always allows user to edit.
Is this possible? If yes, how to do it?
Help needed asap.
Thanks
Ketaki
I am using tree control RadTreeListView, where isEditable is set to true in XAML file.
I want to enable/disable the property "isEditable" depending upon certain conditions.
for e.g. if the DTO object binded with tree contains "allow"(proeprty in DTO object) proeprty to "true", make "isEditable" to true otherwise dont allow user to edit the column/value.
Right now I am trying to set isEditable to false in code behind, but its not taking effect and always allows user to edit.
Is this possible? If yes, how to do it?
Help needed asap.
Thanks
Ketaki
0
Hi Ketaki,
There is an IsEditable property on the TreeListViewItem. You can use container bindings to bind it to a property on your ViewModel and turn off/on editing for a particular row.
If you need fine-grained editing you can handle the PreviewEditStarted routed event of the item. Marking this event as handled (e.Handled = true) means that the editing will not start.
Please note that the TreeListView is a CTP and some major changes are expected for its next version as it will be based on the GridView rather than the TreeView. It is best no to base any production code on it yet.
Best wishes,
Miroslav
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
There is an IsEditable property on the TreeListViewItem. You can use container bindings to bind it to a property on your ViewModel and turn off/on editing for a particular row.
If you need fine-grained editing you can handle the PreviewEditStarted routed event of the item. Marking this event as handled (e.Handled = true) means that the editing will not start.
Please note that the TreeListView is a CTP and some major changes are expected for its next version as it will be based on the GridView rather than the TreeView. It is best no to base any production code on it yet.
Best wishes,
Miroslav
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.