简体   繁体   中英

How to change a column/Field of asp grid to readonly in code behind (vb.net)

I am having a asp grid on front, its all columns are enabled. On specific action, I want only one column to be read only. How can i do this code behind file (vb.net).

Update : I want to disable all rows of one column. Not only the selected one.

Thanks..

For row As Integer = 0 To grd.Rows.Count - 1
grd.Rows(row).Cells(1).Enabled = False
Next

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM