rishaan
asked on
Windows forms databound datagridview: editable as well as noneditable
My datagridview has to have noneditable rows except for the ones that are new.
I have set AllowUsersToAddRows true for the grid. This adds a row at the bottom and user can enter the data. I want the new rows to be editable. Also the copy and pasted rows should be editable. So I added a flag to the database . If this flag is 'Y' I want to make those rows noneditable but for the new rows I want to initially set the flag to 'N'.
In which datagridview event should I set if flg="N" the datagridview.currentrow.Re adonly=fal se ;
I am a newbie...please help..
I have set AllowUsersToAddRows true for the grid. This adds a row at the bottom and user can enter the data. I want the new rows to be editable. Also the copy and pasted rows should be editable. So I added a flag to the database . If this flag is 'Y' I want to make those rows noneditable but for the new rows I want to initially set the flag to 'N'.
In which datagridview event should I set if flg="N" the datagridview.currentrow.Re
I am a newbie...please help..
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hope this helps solve both ur questions :)
I read your question "Windows form databound datagridview:Add row functionality" too. Try not to add it in the database. Just add a column called "Flag" or "IsEditable" to the datatable that is fetched. Just wanted to quicly let you know this. Changing the data base schema everytime to achieve something like this could become messy .....
And to answer your question abt the datagrid event, gimme a min :)