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. Image for the cookie policy date

Grid Column Read only



Hi

It's possible make it grid column read only true?


                        <ej:Column Field="price" HeaderText="Unit Price"  TextAlign="Right" Width="80" Format="{0:C}" EditType="Numeric"> 
                                   <NumericEditOptions DecimalPlaces="2" ></NumericEditOptions>                                
                        </ej:Column> 

Thanks
Pratheep

6 Replies

RU Ragavee U S Syncfusion Team April 25, 2016 07:24 AM UTC

Hi Pratheep, 

Thanks for your interest in Syncfusion products. 

Yes. We can set a column as read-only by disabling the AllowEditing property of the grid columns. Please refer to the below online documentation for more information. 



For your convenience, we have created a sample in v14.1.0.41, which can be downloaded from the below location. 


Regards, 
Ragavee U S. 



PR Pratheep April 25, 2016 06:57 PM UTC

Hi ragavee

It's possible permanently that column read only true or disable because i'm going to fill data  from code behind ( only showing the price  - not allow to enter any amount by user )

<EditSettings  AllowEditing="True"></EditSettings>

<ej:Column Field="price" AllowEditing="False" />

this code allowing 1st time enter the price (i need user not allow enter the price any time ) 2nd working fine (read only) 

Thanks 

Pratheep


RU Ragavee U S Syncfusion Team April 26, 2016 12:47 PM UTC

Hi Pratheep, 

We are sorry that we are quite unclear on your reported query. Could you please explain if by “this code allowing 1st time enter the price”, you mean adding a new value or editing an existing value? 

From our records, we found that you have downloaded our v13.4.0.53 Volume. So we have ensured the reported issue in v13.4.0.53 and with our latest version v14.1.0.41. Also, in a sample shared by you in another forum, we found that you have used v13.1.0.21. We ensured in that version too and the issue is not reproducible at our end. 

So could you please share the below details? 

1.       Product version that you are currently working on. 
2.       Screenshot or video demo of the issue 
3.       If possible, please reproduce the issue in the sample provided in our earlier update. 
4.       Else, share the hosted link of your sample. 

Regards, 
Ragavee U S. 



PR Pratheep April 27, 2016 03:29 AM UTC

Hi 

Thanks for guide me 


Version - 14.1.0.41
attached sample Screenshot and attached test project ( check Freight column - add or edit that column i need read only )  

Thanks
Pratheep
 

Attachment: grid_read_only_9134e1d1.rar


PR Pratheep April 27, 2016 03:31 AM UTC

Hi

Version - 14.1.0.41

attached sample Screenshot 

Pratheep

Attachment: Readonly_d5236596.rar


RU Ragavee U S Syncfusion Team April 27, 2016 09:19 AM UTC

Hi Pratheep,  

We understand your requirement to disable “Freight” column even when adding. From your sample we found that you have referred v13.1.021 scripts and css files which is the cause of the issue. 
 
We have implemented “Disable columns on adding when column AllowEditing property is false” from v13.3.0.7. So we suggest you to use v13.3.0.7 or later versions for achieving your requirement. 
 
We have modified your sample with updated scripts and css files from v14.1.0.41, which can be downloaded from the below location. 
 
 
Regards,  
Ragavee U S.  


Loader.
Up arrow icon