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.

Read only cells

Thread ID:

Created:

Updated:

Platform:

Replies:

121114 Nov 11,2015 10:12 AM Nov 12,2015 11:36 PM ASP.NET Web Forms 3
loading
Tags: Grid
Jorge Pampin
Asked On November 11, 2015 10:12 AM

Hello,

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

Thanks!

Gowthami V [Syncfusion]
Replied On November 12, 2015 07:49 AM

Hi Jorge,

Thanks for using Syncfusion products.

We can understand from your query that you are using “Batch” edit mode since you have mentioned like read only cells.

We can achieve your requirement using “CellEdit” event of the grid as follows,

<ej:Grid ID="OrdersGrid" runat="server" >
            <ClientSideEvents CellEdit="cellEdit"/>
. . . .
<EditSettings AllowEditing="True" AllowAdding="True" AllowDeleting="True" EditMode="batch" ></EditSettings>
. . .  .
   </ej:Grid>

<script type="text/javascript">

        function cellEdit(args)

        {

//We have prevent editing for the cell which contains LastName as “Beckett”

            if (args.columnName == "LastName" && args.value == "Beckett")

                args.cancel = true;

        }
        </script>


If we misunderstood your requirement please provide more details about your requirement like in which editing mode you want to change the cells as read only and the provided information will help to analyze the requirement and provide you the response as early as possible.

Regards,
Gowthami V.

Jorge Pampin
Replied On November 12, 2015 07:59 AM

Hello,

This is perfect! Thank you!

Gowthami V [Syncfusion]
Replied On November 12, 2015 11:36 PM

Hi Jorge,
 
We are happy to hear that your requirement has been achieved.
 
Get back to us if you need further assistance.
 
Thanks & Regards,
 
Gowthami V.

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.

;