简体   繁体   中英

c# datagridview when button click allow user to add rows

on form load I have set the property AllowUserToAddRows to false

DGV_PatientSessions.AllowUserToAddRows = false;

and at run time there is a button that when cliecked will change the property AllowUserToAddRows to true

DGV_PatientSessions.AllowUserToAddRows = true;

but nothing happened anyone can help ?

check these settings

  • How data is bounded in the DataGridView Is your datagrid readonly

Also, can you post the reproducible code.

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