471,108 Members | 1,547 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,108 software developers and data experts.

Revisiting setting datagridview combobox to item not selected.

Its often necessary to allow the user to remove a selection from a combox.
In my case, most are bound to lookup tables. I suppose I could, in each
lookup table create an empty record and have in the combobox when its being
filled but there are several reasons why this is not a desirable approach
one is that I would often have to set allownull in the datatable design when
I really need a value. So I need to be able to allow user to simply delete
the currently showing selection from the selected row's combobox and have
the system set the underlying value in the bound table reset to NULL (using
sql server 2005, vs2005 an vb.net). I've been looking for code snippets that
make it possible to do this but haven't found any. All I've found were some
custom controls.

By the way this problem also affects some other controls like Microsoft's
date time picker. In this one if you select date and make a save to the
bound table, I haven't found a way to reforce the underlying table's field
to null. Say user set a starting date of something, saved it, realized thing
had not started yet and wanted to remove the date from the table.

I would really appreciate any info on how to do this.

Jan 11 '06 #1
0 2475

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Art | last post: by
reply views Thread by lv2compute | last post: by
3 posts views Thread by Przemek M. Zawada | last post: by
3 posts views Thread by =?Utf-8?B?Sm9obiBCdW5keQ==?= | last post: by
reply views Thread by Dom | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.