vb.net - Unbound DataGridView add row with checkbox error -


this windows forms program. have unbound datagridview control 4 columns; feature id string, parts string, flats string , showonest boolean. columns defined in form designer , boolean column is, indeed, set checkbox tristate set false.

the user selects product list box , code executed populate grid

grdfeat.rows.clear() = 0 curproduct.lstfeatures.count - 1     (curproduct.lstfeatures(i))         grdfeat.rows.add(.featureid, .parts, .flats, .showonest)     end next 

if allowusertoaddrows false, everthing good. setting allowusertoaddrows true, however, results in following error:

formatexception

value '' cannot converted type 'boolean'.

the error not triggered in code. it's displayed in new tab titled "no source available".

it seems pretty clear process adds new editing row trying set checkbox string value, or perhaps null. i'm new (a few months) vb.net, suspect i'm overlooking simple setting somewhere, after several hours of trying find it, i'm starting feel little foolish here.

i'd give list of things i've tried already, it's long one. :) tried go around issue adding new row manually, .add("","","",false), gives same error, though i'm telling put in checkbox.

what missing? also, can point me explanation of how new editing row thingy works?

from explained, have no real explanation problem.

a workaround may set allowusertoaddrows false before populating datagridview , set true after.


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

c# - MSDN OneNote Api: Navigate to never before opened page without opening a OneNote Application Window -