Click here to Skip to main content
15,902,844 members
Home / Discussions / Windows Forms
   

Windows Forms

 
AnswerRe: How to call control from fromA to fromB Pin
N a v a n e e t h3-Apr-08 3:35
N a v a n e e t h3-Apr-08 3:35 
AnswerRe: How to call control from fromA to fromB Pin
Pete O'Hanlon3-Apr-08 9:39
mvePete O'Hanlon3-Apr-08 9:39 
GeneralRe: How to call control from fromA to fromB Pin
cocoonwls3-Apr-08 16:45
cocoonwls3-Apr-08 16:45 
GeneralRe: How to call control from fromA to fromB Pin
Pete O'Hanlon3-Apr-08 23:10
mvePete O'Hanlon3-Apr-08 23:10 
QuestionHow to Bind Controls in GridView in VB.Net or C#.Net (Windows Application) Pin
Vignesh Krishnan2-Apr-08 18:43
Vignesh Krishnan2-Apr-08 18:43 
GeneralRe: How to Bind Controls in GridView in VB.Net or C#.Net (Windows Application) Pin
John_Adams2-Apr-08 22:55
John_Adams2-Apr-08 22:55 
GeneralRe: How to Bind Controls in GridView in VB.Net or C#.Net (Windows Application) Pin
Vignesh Krishnan2-Apr-08 23:31
Vignesh Krishnan2-Apr-08 23:31 
GeneralDatabinding Radio Buttons in a Winforms Group Box Pin
fredsparkle2-Apr-08 5:57
fredsparkle2-Apr-08 5:57 
I sort of have databinding working with a set of Radio buttons in a winforms group box.

I have implemented a class with that extends INotifyPropertyChanged with seperate properties for each radio button (Demo below).

On my form I have grouped the radio buttons into a group box so that only one button can be selected at a time. Then under DataBindings I have used the advanced option to set the "checked" value and the data source update mode to "OnPropertyChanged".

The problem that I am having is that each change in selection requires the user to click twice on the destination radio button to make a selection.

using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;

namespace PizzaOrder
{
class OrderData : INotifyPropertyChanged
{
public OrderData()
{
m_largePizza = true;
}

#region INotifyPropertyChanged Members

public event PropertyChangedEventHandler PropertyChanged;

protected virtual void OnPropertyChanged(string propertyName)
{
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}

#endregion

private bool m_smallPizza = false;
public bool SmallPizza
{
get { return m_smallPizza; }
set
{
if (m_smallPizza != value)
{
m_smallPizza = value;
OnPropertyChanged("SmallPizza");
}
}
}

private bool m_mediumPizza = false;
public bool MediumPizza
{
get { return m_mediumPizza; }
set
{
if (m_mediumPizza != value)
{
m_mediumPizza = value;
OnPropertyChanged("MediumPizza");
}
}
}

private bool m_largePizza = false;
public bool LargePizza
{
get { return m_largePizza; }
set
{
if (m_largePizza != value)
{
m_largePizza = value;
OnPropertyChanged("LargePizza");
}
}
}
}
}
GeneralOrder/sort controls For each ctrl as Control in pnlMain.Controls Pin
divyesh14321-Apr-08 22:49
divyesh14321-Apr-08 22:49 
GeneralRe: Order/sort controls For each ctrl as Control in pnlMain.Controls Pin
Eduard Keilholz3-Apr-08 3:03
Eduard Keilholz3-Apr-08 3:03 
GeneralRe: Order/sort controls For each ctrl as Control in pnlMain.Controls Pin
divyesh143221-Apr-08 22:37
divyesh143221-Apr-08 22:37 
Questionhtml Pin
vvsprasad1-Apr-08 20:20
vvsprasad1-Apr-08 20:20 
GeneralRe: html Pin
Herman<T>.Instance2-Apr-08 2:14
Herman<T>.Instance2-Apr-08 2:14 
GeneralRe: html Pin
Pete O'Hanlon3-Apr-08 10:30
mvePete O'Hanlon3-Apr-08 10:30 
GeneralRe: html Pin
Mark Salsbery3-Apr-08 10:57
Mark Salsbery3-Apr-08 10:57 
GeneralRe: html Pin
Pete O'Hanlon3-Apr-08 11:17
mvePete O'Hanlon3-Apr-08 11:17 
GeneralRe: html Pin
Colin Angus Mackay7-Apr-08 0:51
Colin Angus Mackay7-Apr-08 0:51 
GeneralRe: html Pin
Colin Angus Mackay7-Apr-08 0:54
Colin Angus Mackay7-Apr-08 0:54 
GeneralRe: html Pin
Pete O'Hanlon7-Apr-08 1:14
mvePete O'Hanlon7-Apr-08 1:14 
Questionhow to show image during saving data? Pin
samrat.net1-Apr-08 2:17
samrat.net1-Apr-08 2:17 
AnswerRe: how to show image during saving data? Pin
Herman<T>.Instance1-Apr-08 23:30
Herman<T>.Instance1-Apr-08 23:30 
QuestionUsing SourceGrid, unable to use CopyPasteSelection from ContextMenuStyle enum item. [modified] Pin
kisna_madhusudan1-Apr-08 1:54
kisna_madhusudan1-Apr-08 1:54 
QuestionMDI child in panel problem [modified] Pin
invader8231-Mar-08 4:54
invader8231-Mar-08 4:54 
GeneralRe: MDI child in panel problem Pin
Luis Alonso Ramos31-Mar-08 7:27
Luis Alonso Ramos31-Mar-08 7:27 
GeneralRe: MDI child in panel problem Pin
invader8231-Mar-08 7:50
invader8231-Mar-08 7:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.