|
-
Sep 14th, 2020, 05:16 PM
#12
Re: [RESOLVED] DataGridViewCheckBoxColumn from SQL bit type
The data is remembered because it not stored in the grid columns, it is stored in a DataTable (via the DataSource property of the grid). The grid just displays the relevant parts of the DataTable when they are on screen.
The DataPropertyName specifies what column of the data (in the DataSource) the column should display... in basic theory it shouldn't work without setting that, but I assume that if it is not set then the Name property gets tried instead - which in this case happens to have the same value, so it works. It is best to specify DataPropertyName tho, as the behaviour you've seen might not be guaranteed.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|