|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Databound RadioButtonSetting up databindings for controls like textboxes and checkboxes is
pretty straightforward, but how do you set up a databound radio group? For example, say I have source_type in my database that is an integer. Valid values would be 1 and 2. I want to radio buttons on a form, one for Directory and the other is Scanner. If they select Directory, the value would be set to 1 and if they select scanner the value would be set to 2 after updating the table adapter. How is this done? I've thought of setting up some kind of hidden control use that to control the radio buttons, but I was wondering if this was the best way. Thanks, Dustin Here is a link to a MSDN article that presents one approach for the data
binding scenario you describe: http://msdn.microsoft.com/msdnmag/issues/04/07/AdvancedBasics/ Show quoteHide quote "Dustin Davis" <dus***@davisvillage.com> wrote in message news:OkwxTXB2GHA.4972@TK2MSFTNGP03.phx.gbl... > Setting up databindings for controls like textboxes and checkboxes is > pretty straightforward, but how do you set up a databound radio group? > > For example, say I have source_type in my database that is an integer. > Valid values would be 1 and 2. I want to radio buttons on a form, one for > Directory and the other is Scanner. If they select Directory, the value > would be set to 1 and if they select scanner the value would be set to 2 > after updating the table adapter. How is this done? > > I've thought of setting up some kind of hidden control use that to control > the radio buttons, but I was wondering if this was the best way. > > Thanks, > Dustin Thanks Mike. I'm thinking that seems like overkill (and kind of ugly).
Maybe I'll just use a combo box instead, or try a hidden field technique. Mike McIntyre wrote: Show quoteHide quote > Here is a link to a MSDN article that presents one approach for the data > binding scenario you describe: > > http://msdn.microsoft.com/msdnmag/issues/04/07/AdvancedBasics/ You are right-on.
Show quoteHide quote "Dustin Davis" <dus***@davisvillage.com> wrote in message news:On0dA9M2GHA.4116@TK2MSFTNGP02.phx.gbl... > Thanks Mike. I'm thinking that seems like overkill (and kind of ugly). > Maybe I'll just use a combo box instead, or try a hidden field technique. > > Mike McIntyre wrote: >> Here is a link to a MSDN article that presents one approach for the data >> binding scenario you describe: >> >> http://msdn.microsoft.com/msdnmag/issues/04/07/AdvancedBasics/
EXE and Dev environment.
Epson TM-T88 Drawer Kick string or StringBuilder return ? Can we Read the text contents from PDF using .net Reflection, creating object with inherited cunstructor, how? Threading using QueueUserWorkItem VB to Delphi Help! Change OpenFileDialog Size (width and height) DataBinding to DataGridView AND TextBoxes? TreeView node remove: what event? |
|||||||||||||||||||||||