DataTable add a column,this column's value must be chosed from a given list,HOW?


hello,

i want add column datatable,

such add sex column,this column has 2 choice:male or female.

how can this?

thanks,

allen


allen ppl

you can:

1) column's type of string.

2) drag , drop datagridview onto winform.

3) cancel "autogeneratecolumns" add manually columns, "sex" column, please use datagridviewcomboboxcolumn, datasource should bound one, displaymember property, , valuemember one, valuemember must either "male" or "female".

4) see this:

http://stackoverflow.com/questions/13829621/bindingsource-with-datagridview-combo-box


if think 1 reply solves problem, please mark an answer, if think someone's reply helps you, please mark proposed answer

help clicking:
click here donate rice poor
click donate
click feed dogs & cats


found spamming-senders? please report at: spam report



Visual Studio Languages  ,  .NET Framework  >  Visual C#



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

How to Share webservice object to all user

How to fix error Msg 1801, Level 16, State 3, Line 1