json - combobox databinding by JsonConvert in winforms C# -


i had set properties of combobox in designer.

  • combobox property
    • datasource : dataset_code
    • displaymember : table1.code_desc
  • combobox work
    • use data bounding items : check
    • datasource : dataset_code
    • show member : table1.code_desc
    • value member : table1.code_value

in winform.cs code

//1. code don't shows combobox item table1 = jsonconvert.deserializeobject<datatable>(jsonarraycolletion.tostring());  //2. code shows combobox item datarow dr; dr = table1.newrow(); dr["code_desc"] = "one"; dr["code_value"] = "1"; table1.rows.add(dr); 

do know reason?


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -