How to customize a treeview cell type

Posted by: malishin on 26 October 2020, 7:03 pm EST

  • Posted 26 October 2020, 7:03 pm EST

    Hi
    I have displayed the treeview by overriding the GetEditorControl method in GeneralCellType, but the selected node in treeview cannot be written into the cell, and the page will automatically refresh

    see TreeComboBoxCellType.cs in attachment
  • Replied 26 October 2020, 7:06 pm EST

    TreeComboBoxCellType.zip
  • Replied 28 October 2020, 10:40 pm EST

    Hi,
    We are investigating this case. We will let you know as we have an update on this.

    Regards,
    Manish Gupta
  • Replied 1 November 2020, 4:42 pm EST

    Hi,
    We are sorry for the inconvenience. This issue requires further investigation hence we have forwarded this to the concerned team with the internal tracking id SPNET-13342. We will let you know as we get an update on this.

    Regards,
    Manish Gupta
  • Marked as Answer

    Replied 17 November 2020, 3:28 pm EST

    Hi,
    We are sorry for the delayed response on this. We need the following correction:
    Server side:
    Models\TreeComboBoxCellType.cs: Add the CSS class for TreeView and TreeView's leaf. Sets the node NavigateUrl is "#" to ignore postback.
    Client-side:
    WebForm1.aspx: Adds the script to handle node click, saves element's value by selected node's value and stop editing cell.
    TreeComboEditorScript.js/TreeComboRenderScript.js: Uncomment the test logic to get/set the actual editor's value.

    Please refer to the attached sample for reference.

    Regards,
    Manish Gupta


    TreeComboBoxEditor-Spread.zip
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels