We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Set readonly some cells

Thread ID:

Created:

Updated:

Platform:

Replies:

121275 Nov 25,2015 11:08 AM Nov 26,2015 06:59 AM ASP.NET Web Forms 1
loading
Tags: TreeGrid
Jorge Pampin
Asked On November 25, 2015 11:08 AM

Hello,

How to set read only some cells based on their data?

Thanks!

Mahalakshmi Karthikeyan [Syncfusion]
Replied On November 26, 2015 06:59 AM

Hi Jorge,

Thanks for contacting Syncfusion support.

We can make any field or particular cell read only with the help of “BeginEdit” client side event. Please refer the below code example for details.

<ej:treegrid ID="Treegrid" runat="server"

//…

BeginEdit="beginedit">

<script type="text/javascript">

      function beginedit(args) {

          if (args.columnIndex == 5 && parseInt(args.data.PercentDone) > 100) {

              args.cancel = true;

          }

      }

  </script>

Here we have cancelled the editing event when we attempt to edit the percentage column value is greater than 100.

We have also prepared a sample based on this, and you can find the sample under the following location.

Sample: http://www.syncfusion.com/downloads/support/directtrac/general/ze/cellEdit1796809052

Regards,

Mahalakshmi K.


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;