<paolohu> wrote in message news:190065@test.componentone.com...if i use a number for the valuemember selectedvalue is always null. if i have a datatable that looks like: id description ---- ---------------- 49 "this is item 1" 50 "this is item 2" and i set valuemember to id then set SelectedValue = 49, SelectedValue returns null when queried. if i have a datatable that looks like: id description ---- ---------------- "49" "this is item 1" "50" "this is item 2" and to the same thing except set SelectedValue to "49" then everything works perfectly. http://home.componentone.com/cs/forums/190065/ShowPost.aspx
I can't reproduce the problem.
I'm using the access database "NWind.mdb", the table is "Products". I set the ValueMember to "ProductID" and DisplayMember to "ProductName", after setting the SelectedValue to 5, then the display text is the product name with ProductID=5. When I get the SelectedValue, the result is 5.
If possible, could you please attach a simple sample that can reproduct it?
Thanks a lot in advance.
-jason