Vb.Net DataRelation 'column' argument cannot be null. Parameter name column -
i have query display results follows: 
now want display these results in tree view in vb.net using datarelation. add groupid parent , other details children in tree view. have done using loop, interested in doing via datarelation property of datatables. first create new table distinct groupid follows:
dim tbl datatable = dsdataset.tables("groups").defaultview.totable(true, "groupid") then add table dataset able add datarelation.
tbl.tablename = "aaa" dsdataset.tables.add("aaa") and add datarelation between new table , original table:
dim rel new datarelation("model", dsdataset.tables("aaa").columns("groupid"), dsdataset.tables("groups").columns("groupid")) after running code , when part of creating relation following error occures:
'column' argument cannot null. parameter name column how can solve problem?
i think problem here...
tbl.tablename = "aaa" dsdataset.tables.add("aaa") 'your not adding table... try instead...
dsdataset.tables.add(tbl)
Comments
Post a Comment