"cut" should remove the node/row from treeview/gridview :) ? Delete the selected node/row.....
But after cutting do you want to allow it to be pasted somewhere on the form may be another treeview/gridview....... :) On Tue, Sep 15, 2009 at 10:51 AM, Arsalan Tamiz <[email protected]> wrote: > As far as "copy" is concern it is simple. You just have to recognize the > control which is currently selected and use the appropriate property / > method to copy the content. > > E.g. Pseudocode: > > Select Case For "ActiveControl" { > Case TreeView: > Clipboard.CopyText(Cast(ActiveControl as > TreeView).SelectedNode.Text) > Case TextBox: > ... > Case DataGridView: > .... > } > > "Cut" and "Paste" is NOT that much simple you may need to do a lot more > coding depending on the control. For example in TreeView, if you want to do > "paste", you should first decide the behaviour how and where the new node > will be created. > > > On Mon, Sep 14, 2009 at 9:03 AM, chinni <[email protected]> wrote: > >> >> Hi, >> >> I have a windows application. I need to have edit menu, which has >> submenus cut, copy, paste. I need to check whether any text is >> selected in the gridview and treeview, and accordingly i shud be able >> to allow users to cut, copy and paste the text selected.... I found >> some links to do so only in the textboxes which already having built >> in functions... could anyone plz help me to achieve this? >> >> thank u >> > >
