Ticket T326091
Visible to All Users

How to disable selection checkboxes in the ASPxTreeList

created 9 years ago

Hi,
We are using ASPxTreeList to show hierarchial data.Our requirement is to disable selection checkbox (not hide).
For selection checkbox to disable ,we have tried in the event HtmlRowPrepared of ASPxTreeList
  code snippet:
  foreach (TableCell cell in e.Row.Cells)
   {
     if (cell is DevExpress.Web.ASPxTreeList.Internal.TreeListSelectionCell)
       {
             (cell.Controls[0] as WebControl).Visible = false; //This is working
(cell.Controls[0] as WebControl).Enabled  = false;  //This is not working
  }
}

The selection checkbox is not getting disabled. visible false is working but enable false is not working.

The problem for this solutino is provided in below example but the example link is also not working .
https://www.devexpress.com/Support/Center/Example/Details/E2011

Could you please suggest if I am missing something here or any workaround to disable selection checkbox.

Thanks

Comments (3)
DevExpress Support Team 9 years ago

    Hello,

    Would you please provide me with the problematic page markup and code behind illustrating your current progress? It will allow me to research the project locally and I will do my best to find the cause of the incorrect behavior.

      Hi,
      we just need to disable selection checkbox in the ASPxTreeList.
      we are using HTMLRowPrepared event for this
      cell.Controls[0] as WebControl).Enabled  = false
      As said earlier, visible false is working but enable false is not working.
      We followed the same logic as provided in the below support example, but the RunOnline link is also not working for us to verify the solution.
      https://www.devexpress.com/Support/Center/Example/Details/E2011

      DevExpress Support Team 9 years ago

        Hello,

        I may need additional time to research this issue. I will update the thread as soon as possible.

        Answers approved by DevExpress Support

        created 9 years ago

        Hello,

        We have researched this behavior and found that currently ASPxTreeList does not provide the capability to disable selection checkboxes. I have created a separate ticket on this issue - ASPxTreeList - It is impossible to disable a selection check box. You can add it to your favorites and track all updates.

        For now, as a workaround, you can hide the required checkboxes. However, if this option does not meet your requirements, we can provide you with a workaround containing internal undocumented methods (which can be modified in future builds without any notification). Let me know if you need this option.
        I hope this information helps.

          Show previous comments (1)
          DevExpress Support Team 9 years ago

            Hello,

            Attached is a sample project illustrating how to disable selection checkboxes for nodes that have child nodes. Let me know if it helps.

              Thanks for the solution. It is working.

              DevExpress Support Team 9 years ago

                You are welcome.

                Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

                Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.